diff --git a/C#/.gitignore b/C#/.gitignore deleted file mode 100644 index 17302c9..0000000 --- a/C#/.gitignore +++ /dev/null @@ -1,186 +0,0 @@ -# Ref: https://gist.github.com/kmorcinek/2710267 -# Download this file using PowerShell v3 under Windows with the following comand -# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore - -# User-specific files -*.suo -*.user -*.sln.docstates -./nuget - -# Build results - -[Dd]ebug/ -[Rr]elease/ -x64/ -build/ -[Bb]in/ -[Oo]bj/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -*_i.c -*_p.c -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.log -*.scc - -# OS generated files # -.DS_Store* -ehthumbs.db -Icon? -Thumbs.db - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -*.ncrunch* -.*crunch*.local.xml - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.Publish.xml - -# Windows Azure Build Output -csx -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -sql/ -*.Cache -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.[Pp]ublish.xml -*.pfx -*.publishsettings -modulesbin/ -tempbin/ - -# EPiServer Site file (VPP) -AppData/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file to a newer -# Visual Studio version. Backup files are not needed, because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# vim -*.txt~ -*.swp -*.swo - -# svn -.svn - -# SQL Server files -**/App_Data/*.mdf -**/App_Data/*.ldf -**/App_Data/*.sdf - - -#LightSwitch generated files -GeneratedArtifacts/ -_Pvt_Extensions/ -ModelManifest.xml - -# ========================= -# Windows detritus -# ========================= - -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Mac desktop service store files -.DS_Store - -# SASS Compiler cache -.sass-cache - -# Visual Studio 2014 CTP -**/*.sln.ide diff --git a/C#/.swagger-codegen-ignore b/C#/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/C#/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/C#/.swagger-codegen/VERSION b/C#/.swagger-codegen/VERSION deleted file mode 100644 index 053a355..0000000 --- a/C#/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.35 \ No newline at end of file diff --git a/C#/.travis.yml b/C#/.travis.yml deleted file mode 100644 index 9ade52d..0000000 --- a/C#/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -# -language: csharp -mono: - - latest -solution: dagshub_api.sln -script: - - /bin/sh ./mono_nunit_test.sh diff --git a/C#/README.md b/C#/README.md deleted file mode 100644 index 1ede481..0000000 --- a/C#/README.md +++ /dev/null @@ -1,188 +0,0 @@ -# dagshub_api - the C# library for the DagsHub API - -This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - -This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - -- API version: 1.0.2 -- SDK version: 1.0.3 -- Build package: io.swagger.codegen.v3.generators.dotnet.CSharpClientCodegen - - -## Frameworks supported -- .NET 4.0 or later -- Windows Phone 7.1 (Mango) - - -## Dependencies -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.2.0 or later - -The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: -``` -Install-Package RestSharp -Install-Package Newtonsoft.Json -Install-Package JsonSubTypes -``` - -NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) - - -## Installation -Run the following command to generate the DLL -- [Mac/Linux] `/bin/sh build.sh` -- [Windows] `build.bat` - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: -```csharp -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; -``` - -## Packaging - -A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. - -This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: - -``` -nuget pack -Build -OutputDirectory out dagshub_api.csproj -``` - -Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. - - -## Getting Started - -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class Example - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer"); - - var apiInstance = new BranchesApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var branch = branch_example; // string | branch of the repository - - try - { - // Get Branch - apiInstance.GetBranch(owner, repo, branch); - } - catch (Exception e) - { - Debug.Print("Exception when calling BranchesApi.GetBranch: " + e.Message ); - } - } - } -} -``` - - -## Documentation for API Endpoints - -All URIs are relative to *https://dagshub.com/api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*BranchesApi* | [**GetBranch**](docs/BranchesApi.md#getbranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -*BranchesApi* | [**ListBranches**](docs/BranchesApi.md#listbranches) | **GET** /repos/{owner}/{repo}/branches | List Branches -*CollaboratorsApi* | [**AddCollaborator**](docs/CollaboratorsApi.md#addcollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -*CollaboratorsApi* | [**GetCollaborators**](docs/CollaboratorsApi.md#getcollaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -*CollaboratorsApi* | [**RemoveCollaborator**](docs/CollaboratorsApi.md#removecollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator -*CommitsApi* | [**GetCommit**](docs/CommitsApi.md#getcommit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit -*ContentApi* | [**GetArchive**](docs/ContentApi.md#getarchive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -*ContentApi* | [**GetContent**](docs/ContentApi.md#getcontent) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -*ContentApi* | [**GetRaw**](docs/ContentApi.md#getraw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -*ContentApi* | [**UploadContent**](docs/ContentApi.md#uploadcontent) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository -*ExperimentsApi* | [**AddExperimentLabel**](docs/ExperimentsApi.md#addexperimentlabel) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -*ExperimentsApi* | [**DeleteExperiment**](docs/ExperimentsApi.md#deleteexperiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -*ExperimentsApi* | [**DeleteExperimentLabel**](docs/ExperimentsApi.md#deleteexperimentlabel) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -*ExperimentsApi* | [**EditExperiment**](docs/ExperimentsApi.md#editexperiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -*ExperimentsApi* | [**GetExperimentMetrics**](docs/ExperimentsApi.md#getexperimentmetrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -*ExperimentsApi* | [**GetExperiments**](docs/ExperimentsApi.md#getexperiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments -*IssuesApi* | [**CreateIssue**](docs/IssuesApi.md#createissue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -*IssuesApi* | [**EditIssue**](docs/IssuesApi.md#editissue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -*IssuesApi* | [**GetIssue**](docs/IssuesApi.md#getissue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -*IssuesApi* | [**ListRepoIssues**](docs/IssuesApi.md#listrepoissues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository -*ReleasesApi* | [**ListReleases**](docs/ReleasesApi.md#listreleases) | **GET** /repos/{owner}/{repo}/releases | List Releases -*RepositoryApi* | [**CreateOrgRepo**](docs/RepositoryApi.md#createorgrepo) | **POST** /org/{orgname}/repos | Create in organization -*RepositoryApi* | [**CreateRepo**](docs/RepositoryApi.md#createrepo) | **POST** /user/repos | Create -*RepositoryApi* | [**GetRepo**](docs/RepositoryApi.md#getrepo) | **GET** /repos/{owner}/{repo} | Get repository information -*RepositoryApi* | [**ListMyRepos**](docs/RepositoryApi.md#listmyrepos) | **GET** /user/repos | List your repositories -*RepositoryApi* | [**ListOrgRepos**](docs/RepositoryApi.md#listorgrepos) | **GET** /orgs/{orgname}/repos | List organization repositories -*RepositoryApi* | [**ListUserRepos**](docs/RepositoryApi.md#listuserrepos) | **GET** /users/{username}/repos | List user repositories -*RepositoryApi* | [**MigrateRepo**](docs/RepositoryApi.md#migraterepo) | **POST** /repos/migrate | Migrate repository -*RepositoryApi* | [**Search**](docs/RepositoryApi.md#search) | **GET** /repos/search | Search repositories -*StorageIntegrationsApi* | [**GetBucketContent**](docs/StorageIntegrationsApi.md#getbucketcontent) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -*StorageIntegrationsApi* | [**GetBucketFile**](docs/StorageIntegrationsApi.md#getbucketfile) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -*StorageIntegrationsApi* | [**GetBuckets**](docs/StorageIntegrationsApi.md#getbuckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository -*UserApi* | [**GetAuthenticatedUser**](docs/UserApi.md#getauthenticateduser) | **GET** /user | Get authenticated user information -*UserApi* | [**GetUser**](docs/UserApi.md#getuser) | **GET** /users/{username} | Get information about a user -*WebhooksApi* | [**CreateHook**](docs/WebhooksApi.md#createhook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -*WebhooksApi* | [**DeleteHook**](docs/WebhooksApi.md#deletehook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -*WebhooksApi* | [**EditHook**](docs/WebhooksApi.md#edithook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -*WebhooksApi* | [**ListHooks**](docs/WebhooksApi.md#listhooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - - -## Documentation for Models - - - [Model.CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) - - [Model.CreateRepo](docs/CreateRepo.md) - - [Model.EditExperimentPost](docs/EditExperimentPost.md) - - [Model.ExperimentKeys](docs/ExperimentKeys.md) - - [Model.File](docs/File.md) - - [Model.Files](docs/Files.md) - - [Model.Files1](docs/Files1.md) - - [Model.HooksIdBody](docs/HooksIdBody.md) - - [Model.Integration](docs/Integration.md) - - [Model.IntegrationInner](docs/IntegrationInner.md) - - [Model.Issue](docs/Issue.md) - - [Model.IssueAssignee](docs/IssueAssignee.md) - - [Model.IssueLabels](docs/IssueLabels.md) - - [Model.IssueMilestone](docs/IssueMilestone.md) - - [Model.Issues](docs/Issues.md) - - [Model.Labels](docs/Labels.md) - - [Model.MigrateRepo](docs/MigrateRepo.md) - - [Model.PatchIssue](docs/PatchIssue.md) - - [Model.PostIssue](docs/PostIssue.md) - - [Model.PutFile](docs/PutFile.md) - - [Model.RepoHooksBody](docs/RepoHooksBody.md) - - [Model.State](docs/State.md) - - [Model.User](docs/User.md) - - [Model.WebhookConfig](docs/WebhookConfig.md) - - [Model.WebhookEvents](docs/WebhookEvents.md) - - -## Documentation for Authorization - - -### basicAuth - -- **Type**: HTTP basic authentication - - -### tokenAuth - -- **Type**: API key -- **API key parameter name**: token -- **Location**: URL query string - diff --git a/C#/build.bat b/C#/build.bat deleted file mode 100644 index f4498e8..0000000 --- a/C#/build.bat +++ /dev/null @@ -1,17 +0,0 @@ -:: Generated by: https://github.com/swagger-api/swagger-codegen.git -:: - -@echo off - -SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319 - -if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '.\nuget.exe')" -.\nuget.exe install src\dagshub_api\packages.config -o packages - -if not exist ".\bin" mkdir bin - -copy packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll -copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll -%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\dagshub_api.dll /recurse:src\dagshub_api\*.cs /doc:bin\dagshub_api.xml - diff --git a/C#/build.sh b/C#/build.sh deleted file mode 100644 index ed64086..0000000 --- a/C#/build.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -# - -frameworkVersion=net45 - -# sdk must match installed framworks under PREFIX/lib/mono/[value] -sdk=4.5.2-api - -# langversion refers to C# language features. see man mcs for details. -langversion=${sdk} -nuget_cmd=nuget - -# Match against our known SDK possibilities -case "${sdk}" in - 4) - langversion=4 - ;; - 4.5*) - langversion=5 - ;; - 4.6*) - langversion=6 - ;; - 4.7*) - langversion=7 # ignoring 7.1 for now. - ;; - *) - langversion=6 - ;; -esac - -echo "[INFO] Target framework: ${frameworkVersion}" - -if ! type nuget &>/dev/null; then - echo "[INFO] Download nuget and packages" - wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; - nuget_cmd="mono nuget.exe" -fi - -mozroots --import --sync -${nuget_cmd} install src/dagshub_api/packages.config -o packages; - -echo "[INFO] Copy DLLs to the 'bin' folder" -mkdir -p bin; -cp packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; -cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.2.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll - -echo "[INFO] Run 'mcs' to build bin/dagshub_api.dll" -mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ -bin/RestSharp.dll,\ -System.ComponentModel.DataAnnotations.dll,\ -System.Runtime.Serialization.dll \ --target:library \ --out:bin/dagshub_api.dll \ --recurse:'src/dagshub_api/*.cs' \ --doc:bin/dagshub_api.xml \ --platform:anycpu - -if [ $? -ne 0 ] -then - echo "[ERROR] Compilation failed with exit code $?" - exit 1 -else - echo "[INFO] bin/dagshub_api.dll was created successfully" -fi diff --git a/C#/dagshub_api.sln b/C#/dagshub_api.sln deleted file mode 100644 index 1485d6a..0000000 --- a/C#/dagshub_api.sln +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dagshub_api", "src\dagshub_api\dagshub_api.csproj", "{BB7FDD9F-1657-4C83-B5E3-E416BEC4C698}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dagshub_api.Test", "src\dagshub_api.Test\dagshub_api.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/C#/docs/BranchesApi.md b/C#/docs/BranchesApi.md deleted file mode 100644 index 7bc259b..0000000 --- a/C#/docs/BranchesApi.md +++ /dev/null @@ -1,145 +0,0 @@ -# dagshub_api.Api.BranchesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetBranch**](BranchesApi.md#getbranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -[**ListBranches**](BranchesApi.md#listbranches) | **GET** /repos/{owner}/{repo}/branches | List Branches - - -# **GetBranch** -> void GetBranch (string owner, string repo, string branch) - -Get Branch - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetBranchExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new BranchesApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var branch = branch_example; // string | branch of the repository - - try - { - // Get Branch - apiInstance.GetBranch(owner, repo, branch); - } - catch (Exception e) - { - Debug.Print("Exception when calling BranchesApi.GetBranch: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **branch** | **string**| branch of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListBranches** -> void ListBranches (string owner, string repo) - -List Branches - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class ListBranchesExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new BranchesApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - - try - { - // List Branches - apiInstance.ListBranches(owner, repo); - } - catch (Exception e) - { - Debug.Print("Exception when calling BranchesApi.ListBranches: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/CollaboratorsApi.md b/C#/docs/CollaboratorsApi.md deleted file mode 100644 index 8d20a57..0000000 --- a/C#/docs/CollaboratorsApi.md +++ /dev/null @@ -1,217 +0,0 @@ -# dagshub_api.Api.CollaboratorsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddCollaborator**](CollaboratorsApi.md#addcollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -[**GetCollaborators**](CollaboratorsApi.md#getcollaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -[**RemoveCollaborator**](CollaboratorsApi.md#removecollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator - - -# **AddCollaborator** -> void AddCollaborator (string owner, string repo, string collaborator, CollaboratorsCollaboratorBody body = null) - -Add user as a collaborator - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class AddCollaboratorExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new CollaboratorsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var collaborator = collaborator_example; // string | collaborator username - var body = new CollaboratorsCollaboratorBody(); // CollaboratorsCollaboratorBody | (optional) - - try - { - // Add user as a collaborator - apiInstance.AddCollaborator(owner, repo, collaborator, body); - } - catch (Exception e) - { - Debug.Print("Exception when calling CollaboratorsApi.AddCollaborator: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **collaborator** | **string**| collaborator username | - **body** | [**CollaboratorsCollaboratorBody**](CollaboratorsCollaboratorBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetCollaborators** -> void GetCollaborators (string owner, string repo) - -Get collaborators - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetCollaboratorsExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new CollaboratorsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - - try - { - // Get collaborators - apiInstance.GetCollaborators(owner, repo); - } - catch (Exception e) - { - Debug.Print("Exception when calling CollaboratorsApi.GetCollaborators: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **RemoveCollaborator** -> void RemoveCollaborator (string owner, string repo, string collaborator) - -Delete collaborator - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class RemoveCollaboratorExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new CollaboratorsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var collaborator = collaborator_example; // string | collaborator username - - try - { - // Delete collaborator - apiInstance.RemoveCollaborator(owner, repo, collaborator); - } - catch (Exception e) - { - Debug.Print("Exception when calling CollaboratorsApi.RemoveCollaborator: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **collaborator** | **string**| collaborator username | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/CollaboratorsCollaboratorBody.md b/C#/docs/CollaboratorsCollaboratorBody.md deleted file mode 100644 index 07d13ed..0000000 --- a/C#/docs/CollaboratorsCollaboratorBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# dagshub_api.Model.CollaboratorsCollaboratorBody -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Permission** | **string** | The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. | [optional] [default to "write"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/CommitsApi.md b/C#/docs/CommitsApi.md deleted file mode 100644 index 16b2a87..0000000 --- a/C#/docs/CommitsApi.md +++ /dev/null @@ -1,77 +0,0 @@ -# dagshub_api.Api.CommitsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetCommit**](CommitsApi.md#getcommit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit - - -# **GetCommit** -> void GetCommit (string owner, string repo, string sha) - -Get a single commit - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetCommitExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new CommitsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var sha = sha_example; // string | a SHA1 of a commit - - try - { - // Get a single commit - apiInstance.GetCommit(owner, repo, sha); - } - catch (Exception e) - { - Debug.Print("Exception when calling CommitsApi.GetCommit: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **sha** | **string**| a SHA1 of a commit | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/ContentApi.md b/C#/docs/ContentApi.md deleted file mode 100644 index dc059c6..0000000 --- a/C#/docs/ContentApi.md +++ /dev/null @@ -1,318 +0,0 @@ -# dagshub_api.Api.ContentApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetArchive**](ContentApi.md#getarchive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -[**GetContent**](ContentApi.md#getcontent) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -[**GetRaw**](ContentApi.md#getraw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -[**UploadContent**](ContentApi.md#uploadcontent) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository - - -# **GetArchive** -> void GetArchive (string owner, string repo, string _ref, string format) - -Download archive - -This method returns archive by given format. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetArchiveExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ContentApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var _ref = _ref_example; // string | The name of the commit/branch/tag - var format = format_example; // string | The format of archive, either .zip or .tar.gz - - try - { - // Download archive - apiInstance.GetArchive(owner, repo, _ref, format); - } - catch (Exception e) - { - Debug.Print("Exception when calling ContentApi.GetArchive: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **_ref** | **string**| The name of the commit/branch/tag | - **format** | **string**| The format of archive, either .zip or .tar.gz | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetContent** -> Files GetContent (string owner, string repo, string branch, string path, bool? includeSize = null) - -List data in a repository folder - -List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetContentExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ContentApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var branch = branch_example; // string | branch of the repository - var path = path_example; // string | path of a folder in the repository - var includeSize = true; // bool? | (optional) (default to false) - - try - { - // List data in a repository folder - Files result = apiInstance.GetContent(owner, repo, branch, path, includeSize); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling ContentApi.GetContent: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **branch** | **string**| branch of the repository | - **path** | **string**| path of a folder in the repository | - **includeSize** | **bool?**| | [optional] [default to false] - -### Return type - -[**Files**](Files.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetRaw** -> void GetRaw (string owner, string repo, string _ref, string path) - -Download raw content - -This method returns the raw content of a file. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetRawExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ContentApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var _ref = _ref_example; // string | The name of the commit/branch/tag - var path = path_example; // string | The content path - - try - { - // Download raw content - apiInstance.GetRaw(owner, repo, _ref, path); - } - catch (Exception e) - { - Debug.Print("Exception when calling ContentApi.GetRaw: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **_ref** | **string**| The name of the commit/branch/tag | - **path** | **string**| The content path | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UploadContent** -> void UploadContent (string owner, string repo, string branch, string path, string commitSummary = null, string commitMessage = null, string commitChoice = null, string lastCommit = null, string newBranchName = null, string versioning = null, string files = null) - -Upload data to a repository - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class UploadContentExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ContentApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var branch = branch_example; // string | branch of the repository - var path = path_example; // string | path of a folder in the repository - var commitSummary = commitSummary_example; // string | (optional) - var commitMessage = commitMessage_example; // string | (optional) - var commitChoice = commitChoice_example; // string | (optional) - var lastCommit = lastCommit_example; // string | (optional) - var newBranchName = newBranchName_example; // string | (optional) - var versioning = versioning_example; // string | (optional) - var files = files_example; // string | (optional) - - try - { - // Upload data to a repository - apiInstance.UploadContent(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files); - } - catch (Exception e) - { - Debug.Print("Exception when calling ContentApi.UploadContent: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **branch** | **string**| branch of the repository | - **path** | **string**| path of a folder in the repository | - **commitSummary** | **string**| | [optional] - **commitMessage** | **string**| | [optional] - **commitChoice** | **string**| | [optional] - **lastCommit** | **string**| | [optional] - **newBranchName** | **string**| | [optional] - **versioning** | **string**| | [optional] - **files** | **string**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/CreateRepo.md b/C#/docs/CreateRepo.md deleted file mode 100644 index 80f428f..0000000 --- a/C#/docs/CreateRepo.md +++ /dev/null @@ -1,16 +0,0 @@ -# dagshub_api.Model.CreateRepo -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | name of the repository | -**Description** | **string** | A short description of the repository | [optional] -**_Private** | **bool?** | Either true to create a private repository, or false to create a public one. | [optional] [default to false] -**AutoInit** | **bool?** | Pass true to create an initial commit with README, .gitignore and LICENSE. | [optional] [default to false] -**ProjectTemplate** | **string** | Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. | [optional] -**Gitignores** | **string** | Desired language .gitignore templates to apply. Use the name of the templates. | [optional] -**License** | **string** | Desired LICENSE template to apply. Use the name of the template. | [optional] -**Readme** | **string** | Desired README template to apply. Use the name of the template. | [optional] [default to "Default"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/EditExperimentPost.md b/C#/docs/EditExperimentPost.md deleted file mode 100644 index a68c638..0000000 --- a/C#/docs/EditExperimentPost.md +++ /dev/null @@ -1,9 +0,0 @@ -# dagshub_api.Model.EditExperimentPost -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/State.md b/C#/docs/ExperimentMetricsResponse.md similarity index 85% rename from Go/docs/State.md rename to C#/docs/ExperimentMetricsResponse.md index 735175c..b9d1508 100644 --- a/Go/docs/State.md +++ b/C#/docs/ExperimentMetricsResponse.md @@ -1,6 +1,6 @@ -# State - +# dagshub_api.Model.ExperimentMetricsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/C#/docs/ExperimentsApi.md b/C#/docs/ExperimentsApi.md deleted file mode 100644 index beccdc4..0000000 --- a/C#/docs/ExperimentsApi.md +++ /dev/null @@ -1,437 +0,0 @@ -# dagshub_api.Api.ExperimentsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddExperimentLabel**](ExperimentsApi.md#addexperimentlabel) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -[**DeleteExperiment**](ExperimentsApi.md#deleteexperiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -[**DeleteExperimentLabel**](ExperimentsApi.md#deleteexperimentlabel) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -[**EditExperiment**](ExperimentsApi.md#editexperiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -[**GetExperimentMetrics**](ExperimentsApi.md#getexperimentmetrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -[**GetExperiments**](ExperimentsApi.md#getexperiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments - - -# **AddExperimentLabel** -> void AddExperimentLabel (string owner, string repo, string experimentKey, string experimentLabel) - -Add label to experiment - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class AddExperimentLabelExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ExperimentsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var experimentKey = experimentKey_example; // string | a valid experiment key - var experimentLabel = experimentLabel_example; // string | A label for the experiment, max 128 characters. - - try - { - // Add label to experiment - apiInstance.AddExperimentLabel(owner, repo, experimentKey, experimentLabel); - } - catch (Exception e) - { - Debug.Print("Exception when calling ExperimentsApi.AddExperimentLabel: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **experimentKey** | **string**| a valid experiment key | - **experimentLabel** | **string**| A label for the experiment, max 128 characters. | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **DeleteExperiment** -> void DeleteExperiment (string owner, string repo, string experimentKey) - -Delete experiment - -Support both git and MLflow experiments - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class DeleteExperimentExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ExperimentsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var experimentKey = experimentKey_example; // string | a valid experiment key - - try - { - // Delete experiment - apiInstance.DeleteExperiment(owner, repo, experimentKey); - } - catch (Exception e) - { - Debug.Print("Exception when calling ExperimentsApi.DeleteExperiment: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **experimentKey** | **string**| a valid experiment key | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **DeleteExperimentLabel** -> void DeleteExperimentLabel (string owner, string repo, string experimentKey, string experimentLabel) - -Delete experiment label - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class DeleteExperimentLabelExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ExperimentsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var experimentKey = experimentKey_example; // string | a valid experiment key - var experimentLabel = experimentLabel_example; // string | A label for the experiment, max 128 characters. - - try - { - // Delete experiment label - apiInstance.DeleteExperimentLabel(owner, repo, experimentKey, experimentLabel); - } - catch (Exception e) - { - Debug.Print("Exception when calling ExperimentsApi.DeleteExperimentLabel: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **experimentKey** | **string**| a valid experiment key | - **experimentLabel** | **string**| A label for the experiment, max 128 characters. | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **EditExperiment** -> void EditExperiment (string owner, string repo, string experimentKey, EditExperimentPost body = null) - -Edit experiment info - -Edit experiment info, currently supports just changing experiment name. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class EditExperimentExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ExperimentsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var experimentKey = experimentKey_example; // string | a valid experiment key - var body = new EditExperimentPost(); // EditExperimentPost | (optional) - - try - { - // Edit experiment info - apiInstance.EditExperiment(owner, repo, experimentKey, body); - } - catch (Exception e) - { - Debug.Print("Exception when calling ExperimentsApi.EditExperiment: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **experimentKey** | **string**| a valid experiment key | - **body** | [**EditExperimentPost**](EditExperimentPost.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetExperimentMetrics** -> void GetExperimentMetrics (string owner, string repo, ExperimentKeys body = null) - -Get experiment metrics for experiment - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetExperimentMetricsExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ExperimentsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var body = new ExperimentKeys(); // ExperimentKeys | (optional) - - try - { - // Get experiment metrics for experiment - apiInstance.GetExperimentMetrics(owner, repo, body); - } - catch (Exception e) - { - Debug.Print("Exception when calling ExperimentsApi.GetExperimentMetrics: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **body** | [**ExperimentKeys**](ExperimentKeys.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetExperiments** -> void GetExperiments (string owner, string repo) - -List Experiments - -Get a list of experiments in the given repository - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetExperimentsExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ExperimentsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - - try - { - // List Experiments - apiInstance.GetExperiments(owner, repo); - } - catch (Exception e) - { - Debug.Print("Exception when calling ExperimentsApi.GetExperiments: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/ExperimentsResponse.md b/C#/docs/ExperimentsResponse.md new file mode 100644 index 0000000..24d4e43 --- /dev/null +++ b/C#/docs/ExperimentsResponse.md @@ -0,0 +1,11 @@ +# dagshub_api.Model.ExperimentsResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Experiments** | [**Dictionary<string, ComponentsschemasExperimentYaml>**](ComponentsschemasExperimentYaml.md) | Map of experiment ID to experiment details | [optional] +**IsEditor** | **bool?** | Whether the authenticated user can edit experiments in this repo | [optional] +**NextPageToken** | **string** | Pagination token for the next page of results (empty string when no more pages) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/C#/docs/File.md b/C#/docs/File.md deleted file mode 100644 index d4aeaf9..0000000 --- a/C#/docs/File.md +++ /dev/null @@ -1,15 +0,0 @@ -# dagshub_api.Model.File -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | | [optional] -**Type** | **string** | | [optional] -**Size** | **long?** | | [optional] -**Hash** | **string** | | [optional] -**Versioning** | **string** | | [optional] -**DownloadUrl** | **string** | | [optional] -**ContentUrl** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/Files1.md b/C#/docs/Files1.md index ce8739d..f8cfe16 100644 --- a/C#/docs/Files1.md +++ b/C#/docs/Files1.md @@ -3,9 +3,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Entries** | **List<System.IO.Stream>** | | [optional] -**Limit** | **int?** | | [optional] -**NextToken** | **string** | | [optional] +**Entries** | [**List<ComponentsschemasFileYaml>**](ComponentsschemasFileYaml.md) | | [optional] +**NextToken** | **string** | Next token to continue pagination from | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/C#/docs/HooksIdBody.md b/C#/docs/HooksIdBody.md deleted file mode 100644 index a22aa51..0000000 --- a/C#/docs/HooksIdBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# dagshub_api.Model.HooksIdBody -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [**WebhookConfig**](WebhookConfig.md) | | [optional] -**Events** | [**WebhookEvents**](WebhookEvents.md) | | [optional] -**Active** | **bool?** | Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/IntegrationInner.md b/C#/docs/IntegrationInner.md deleted file mode 100644 index 4e93869..0000000 --- a/C#/docs/IntegrationInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# dagshub_api.Model.IntegrationInner -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name/path of the bucket | [optional] -**Protocol** | **string** | Protocol used by the integration | [optional] -**ListPath** | **string** | URL to list the root of this bucket | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/Issue.md b/C#/docs/Issue.md index 49f208a..e392dc9 100644 --- a/C#/docs/Issue.md +++ b/C#/docs/Issue.md @@ -3,20 +3,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int?** | | [optional] -**Number** | **int?** | | [optional] -**User** | [**User**](User.md) | | [optional] -**Title** | **string** | | -**Body** | **string** | | -**Labels** | [**List<IssueLabels>**](IssueLabels.md) | | -**Milestone** | [**IssueMilestone**](IssueMilestone.md) | | -**Assignee** | [**IssueAssignee**](IssueAssignee.md) | | +**Id** | **long?** | | [optional] +**Number** | **long?** | Issue index within the repository | [optional] +**User** | [**ComponentsschemasUserYaml**](ComponentsschemasUserYaml.md) | | [optional] +**Title** | **string** | | [optional] +**Body** | **string** | | [optional] +**Labels** | **List<Object>** | | [optional] +**Milestone** | **Object** | | [optional] +**Assignee** | [**ComponentsschemasUserYaml**](ComponentsschemasUserYaml.md) | | [optional] **State** | **string** | | [optional] **Comments** | **int?** | | [optional] -**CreatedAt** | **string** | | [optional] -**UpdatedAt** | **string** | | [optional] -**PullRequest** | **Object** | | [optional] -**Closed** | **bool?** | | +**CreatedAt** | **DateTime?** | | [optional] +**UpdatedAt** | **DateTime?** | | [optional] +**PullRequest** | **Object** | Present when the issue is associated with a pull request | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/C#/docs/IssueAssignee.md b/C#/docs/IssueAssignee.md deleted file mode 100644 index e94ee3f..0000000 --- a/C#/docs/IssueAssignee.md +++ /dev/null @@ -1,13 +0,0 @@ -# dagshub_api.Model.IssueAssignee -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int?** | | [optional] -**Login** | **string** | | [optional] -**FullName** | **string** | | [optional] -**AvatarUrl** | **string** | | [optional] -**Username** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/IssueLabels.md b/C#/docs/IssueLabels.md deleted file mode 100644 index 388d3e6..0000000 --- a/C#/docs/IssueLabels.md +++ /dev/null @@ -1,12 +0,0 @@ -# dagshub_api.Model.IssueLabels -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int?** | | [optional] -**Name** | **string** | | [optional] -**Color** | **string** | | [optional] -**Url** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/IssueMilestone.md b/C#/docs/IssueMilestone.md deleted file mode 100644 index bfc4a5e..0000000 --- a/C#/docs/IssueMilestone.md +++ /dev/null @@ -1,16 +0,0 @@ -# dagshub_api.Model.IssueMilestone -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int?** | | [optional] -**Title** | **string** | | [optional] -**Description** | **string** | | [optional] -**State** | **string** | | [optional] -**OpenIssues** | **int?** | | [optional] -**ClosedIssues** | **int?** | | [optional] -**ClosedAt** | **string** | | [optional] -**DueOn** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/IssuesApi.md b/C#/docs/IssuesApi.md deleted file mode 100644 index bb91518..0000000 --- a/C#/docs/IssuesApi.md +++ /dev/null @@ -1,295 +0,0 @@ -# dagshub_api.Api.IssuesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateIssue**](IssuesApi.md#createissue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -[**EditIssue**](IssuesApi.md#editissue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -[**GetIssue**](IssuesApi.md#getissue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -[**ListRepoIssues**](IssuesApi.md#listrepoissues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository - - -# **CreateIssue** -> Issue CreateIssue (string owner, string repo, PostIssue body = null) - -Create an issue - -Any user with read access to a repository can create an issue. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class CreateIssueExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new IssuesApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var body = new PostIssue(); // PostIssue | (optional) - - try - { - // Create an issue - Issue result = apiInstance.CreateIssue(owner, repo, body); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling IssuesApi.CreateIssue: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **body** | [**PostIssue**](PostIssue.md)| | [optional] - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **EditIssue** -> Issue EditIssue (string owner, string repo, PatchIssue body = null) - -Edit an issue - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class EditIssueExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new IssuesApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var body = new PatchIssue(); // PatchIssue | (optional) - - try - { - // Edit an issue - Issue result = apiInstance.EditIssue(owner, repo, body); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling IssuesApi.EditIssue: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **body** | [**PatchIssue**](PatchIssue.md)| | [optional] - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetIssue** -> Issue GetIssue (string owner, string repo, int? index) - -Get a single issue - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetIssueExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new IssuesApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var index = 56; // int? | the index of an issue or a pull request - - try - { - // Get a single issue - Issue result = apiInstance.GetIssue(owner, repo, index); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling IssuesApi.GetIssue: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **index** | **int?**| the index of an issue or a pull request | - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListRepoIssues** -> Issues ListRepoIssues (string owner, string repo) - -List issues for a repository - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class ListRepoIssuesExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new IssuesApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - - try - { - // List issues for a repository - Issues result = apiInstance.ListRepoIssues(owner, repo); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling IssuesApi.ListRepoIssues: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - -[**Issues**](Issues.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/Labels.md b/C#/docs/Labels.md deleted file mode 100644 index 7ed8126..0000000 --- a/C#/docs/Labels.md +++ /dev/null @@ -1,8 +0,0 @@ -# dagshub_api.Model.Labels -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/MigrateRepo.md b/C#/docs/MigrateRepo.md deleted file mode 100644 index 658c04b..0000000 --- a/C#/docs/MigrateRepo.md +++ /dev/null @@ -1,16 +0,0 @@ -# dagshub_api.Model.MigrateRepo -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CloneAddr** | **string** | Remote Git address (HTTP/HTTPS URL or local path) | -**AuthUsername** | **string** | Authorization username | [optional] -**AuthPassword** | **string** | Authorization password | [optional] -**UserId** | **int?** | User ID who takes ownership of this repository | -**RepoName** | **string** | Name of the repository | [optional] -**Mirror** | **bool?** | Repository will be a mirror (connected repository). | [optional] [default to false] -**Visibility** | **string** | Repository will be private or public. | [optional] [default to false] -**Description** | **string** | Description of the repository | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/PatchIssue.md b/C#/docs/PatchIssue.md index 9b939e7..c22ede9 100644 --- a/C#/docs/PatchIssue.md +++ b/C#/docs/PatchIssue.md @@ -3,11 +3,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Title** | **string** | | [optional] -**Body** | **string** | | [optional] -**Assignee** | **string** | | [optional] -**Milestone** | **int?** | | [optional] -**State** | **State** | | [optional] +**Title** | [**ComponentsschemasTitleYaml**](ComponentsschemasTitleYaml.md) | | [optional] +**Body** | [**ComponentsschemasBodyYaml**](ComponentsschemasBodyYaml.md) | | [optional] +**Assignee** | [**ComponentsschemasAssigneeYaml**](ComponentsschemasAssigneeYaml.md) | | [optional] +**Milestone** | [**ComponentsschemasMilestoneYaml**](ComponentsschemasMilestoneYaml.md) | | [optional] +**State** | [**ComponentsschemasStateYaml**](ComponentsschemasStateYaml.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/C#/docs/PostIssue.md b/C#/docs/PostIssue.md index be62b05..6f5d254 100644 --- a/C#/docs/PostIssue.md +++ b/C#/docs/PostIssue.md @@ -3,12 +3,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Title** | **string** | | [optional] -**Body** | **string** | | [optional] -**Assignee** | **string** | | [optional] -**Milestone** | **int?** | | [optional] -**Labels** | [**Labels**](Labels.md) | | [optional] -**Closed** | **bool?** | | [optional] +**Title** | [**ComponentsschemasTitleYaml**](ComponentsschemasTitleYaml.md) | | [optional] +**Body** | [**ComponentsschemasBodyYaml**](ComponentsschemasBodyYaml.md) | | [optional] +**Assignee** | [**ComponentsschemasAssigneeYaml**](ComponentsschemasAssigneeYaml.md) | | [optional] +**Milestone** | [**ComponentsschemasMilestoneYaml**](ComponentsschemasMilestoneYaml.md) | | [optional] +**Labels** | [**ComponentsschemasLabelsYaml**](ComponentsschemasLabelsYaml.md) | | [optional] +**Closed** | [**ComponentsschemasClosedYaml**](ComponentsschemasClosedYaml.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/C#/docs/ReleasesApi.md b/C#/docs/ReleasesApi.md deleted file mode 100644 index e0ea30f..0000000 --- a/C#/docs/ReleasesApi.md +++ /dev/null @@ -1,75 +0,0 @@ -# dagshub_api.Api.ReleasesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListReleases**](ReleasesApi.md#listreleases) | **GET** /repos/{owner}/{repo}/releases | List Releases - - -# **ListReleases** -> void ListReleases (string owner, string repo) - -List Releases - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class ListReleasesExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new ReleasesApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - - try - { - // List Releases - apiInstance.ListReleases(owner, repo); - } - catch (Exception e) - { - Debug.Print("Exception when calling ReleasesApi.ListReleases: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/RepoHooksBody.md b/C#/docs/RepoHooksBody.md deleted file mode 100644 index 6ea1ce0..0000000 --- a/C#/docs/RepoHooksBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# dagshub_api.Model.RepoHooksBody -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | The type of webhook | -**Config** | [**WebhookConfig**](WebhookConfig.md) | | -**Events** | [**WebhookEvents**](WebhookEvents.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/RepositoryApi.md b/C#/docs/RepositoryApi.md deleted file mode 100644 index 7337e96..0000000 --- a/C#/docs/RepositoryApi.md +++ /dev/null @@ -1,555 +0,0 @@ -# dagshub_api.Api.RepositoryApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateOrgRepo**](RepositoryApi.md#createorgrepo) | **POST** /org/{orgname}/repos | Create in organization -[**CreateRepo**](RepositoryApi.md#createrepo) | **POST** /user/repos | Create -[**GetRepo**](RepositoryApi.md#getrepo) | **GET** /repos/{owner}/{repo} | Get repository information -[**ListMyRepos**](RepositoryApi.md#listmyrepos) | **GET** /user/repos | List your repositories -[**ListOrgRepos**](RepositoryApi.md#listorgrepos) | **GET** /orgs/{orgname}/repos | List organization repositories -[**ListUserRepos**](RepositoryApi.md#listuserrepos) | **GET** /users/{username}/repos | List user repositories -[**MigrateRepo**](RepositoryApi.md#migraterepo) | **POST** /repos/migrate | Migrate repository -[**Search**](RepositoryApi.md#search) | **GET** /repos/search | Search repositories - - -# **CreateOrgRepo** -> void CreateOrgRepo (string orgname, CreateRepo body = null) - -Create in organization - -Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class CreateOrgRepoExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new RepositoryApi(); - var orgname = orgname_example; // string | A DagsHub organization name - var body = new CreateRepo(); // CreateRepo | (optional) - - try - { - // Create in organization - apiInstance.CreateOrgRepo(orgname, body); - } - catch (Exception e) - { - Debug.Print("Exception when calling RepositoryApi.CreateOrgRepo: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgname** | **string**| A DagsHub organization name | - **body** | [**CreateRepo**](CreateRepo.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **CreateRepo** -> void CreateRepo (CreateRepo body = null) - -Create - -Create a new repository for the authenticated user. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class CreateRepoExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new RepositoryApi(); - var body = new CreateRepo(); // CreateRepo | (optional) - - try - { - // Create - apiInstance.CreateRepo(body); - } - catch (Exception e) - { - Debug.Print("Exception when calling RepositoryApi.CreateRepo: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateRepo**](CreateRepo.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetRepo** -> void GetRepo (string owner, string repo) - -Get repository information - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetRepoExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new RepositoryApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - - try - { - // Get repository information - apiInstance.GetRepo(owner, repo); - } - catch (Exception e) - { - Debug.Print("Exception when calling RepositoryApi.GetRepo: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListMyRepos** -> Object ListMyRepos () - -List your repositories - -List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class ListMyReposExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new RepositoryApi(); - - try - { - // List your repositories - Object result = apiInstance.ListMyRepos(); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling RepositoryApi.ListMyRepos: " + e.Message ); - } - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**Object** - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListOrgRepos** -> void ListOrgRepos (string orgname) - -List organization repositories - -List repositories that are accessible to the authenticated user. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class ListOrgReposExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new RepositoryApi(); - var orgname = orgname_example; // string | A DagsHub organization name - - try - { - // List organization repositories - apiInstance.ListOrgRepos(orgname); - } - catch (Exception e) - { - Debug.Print("Exception when calling RepositoryApi.ListOrgRepos: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgname** | **string**| A DagsHub organization name | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListUserRepos** -> void ListUserRepos (string username) - -List user repositories - -List public repositories for the specified user. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class ListUserReposExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new RepositoryApi(); - var username = username_example; // string | A DagsHub username or organization name - - try - { - // List user repositories - apiInstance.ListUserRepos(username); - } - catch (Exception e) - { - Debug.Print("Exception when calling RepositoryApi.ListUserRepos: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| A DagsHub username or organization name | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **MigrateRepo** -> void MigrateRepo (MigrateRepo body = null) - -Migrate repository - -Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class MigrateRepoExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new RepositoryApi(); - var body = new MigrateRepo(); // MigrateRepo | (optional) - - try - { - // Migrate repository - apiInstance.MigrateRepo(body); - } - catch (Exception e) - { - Debug.Print("Exception when calling RepositoryApi.MigrateRepo: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**MigrateRepo**](MigrateRepo.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **Search** -> Object Search (string q, int? uid = null, int? limit = null, int? page = null) - -Search repositories - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class SearchExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new RepositoryApi(); - var q = q_example; // string | - var uid = 56; // int? | User ID to specify search whose repositories. Default is 0 and search all repositories (optional) (default to 0) - var limit = 56; // int? | Maximum number of repositories in search results. (optional) (default to 10) - var page = 56; // int? | Page number. Default is 1. (optional) (default to 1) - - try - { - // Search repositories - Object result = apiInstance.Search(q, uid, limit, page); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling RepositoryApi.Search: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **q** | **string**| | - **uid** | **int?**| User ID to specify search whose repositories. Default is 0 and search all repositories | [optional] [default to 0] - **limit** | **int?**| Maximum number of repositories in search results. | [optional] [default to 10] - **page** | **int?**| Page number. Default is 1. | [optional] [default to 1] - -### Return type - -**Object** - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/StorageIntegrationsApi.md b/C#/docs/StorageIntegrationsApi.md deleted file mode 100644 index c300e3a..0000000 --- a/C#/docs/StorageIntegrationsApi.md +++ /dev/null @@ -1,231 +0,0 @@ -# dagshub_api.Api.StorageIntegrationsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetBucketContent**](StorageIntegrationsApi.md#getbucketcontent) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -[**GetBucketFile**](StorageIntegrationsApi.md#getbucketfile) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -[**GetBuckets**](StorageIntegrationsApi.md#getbuckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository - - -# **GetBucketContent** -> Files1 GetBucketContent (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null) - -List contents in the path - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetBucketContentExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new StorageIntegrationsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var protocol = protocol_example; // string | protocol of the storage integration - var bucket = bucket_example; // string | name and prefix of the bucket integration - var path = path_example; // string | path of a folder in the repository - var includeSize = true; // bool? | (optional) (default to false) - var limit = 56; // int? | Maximum amount of items to return (optional) (default to 100) - var fromToken = fromToken_example; // string | Token, from which to continue iteration (optional) - - try - { - // List contents in the path - Files1 result = apiInstance.GetBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling StorageIntegrationsApi.GetBucketContent: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **protocol** | **string**| protocol of the storage integration | - **bucket** | **string**| name and prefix of the bucket integration | - **path** | **string**| path of a folder in the repository | - **includeSize** | **bool?**| | [optional] [default to false] - **limit** | **int?**| Maximum amount of items to return | [optional] [default to 100] - **fromToken** | **string**| Token, from which to continue iteration | [optional] - -### Return type - -[**Files1**](Files1.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetBucketFile** -> void GetBucketFile (string owner, string repo, string protocol, string bucket, string path) - -Get file in the bucket - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetBucketFileExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new StorageIntegrationsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var protocol = protocol_example; // string | protocol of the storage integration - var bucket = bucket_example; // string | name and prefix of the bucket integration - var path = path_example; // string | The content path - - try - { - // Get file in the bucket - apiInstance.GetBucketFile(owner, repo, protocol, bucket, path); - } - catch (Exception e) - { - Debug.Print("Exception when calling StorageIntegrationsApi.GetBucketFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **protocol** | **string**| protocol of the storage integration | - **bucket** | **string**| name and prefix of the bucket integration | - **path** | **string**| The content path | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetBuckets** -> Integration GetBuckets (string owner, string repo) - -List integrated storages in the repository - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetBucketsExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new StorageIntegrationsApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - - try - { - // List integrated storages in the repository - Integration result = apiInstance.GetBuckets(owner, repo); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling StorageIntegrationsApi.GetBuckets: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - -[**Integration**](Integration.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/User.md b/C#/docs/User.md index d09c5af..16a02bd 100644 --- a/C#/docs/User.md +++ b/C#/docs/User.md @@ -3,11 +3,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int?** | | [optional] +**Id** | **long?** | | [optional] **Login** | **string** | | [optional] +**Username** | **string** | Alias for login (legacy compatibility) | [optional] **FullName** | **string** | | [optional] **AvatarUrl** | **string** | | [optional] -**Username** | **string** | | [optional] +**PublicEmail** | **string** | | [optional] +**Website** | **string** | | [optional] +**Company** | **string** | | [optional] +**Description** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/C#/docs/UserApi.md b/C#/docs/UserApi.md deleted file mode 100644 index 636edd7..0000000 --- a/C#/docs/UserApi.md +++ /dev/null @@ -1,135 +0,0 @@ -# dagshub_api.Api.UserApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAuthenticatedUser**](UserApi.md#getauthenticateduser) | **GET** /user | Get authenticated user information -[**GetUser**](UserApi.md#getuser) | **GET** /users/{username} | Get information about a user - - -# **GetAuthenticatedUser** -> void GetAuthenticatedUser () - -Get authenticated user information - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetAuthenticatedUserExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new UserApi(); - - try - { - // Get authenticated user information - apiInstance.GetAuthenticatedUser(); - } - catch (Exception e) - { - Debug.Print("Exception when calling UserApi.GetAuthenticatedUser: " + e.Message ); - } - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetUser** -> void GetUser (string username) - -Get information about a user - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class GetUserExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new UserApi(); - var username = username_example; // string | A DagsHub username or organization name - - try - { - // Get information about a user - apiInstance.GetUser(username); - } - catch (Exception e) - { - Debug.Print("Exception when calling UserApi.GetUser: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| A DagsHub username or organization name | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/WebhookConfig.md b/C#/docs/WebhookConfig.md deleted file mode 100644 index e3d3b85..0000000 --- a/C#/docs/WebhookConfig.md +++ /dev/null @@ -1,11 +0,0 @@ -# dagshub_api.Model.WebhookConfig -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Url** | **string** | A string defining the URL to which the payloads will be delivered. | -**ContentType** | **string** | A string defining the media type used to serialize the payloads. | -**Secret** | **string** | An optional string that's passed with the HTTP requests body. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/WebhookEvents.md b/C#/docs/WebhookEvents.md deleted file mode 100644 index 6d6c1a7..0000000 --- a/C#/docs/WebhookEvents.md +++ /dev/null @@ -1,8 +0,0 @@ -# dagshub_api.Model.WebhookEvents -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/WebhooksApi.md b/C#/docs/WebhooksApi.md deleted file mode 100644 index a0570eb..0000000 --- a/C#/docs/WebhooksApi.md +++ /dev/null @@ -1,287 +0,0 @@ -# dagshub_api.Api.WebhooksApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateHook**](WebhooksApi.md#createhook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -[**DeleteHook**](WebhooksApi.md#deletehook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -[**EditHook**](WebhooksApi.md#edithook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -[**ListHooks**](WebhooksApi.md#listhooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - - -# **CreateHook** -> void CreateHook (string owner, string repo, RepoHooksBody body = null) - -Create a hook - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class CreateHookExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new WebhooksApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var body = new RepoHooksBody(); // RepoHooksBody | (optional) - - try - { - // Create a hook - apiInstance.CreateHook(owner, repo, body); - } - catch (Exception e) - { - Debug.Print("Exception when calling WebhooksApi.CreateHook: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **body** | [**RepoHooksBody**](RepoHooksBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **DeleteHook** -> void DeleteHook (string owner, string repo, int? id) - -Delete a hook - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class DeleteHookExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new WebhooksApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var id = 56; // int? | - - try - { - // Delete a hook - apiInstance.DeleteHook(owner, repo, id); - } - catch (Exception e) - { - Debug.Print("Exception when calling WebhooksApi.DeleteHook: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **id** | **int?**| | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **EditHook** -> void EditHook (string owner, string repo, int? id, HooksIdBody body = null) - -Edit a hook - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class EditHookExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new WebhooksApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - var id = 56; // int? | - var body = new HooksIdBody(); // HooksIdBody | (optional) - - try - { - // Edit a hook - apiInstance.EditHook(owner, repo, id, body); - } - catch (Exception e) - { - Debug.Print("Exception when calling WebhooksApi.EditHook: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **id** | **int?**| | - **body** | [**HooksIdBody**](HooksIdBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListHooks** -> void ListHooks (string owner, string repo) - -List hooks - -### Example -```csharp -using System; -using System.Diagnostics; -using dagshub_api.Api; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace Example -{ - public class ListHooksExample - { - public void main() - { - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - // Configure API key authorization: tokenAuth - Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); - - var apiInstance = new WebhooksApi(); - var owner = owner_example; // string | owner of the repository - var repo = repo_example; // string | name of the repository - - try - { - // List hooks - apiInstance.ListHooks(owner, repo); - } - catch (Exception e) - { - Debug.Print("Exception when calling WebhooksApi.ListHooks: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/git_push.sh b/C#/git_push.sh deleted file mode 100644 index 5a6f47a..0000000 --- a/C#/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="DagsHub" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="api-clients" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/C#/mono_nunit_test.sh b/C#/mono_nunit_test.sh deleted file mode 100644 index f53633f..0000000 --- a/C#/mono_nunit_test.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -# - -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync - -echo "[INFO] remove bin/Debug/SwaggerClientTest.dll" -rm src/dagshub_api.Test/bin/Debug/dagshub_api.Test.dll 2> /dev/null - -echo "[INFO] install NUnit runners via NuGet" -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync -mono nuget.exe install src/dagshub_api.Test/packages.config -o packages - -echo "[INFO] Install NUnit runners via NuGet" -mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages - -echo "[INFO] Build the solution and run the unit test" -xbuild dagshub_api.sln && \ - mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/dagshub_api.Test/bin/Debug/dagshub_api.Test.dll diff --git a/C#/src/dagshub_api.Test/Api/BranchesApiTests.cs b/C#/src/dagshub_api.Test/Api/BranchesApiTests.cs deleted file mode 100644 index 6c80b50..0000000 --- a/C#/src/dagshub_api.Test/Api/BranchesApiTests.cs +++ /dev/null @@ -1,91 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; - -namespace dagshub_api.Test -{ - /// - /// Class for testing BranchesApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class BranchesApiTests - { - private BranchesApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new BranchesApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of BranchesApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' BranchesApi - //Assert.IsInstanceOfType(typeof(BranchesApi), instance, "instance is a BranchesApi"); - } - - /// - /// Test GetBranch - /// - [Test] - public void GetBranchTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string branch = null; - //instance.GetBranch(owner, repo, branch); - - } - /// - /// Test ListBranches - /// - [Test] - public void ListBranchesTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //instance.ListBranches(owner, repo); - - } - } - -} diff --git a/C#/src/dagshub_api.Test/Api/CollaboratorsApiTests.cs b/C#/src/dagshub_api.Test/Api/CollaboratorsApiTests.cs deleted file mode 100644 index d13e93a..0000000 --- a/C#/src/dagshub_api.Test/Api/CollaboratorsApiTests.cs +++ /dev/null @@ -1,106 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; -using dagshub_api.Model; - -namespace dagshub_api.Test -{ - /// - /// Class for testing CollaboratorsApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class CollaboratorsApiTests - { - private CollaboratorsApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new CollaboratorsApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of CollaboratorsApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' CollaboratorsApi - //Assert.IsInstanceOfType(typeof(CollaboratorsApi), instance, "instance is a CollaboratorsApi"); - } - - /// - /// Test AddCollaborator - /// - [Test] - public void AddCollaboratorTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string collaborator = null; - //CollaboratorsCollaboratorBody body = null; - //instance.AddCollaborator(owner, repo, collaborator, body); - - } - /// - /// Test GetCollaborators - /// - [Test] - public void GetCollaboratorsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //instance.GetCollaborators(owner, repo); - - } - /// - /// Test RemoveCollaborator - /// - [Test] - public void RemoveCollaboratorTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string collaborator = null; - //instance.RemoveCollaborator(owner, repo, collaborator); - - } - } - -} diff --git a/C#/src/dagshub_api.Test/Api/CommitsApiTests.cs b/C#/src/dagshub_api.Test/Api/CommitsApiTests.cs deleted file mode 100644 index 501f61f..0000000 --- a/C#/src/dagshub_api.Test/Api/CommitsApiTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; - -namespace dagshub_api.Test -{ - /// - /// Class for testing CommitsApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class CommitsApiTests - { - private CommitsApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new CommitsApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of CommitsApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' CommitsApi - //Assert.IsInstanceOfType(typeof(CommitsApi), instance, "instance is a CommitsApi"); - } - - /// - /// Test GetCommit - /// - [Test] - public void GetCommitTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string sha = null; - //instance.GetCommit(owner, repo, sha); - - } - } - -} diff --git a/C#/src/dagshub_api.Test/Api/ContentApiTests.cs b/C#/src/dagshub_api.Test/Api/ContentApiTests.cs deleted file mode 100644 index 832a3bc..0000000 --- a/C#/src/dagshub_api.Test/Api/ContentApiTests.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; -using dagshub_api.Model; - -namespace dagshub_api.Test -{ - /// - /// Class for testing ContentApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class ContentApiTests - { - private ContentApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new ContentApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ContentApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' ContentApi - //Assert.IsInstanceOfType(typeof(ContentApi), instance, "instance is a ContentApi"); - } - - /// - /// Test GetArchive - /// - [Test] - public void GetArchiveTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string _ref = null; - //string format = null; - //instance.GetArchive(owner, repo, _ref, format); - - } - /// - /// Test GetContent - /// - [Test] - public void GetContentTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string branch = null; - //string path = null; - //bool? includeSize = null; - //var response = instance.GetContent(owner, repo, branch, path, includeSize); - //Assert.IsInstanceOf (response, "response is Files"); - } - /// - /// Test GetRaw - /// - [Test] - public void GetRawTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string _ref = null; - //string path = null; - //instance.GetRaw(owner, repo, _ref, path); - - } - /// - /// Test UploadContent - /// - [Test] - public void UploadContentTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string branch = null; - //string path = null; - //string commitSummary = null; - //string commitMessage = null; - //string commitChoice = null; - //string lastCommit = null; - //string newBranchName = null; - //string versioning = null; - //string files = null; - //instance.UploadContent(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files); - - } - } - -} diff --git a/C#/src/dagshub_api.Test/Api/ExperimentsApiTests.cs b/C#/src/dagshub_api.Test/Api/ExperimentsApiTests.cs deleted file mode 100644 index 20ba102..0000000 --- a/C#/src/dagshub_api.Test/Api/ExperimentsApiTests.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; -using dagshub_api.Model; - -namespace dagshub_api.Test -{ - /// - /// Class for testing ExperimentsApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class ExperimentsApiTests - { - private ExperimentsApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new ExperimentsApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ExperimentsApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' ExperimentsApi - //Assert.IsInstanceOfType(typeof(ExperimentsApi), instance, "instance is a ExperimentsApi"); - } - - /// - /// Test AddExperimentLabel - /// - [Test] - public void AddExperimentLabelTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string experimentKey = null; - //string experimentLabel = null; - //instance.AddExperimentLabel(owner, repo, experimentKey, experimentLabel); - - } - /// - /// Test DeleteExperiment - /// - [Test] - public void DeleteExperimentTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string experimentKey = null; - //instance.DeleteExperiment(owner, repo, experimentKey); - - } - /// - /// Test DeleteExperimentLabel - /// - [Test] - public void DeleteExperimentLabelTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string experimentKey = null; - //string experimentLabel = null; - //instance.DeleteExperimentLabel(owner, repo, experimentKey, experimentLabel); - - } - /// - /// Test EditExperiment - /// - [Test] - public void EditExperimentTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string experimentKey = null; - //EditExperimentPost body = null; - //instance.EditExperiment(owner, repo, experimentKey, body); - - } - /// - /// Test GetExperimentMetrics - /// - [Test] - public void GetExperimentMetricsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //ExperimentKeys body = null; - //instance.GetExperimentMetrics(owner, repo, body); - - } - /// - /// Test GetExperiments - /// - [Test] - public void GetExperimentsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //instance.GetExperiments(owner, repo); - - } - } - -} diff --git a/C#/src/dagshub_api.Test/Api/IssuesApiTests.cs b/C#/src/dagshub_api.Test/Api/IssuesApiTests.cs deleted file mode 100644 index 29bbc70..0000000 --- a/C#/src/dagshub_api.Test/Api/IssuesApiTests.cs +++ /dev/null @@ -1,118 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; -using dagshub_api.Model; - -namespace dagshub_api.Test -{ - /// - /// Class for testing IssuesApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class IssuesApiTests - { - private IssuesApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new IssuesApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of IssuesApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' IssuesApi - //Assert.IsInstanceOfType(typeof(IssuesApi), instance, "instance is a IssuesApi"); - } - - /// - /// Test CreateIssue - /// - [Test] - public void CreateIssueTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //PostIssue body = null; - //var response = instance.CreateIssue(owner, repo, body); - //Assert.IsInstanceOf (response, "response is Issue"); - } - /// - /// Test EditIssue - /// - [Test] - public void EditIssueTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //PatchIssue body = null; - //var response = instance.EditIssue(owner, repo, body); - //Assert.IsInstanceOf (response, "response is Issue"); - } - /// - /// Test GetIssue - /// - [Test] - public void GetIssueTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //int? index = null; - //var response = instance.GetIssue(owner, repo, index); - //Assert.IsInstanceOf (response, "response is Issue"); - } - /// - /// Test ListRepoIssues - /// - [Test] - public void ListRepoIssuesTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //var response = instance.ListRepoIssues(owner, repo); - //Assert.IsInstanceOf (response, "response is Issues"); - } - } - -} diff --git a/C#/src/dagshub_api.Test/Api/ReleasesApiTests.cs b/C#/src/dagshub_api.Test/Api/ReleasesApiTests.cs deleted file mode 100644 index 63165c9..0000000 --- a/C#/src/dagshub_api.Test/Api/ReleasesApiTests.cs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; - -namespace dagshub_api.Test -{ - /// - /// Class for testing ReleasesApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class ReleasesApiTests - { - private ReleasesApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new ReleasesApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ReleasesApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' ReleasesApi - //Assert.IsInstanceOfType(typeof(ReleasesApi), instance, "instance is a ReleasesApi"); - } - - /// - /// Test ListReleases - /// - [Test] - public void ListReleasesTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //instance.ListReleases(owner, repo); - - } - } - -} diff --git a/C#/src/dagshub_api.Test/Api/RepositoryApiTests.cs b/C#/src/dagshub_api.Test/Api/RepositoryApiTests.cs deleted file mode 100644 index 54ebbe0..0000000 --- a/C#/src/dagshub_api.Test/Api/RepositoryApiTests.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; -using dagshub_api.Model; - -namespace dagshub_api.Test -{ - /// - /// Class for testing RepositoryApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class RepositoryApiTests - { - private RepositoryApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new RepositoryApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of RepositoryApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' RepositoryApi - //Assert.IsInstanceOfType(typeof(RepositoryApi), instance, "instance is a RepositoryApi"); - } - - /// - /// Test CreateOrgRepo - /// - [Test] - public void CreateOrgRepoTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string orgname = null; - //CreateRepo body = null; - //instance.CreateOrgRepo(orgname, body); - - } - /// - /// Test CreateRepo - /// - [Test] - public void CreateRepoTest() - { - // TODO uncomment below to test the method and replace null with proper value - //CreateRepo body = null; - //instance.CreateRepo(body); - - } - /// - /// Test GetRepo - /// - [Test] - public void GetRepoTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //instance.GetRepo(owner, repo); - - } - /// - /// Test ListMyRepos - /// - [Test] - public void ListMyReposTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.ListMyRepos(); - //Assert.IsInstanceOf (response, "response is Object"); - } - /// - /// Test ListOrgRepos - /// - [Test] - public void ListOrgReposTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string orgname = null; - //instance.ListOrgRepos(orgname); - - } - /// - /// Test ListUserRepos - /// - [Test] - public void ListUserReposTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //instance.ListUserRepos(username); - - } - /// - /// Test MigrateRepo - /// - [Test] - public void MigrateRepoTest() - { - // TODO uncomment below to test the method and replace null with proper value - //MigrateRepo body = null; - //instance.MigrateRepo(body); - - } - /// - /// Test Search - /// - [Test] - public void SearchTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string q = null; - //int? uid = null; - //int? limit = null; - //int? page = null; - //var response = instance.Search(q, uid, limit, page); - //Assert.IsInstanceOf (response, "response is Object"); - } - } - -} diff --git a/C#/src/dagshub_api.Test/Api/StorageIntegrationsApiTests.cs b/C#/src/dagshub_api.Test/Api/StorageIntegrationsApiTests.cs deleted file mode 100644 index 394e411..0000000 --- a/C#/src/dagshub_api.Test/Api/StorageIntegrationsApiTests.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; -using dagshub_api.Model; - -namespace dagshub_api.Test -{ - /// - /// Class for testing StorageIntegrationsApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class StorageIntegrationsApiTests - { - private StorageIntegrationsApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new StorageIntegrationsApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of StorageIntegrationsApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' StorageIntegrationsApi - //Assert.IsInstanceOfType(typeof(StorageIntegrationsApi), instance, "instance is a StorageIntegrationsApi"); - } - - /// - /// Test GetBucketContent - /// - [Test] - public void GetBucketContentTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string protocol = null; - //string bucket = null; - //string path = null; - //bool? includeSize = null; - //int? limit = null; - //string fromToken = null; - //var response = instance.GetBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); - //Assert.IsInstanceOf (response, "response is Files1"); - } - /// - /// Test GetBucketFile - /// - [Test] - public void GetBucketFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //string protocol = null; - //string bucket = null; - //string path = null; - //instance.GetBucketFile(owner, repo, protocol, bucket, path); - - } - /// - /// Test GetBuckets - /// - [Test] - public void GetBucketsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //var response = instance.GetBuckets(owner, repo); - //Assert.IsInstanceOf (response, "response is Integration"); - } - } - -} diff --git a/C#/src/dagshub_api.Test/Api/UserApiTests.cs b/C#/src/dagshub_api.Test/Api/UserApiTests.cs deleted file mode 100644 index af9454c..0000000 --- a/C#/src/dagshub_api.Test/Api/UserApiTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; - -namespace dagshub_api.Test -{ - /// - /// Class for testing UserApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class UserApiTests - { - private UserApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new UserApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of UserApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' UserApi - //Assert.IsInstanceOfType(typeof(UserApi), instance, "instance is a UserApi"); - } - - /// - /// Test GetAuthenticatedUser - /// - [Test] - public void GetAuthenticatedUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //instance.GetAuthenticatedUser(); - - } - /// - /// Test GetUser - /// - [Test] - public void GetUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //instance.GetUser(username); - - } - } - -} diff --git a/C#/src/dagshub_api.Test/Api/WebhooksApiTests.cs b/C#/src/dagshub_api.Test/Api/WebhooksApiTests.cs deleted file mode 100644 index a7e83ed..0000000 --- a/C#/src/dagshub_api.Test/Api/WebhooksApiTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using dagshub_api.Client; -using dagshub_api.Api; -using dagshub_api.Model; - -namespace dagshub_api.Test -{ - /// - /// Class for testing WebhooksApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class WebhooksApiTests - { - private WebhooksApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new WebhooksApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of WebhooksApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' WebhooksApi - //Assert.IsInstanceOfType(typeof(WebhooksApi), instance, "instance is a WebhooksApi"); - } - - /// - /// Test CreateHook - /// - [Test] - public void CreateHookTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //RepoHooksBody body = null; - //instance.CreateHook(owner, repo, body); - - } - /// - /// Test DeleteHook - /// - [Test] - public void DeleteHookTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //int? id = null; - //instance.DeleteHook(owner, repo, id); - - } - /// - /// Test EditHook - /// - [Test] - public void EditHookTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //int? id = null; - //HooksIdBody body = null; - //instance.EditHook(owner, repo, id, body); - - } - /// - /// Test ListHooks - /// - [Test] - public void ListHooksTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string owner = null; - //string repo = null; - //instance.ListHooks(owner, repo); - - } - } - -} diff --git a/C#/src/dagshub_api.Test/Model/CollaboratorsCollaboratorBodyTests.cs b/C#/src/dagshub_api.Test/Model/CollaboratorsCollaboratorBodyTests.cs deleted file mode 100644 index 52b7281..0000000 --- a/C#/src/dagshub_api.Test/Model/CollaboratorsCollaboratorBodyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing CollaboratorsCollaboratorBody - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class CollaboratorsCollaboratorBodyTests - { - // TODO uncomment below to declare an instance variable for CollaboratorsCollaboratorBody - //private CollaboratorsCollaboratorBody instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of CollaboratorsCollaboratorBody - //instance = new CollaboratorsCollaboratorBody(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of CollaboratorsCollaboratorBody - /// - [Test] - public void CollaboratorsCollaboratorBodyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" CollaboratorsCollaboratorBody - //Assert.IsInstanceOfType (instance, "variable 'instance' is a CollaboratorsCollaboratorBody"); - } - - - /// - /// Test the property 'Permission' - /// - [Test] - public void PermissionTest() - { - // TODO unit test for the property 'Permission' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/CreateRepoTests.cs b/C#/src/dagshub_api.Test/Model/CreateRepoTests.cs deleted file mode 100644 index 6771ce1..0000000 --- a/C#/src/dagshub_api.Test/Model/CreateRepoTests.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing CreateRepo - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class CreateRepoTests - { - // TODO uncomment below to declare an instance variable for CreateRepo - //private CreateRepo instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of CreateRepo - //instance = new CreateRepo(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of CreateRepo - /// - [Test] - public void CreateRepoInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" CreateRepo - //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateRepo"); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Description' - /// - [Test] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - /// - /// Test the property '_Private' - /// - [Test] - public void _PrivateTest() - { - // TODO unit test for the property '_Private' - } - /// - /// Test the property 'AutoInit' - /// - [Test] - public void AutoInitTest() - { - // TODO unit test for the property 'AutoInit' - } - /// - /// Test the property 'ProjectTemplate' - /// - [Test] - public void ProjectTemplateTest() - { - // TODO unit test for the property 'ProjectTemplate' - } - /// - /// Test the property 'Gitignores' - /// - [Test] - public void GitignoresTest() - { - // TODO unit test for the property 'Gitignores' - } - /// - /// Test the property 'License' - /// - [Test] - public void LicenseTest() - { - // TODO unit test for the property 'License' - } - /// - /// Test the property 'Readme' - /// - [Test] - public void ReadmeTest() - { - // TODO unit test for the property 'Readme' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/EditExperimentPostTests.cs b/C#/src/dagshub_api.Test/Model/EditExperimentPostTests.cs deleted file mode 100644 index 8219782..0000000 --- a/C#/src/dagshub_api.Test/Model/EditExperimentPostTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing EditExperimentPost - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class EditExperimentPostTests - { - // TODO uncomment below to declare an instance variable for EditExperimentPost - //private EditExperimentPost instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EditExperimentPost - //instance = new EditExperimentPost(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EditExperimentPost - /// - [Test] - public void EditExperimentPostInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" EditExperimentPost - //Assert.IsInstanceOfType (instance, "variable 'instance' is a EditExperimentPost"); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/ExperimentKeysTests.cs b/C#/src/dagshub_api.Test/Model/ExperimentKeysTests.cs index 66bc6e6..68adf7a 100644 --- a/C#/src/dagshub_api.Test/Model/ExperimentKeysTests.cs +++ b/C#/src/dagshub_api.Test/Model/ExperimentKeysTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/WebhookEventsTests.cs b/C#/src/dagshub_api.Test/Model/ExperimentMetricsResponseTests.cs similarity index 65% rename from C#/src/dagshub_api.Test/Model/WebhookEventsTests.cs rename to C#/src/dagshub_api.Test/Model/ExperimentMetricsResponseTests.cs index e36b67a..108bb33 100644 --- a/C#/src/dagshub_api.Test/Model/WebhookEventsTests.cs +++ b/C#/src/dagshub_api.Test/Model/ExperimentMetricsResponseTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -23,17 +23,17 @@ namespace dagshub_api.Test { /// - /// Class for testing WebhookEvents + /// Class for testing ExperimentMetricsResponse /// /// /// This file is automatically generated by Swagger Codegen. /// Please update the test case below to test the model. /// [TestFixture] - public class WebhookEventsTests + public class ExperimentMetricsResponseTests { - // TODO uncomment below to declare an instance variable for WebhookEvents - //private WebhookEvents instance; + // TODO uncomment below to declare an instance variable for ExperimentMetricsResponse + //private ExperimentMetricsResponse instance; /// /// Setup before each test @@ -41,8 +41,8 @@ public class WebhookEventsTests [SetUp] public void Init() { - // TODO uncomment below to create an instance of WebhookEvents - //instance = new WebhookEvents(); + // TODO uncomment below to create an instance of ExperimentMetricsResponse + //instance = new ExperimentMetricsResponse(); } /// @@ -55,13 +55,13 @@ public void Cleanup() } /// - /// Test an instance of WebhookEvents + /// Test an instance of ExperimentMetricsResponse /// [Test] - public void WebhookEventsInstanceTest() + public void ExperimentMetricsResponseInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" WebhookEvents - //Assert.IsInstanceOfType (instance, "variable 'instance' is a WebhookEvents"); + // TODO uncomment below to test "IsInstanceOfType" ExperimentMetricsResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ExperimentMetricsResponse"); } diff --git a/C#/src/dagshub_api.Test/Model/IntegrationInnerTests.cs b/C#/src/dagshub_api.Test/Model/ExperimentsResponseTests.cs similarity index 59% rename from C#/src/dagshub_api.Test/Model/IntegrationInnerTests.cs rename to C#/src/dagshub_api.Test/Model/ExperimentsResponseTests.cs index 896fa71..108364f 100644 --- a/C#/src/dagshub_api.Test/Model/IntegrationInnerTests.cs +++ b/C#/src/dagshub_api.Test/Model/ExperimentsResponseTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -23,17 +23,17 @@ namespace dagshub_api.Test { /// - /// Class for testing IntegrationInner + /// Class for testing ExperimentsResponse /// /// /// This file is automatically generated by Swagger Codegen. /// Please update the test case below to test the model. /// [TestFixture] - public class IntegrationInnerTests + public class ExperimentsResponseTests { - // TODO uncomment below to declare an instance variable for IntegrationInner - //private IntegrationInner instance; + // TODO uncomment below to declare an instance variable for ExperimentsResponse + //private ExperimentsResponse instance; /// /// Setup before each test @@ -41,8 +41,8 @@ public class IntegrationInnerTests [SetUp] public void Init() { - // TODO uncomment below to create an instance of IntegrationInner - //instance = new IntegrationInner(); + // TODO uncomment below to create an instance of ExperimentsResponse + //instance = new ExperimentsResponse(); } /// @@ -55,39 +55,39 @@ public void Cleanup() } /// - /// Test an instance of IntegrationInner + /// Test an instance of ExperimentsResponse /// [Test] - public void IntegrationInnerInstanceTest() + public void ExperimentsResponseInstanceTest() { - // TODO uncomment below to test "IsInstanceOfType" IntegrationInner - //Assert.IsInstanceOfType (instance, "variable 'instance' is a IntegrationInner"); + // TODO uncomment below to test "IsInstanceOfType" ExperimentsResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ExperimentsResponse"); } /// - /// Test the property 'Name' + /// Test the property 'Experiments' /// [Test] - public void NameTest() + public void ExperimentsTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Experiments' } /// - /// Test the property 'Protocol' + /// Test the property 'IsEditor' /// [Test] - public void ProtocolTest() + public void IsEditorTest() { - // TODO unit test for the property 'Protocol' + // TODO unit test for the property 'IsEditor' } /// - /// Test the property 'ListPath' + /// Test the property 'NextPageToken' /// [Test] - public void ListPathTest() + public void NextPageTokenTest() { - // TODO unit test for the property 'ListPath' + // TODO unit test for the property 'NextPageToken' } } diff --git a/C#/src/dagshub_api.Test/Model/FileTests.cs b/C#/src/dagshub_api.Test/Model/FileTests.cs deleted file mode 100644 index 000e4d7..0000000 --- a/C#/src/dagshub_api.Test/Model/FileTests.cs +++ /dev/null @@ -1,127 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing File - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class FileTests - { - // TODO uncomment below to declare an instance variable for File - //private File instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of File - //instance = new File(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of File - /// - [Test] - public void FileInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" File - //Assert.IsInstanceOfType (instance, "variable 'instance' is a File"); - } - - - /// - /// Test the property 'Path' - /// - [Test] - public void PathTest() - { - // TODO unit test for the property 'Path' - } - /// - /// Test the property 'Type' - /// - [Test] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - /// - /// Test the property 'Size' - /// - [Test] - public void SizeTest() - { - // TODO unit test for the property 'Size' - } - /// - /// Test the property 'Hash' - /// - [Test] - public void HashTest() - { - // TODO unit test for the property 'Hash' - } - /// - /// Test the property 'Versioning' - /// - [Test] - public void VersioningTest() - { - // TODO unit test for the property 'Versioning' - } - /// - /// Test the property 'DownloadUrl' - /// - [Test] - public void DownloadUrlTest() - { - // TODO unit test for the property 'DownloadUrl' - } - /// - /// Test the property 'ContentUrl' - /// - [Test] - public void ContentUrlTest() - { - // TODO unit test for the property 'ContentUrl' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/Files1Tests.cs b/C#/src/dagshub_api.Test/Model/Files1Tests.cs index 447c5d4..f3df02f 100644 --- a/C#/src/dagshub_api.Test/Model/Files1Tests.cs +++ b/C#/src/dagshub_api.Test/Model/Files1Tests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -74,14 +74,6 @@ public void EntriesTest() // TODO unit test for the property 'Entries' } /// - /// Test the property 'Limit' - /// - [Test] - public void LimitTest() - { - // TODO unit test for the property 'Limit' - } - /// /// Test the property 'NextToken' /// [Test] diff --git a/C#/src/dagshub_api.Test/Model/FilesTests.cs b/C#/src/dagshub_api.Test/Model/FilesTests.cs index 6642f36..47b5e02 100644 --- a/C#/src/dagshub_api.Test/Model/FilesTests.cs +++ b/C#/src/dagshub_api.Test/Model/FilesTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/HooksIdBodyTests.cs b/C#/src/dagshub_api.Test/Model/HooksIdBodyTests.cs deleted file mode 100644 index f810f85..0000000 --- a/C#/src/dagshub_api.Test/Model/HooksIdBodyTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing HooksIdBody - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class HooksIdBodyTests - { - // TODO uncomment below to declare an instance variable for HooksIdBody - //private HooksIdBody instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of HooksIdBody - //instance = new HooksIdBody(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of HooksIdBody - /// - [Test] - public void HooksIdBodyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" HooksIdBody - //Assert.IsInstanceOfType (instance, "variable 'instance' is a HooksIdBody"); - } - - - /// - /// Test the property 'Config' - /// - [Test] - public void ConfigTest() - { - // TODO unit test for the property 'Config' - } - /// - /// Test the property 'Events' - /// - [Test] - public void EventsTest() - { - // TODO unit test for the property 'Events' - } - /// - /// Test the property 'Active' - /// - [Test] - public void ActiveTest() - { - // TODO unit test for the property 'Active' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/IntegrationTests.cs b/C#/src/dagshub_api.Test/Model/IntegrationTests.cs index a98718e..d937c1c 100644 --- a/C#/src/dagshub_api.Test/Model/IntegrationTests.cs +++ b/C#/src/dagshub_api.Test/Model/IntegrationTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/IssueAssigneeTests.cs b/C#/src/dagshub_api.Test/Model/IssueAssigneeTests.cs deleted file mode 100644 index 93a41ca..0000000 --- a/C#/src/dagshub_api.Test/Model/IssueAssigneeTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing IssueAssignee - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class IssueAssigneeTests - { - // TODO uncomment below to declare an instance variable for IssueAssignee - //private IssueAssignee instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of IssueAssignee - //instance = new IssueAssignee(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of IssueAssignee - /// - [Test] - public void IssueAssigneeInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" IssueAssignee - //Assert.IsInstanceOfType (instance, "variable 'instance' is a IssueAssignee"); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Login' - /// - [Test] - public void LoginTest() - { - // TODO unit test for the property 'Login' - } - /// - /// Test the property 'FullName' - /// - [Test] - public void FullNameTest() - { - // TODO unit test for the property 'FullName' - } - /// - /// Test the property 'AvatarUrl' - /// - [Test] - public void AvatarUrlTest() - { - // TODO unit test for the property 'AvatarUrl' - } - /// - /// Test the property 'Username' - /// - [Test] - public void UsernameTest() - { - // TODO unit test for the property 'Username' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/IssueLabelsTests.cs b/C#/src/dagshub_api.Test/Model/IssueLabelsTests.cs deleted file mode 100644 index 890b5c9..0000000 --- a/C#/src/dagshub_api.Test/Model/IssueLabelsTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing IssueLabels - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class IssueLabelsTests - { - // TODO uncomment below to declare an instance variable for IssueLabels - //private IssueLabels instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of IssueLabels - //instance = new IssueLabels(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of IssueLabels - /// - [Test] - public void IssueLabelsInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" IssueLabels - //Assert.IsInstanceOfType (instance, "variable 'instance' is a IssueLabels"); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Color' - /// - [Test] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - /// - /// Test the property 'Url' - /// - [Test] - public void UrlTest() - { - // TODO unit test for the property 'Url' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/IssueMilestoneTests.cs b/C#/src/dagshub_api.Test/Model/IssueMilestoneTests.cs deleted file mode 100644 index 62889dc..0000000 --- a/C#/src/dagshub_api.Test/Model/IssueMilestoneTests.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing IssueMilestone - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class IssueMilestoneTests - { - // TODO uncomment below to declare an instance variable for IssueMilestone - //private IssueMilestone instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of IssueMilestone - //instance = new IssueMilestone(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of IssueMilestone - /// - [Test] - public void IssueMilestoneInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" IssueMilestone - //Assert.IsInstanceOfType (instance, "variable 'instance' is a IssueMilestone"); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Title' - /// - [Test] - public void TitleTest() - { - // TODO unit test for the property 'Title' - } - /// - /// Test the property 'Description' - /// - [Test] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - /// - /// Test the property 'State' - /// - [Test] - public void StateTest() - { - // TODO unit test for the property 'State' - } - /// - /// Test the property 'OpenIssues' - /// - [Test] - public void OpenIssuesTest() - { - // TODO unit test for the property 'OpenIssues' - } - /// - /// Test the property 'ClosedIssues' - /// - [Test] - public void ClosedIssuesTest() - { - // TODO unit test for the property 'ClosedIssues' - } - /// - /// Test the property 'ClosedAt' - /// - [Test] - public void ClosedAtTest() - { - // TODO unit test for the property 'ClosedAt' - } - /// - /// Test the property 'DueOn' - /// - [Test] - public void DueOnTest() - { - // TODO unit test for the property 'DueOn' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/IssueTests.cs b/C#/src/dagshub_api.Test/Model/IssueTests.cs index df519c7..7209903 100644 --- a/C#/src/dagshub_api.Test/Model/IssueTests.cs +++ b/C#/src/dagshub_api.Test/Model/IssueTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -169,14 +169,6 @@ public void PullRequestTest() { // TODO unit test for the property 'PullRequest' } - /// - /// Test the property 'Closed' - /// - [Test] - public void ClosedTest() - { - // TODO unit test for the property 'Closed' - } } diff --git a/C#/src/dagshub_api.Test/Model/IssuesTests.cs b/C#/src/dagshub_api.Test/Model/IssuesTests.cs index e45c799..9eae746 100644 --- a/C#/src/dagshub_api.Test/Model/IssuesTests.cs +++ b/C#/src/dagshub_api.Test/Model/IssuesTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/LabelsTests.cs b/C#/src/dagshub_api.Test/Model/LabelsTests.cs deleted file mode 100644 index 4a6da52..0000000 --- a/C#/src/dagshub_api.Test/Model/LabelsTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing Labels - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class LabelsTests - { - // TODO uncomment below to declare an instance variable for Labels - //private Labels instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Labels - //instance = new Labels(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Labels - /// - [Test] - public void LabelsInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" Labels - //Assert.IsInstanceOfType (instance, "variable 'instance' is a Labels"); - } - - - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/MigrateRepoTests.cs b/C#/src/dagshub_api.Test/Model/MigrateRepoTests.cs deleted file mode 100644 index 2b3208b..0000000 --- a/C#/src/dagshub_api.Test/Model/MigrateRepoTests.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing MigrateRepo - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class MigrateRepoTests - { - // TODO uncomment below to declare an instance variable for MigrateRepo - //private MigrateRepo instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of MigrateRepo - //instance = new MigrateRepo(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of MigrateRepo - /// - [Test] - public void MigrateRepoInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" MigrateRepo - //Assert.IsInstanceOfType (instance, "variable 'instance' is a MigrateRepo"); - } - - - /// - /// Test the property 'CloneAddr' - /// - [Test] - public void CloneAddrTest() - { - // TODO unit test for the property 'CloneAddr' - } - /// - /// Test the property 'AuthUsername' - /// - [Test] - public void AuthUsernameTest() - { - // TODO unit test for the property 'AuthUsername' - } - /// - /// Test the property 'AuthPassword' - /// - [Test] - public void AuthPasswordTest() - { - // TODO unit test for the property 'AuthPassword' - } - /// - /// Test the property 'UserId' - /// - [Test] - public void UserIdTest() - { - // TODO unit test for the property 'UserId' - } - /// - /// Test the property 'RepoName' - /// - [Test] - public void RepoNameTest() - { - // TODO unit test for the property 'RepoName' - } - /// - /// Test the property 'Mirror' - /// - [Test] - public void MirrorTest() - { - // TODO unit test for the property 'Mirror' - } - /// - /// Test the property 'Visibility' - /// - [Test] - public void VisibilityTest() - { - // TODO unit test for the property 'Visibility' - } - /// - /// Test the property 'Description' - /// - [Test] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/PatchIssueTests.cs b/C#/src/dagshub_api.Test/Model/PatchIssueTests.cs index 34d0762..4845467 100644 --- a/C#/src/dagshub_api.Test/Model/PatchIssueTests.cs +++ b/C#/src/dagshub_api.Test/Model/PatchIssueTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/PostIssueTests.cs b/C#/src/dagshub_api.Test/Model/PostIssueTests.cs index dc2c8b7..cef0e10 100644 --- a/C#/src/dagshub_api.Test/Model/PostIssueTests.cs +++ b/C#/src/dagshub_api.Test/Model/PostIssueTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/PutFileTests.cs b/C#/src/dagshub_api.Test/Model/PutFileTests.cs index 892d8eb..9bd733e 100644 --- a/C#/src/dagshub_api.Test/Model/PutFileTests.cs +++ b/C#/src/dagshub_api.Test/Model/PutFileTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/RepoHooksBodyTests.cs b/C#/src/dagshub_api.Test/Model/RepoHooksBodyTests.cs deleted file mode 100644 index 70cc2be..0000000 --- a/C#/src/dagshub_api.Test/Model/RepoHooksBodyTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing RepoHooksBody - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class RepoHooksBodyTests - { - // TODO uncomment below to declare an instance variable for RepoHooksBody - //private RepoHooksBody instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of RepoHooksBody - //instance = new RepoHooksBody(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of RepoHooksBody - /// - [Test] - public void RepoHooksBodyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" RepoHooksBody - //Assert.IsInstanceOfType (instance, "variable 'instance' is a RepoHooksBody"); - } - - - /// - /// Test the property 'Type' - /// - [Test] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - /// - /// Test the property 'Config' - /// - [Test] - public void ConfigTest() - { - // TODO unit test for the property 'Config' - } - /// - /// Test the property 'Events' - /// - [Test] - public void EventsTest() - { - // TODO unit test for the property 'Events' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/StateTests.cs b/C#/src/dagshub_api.Test/Model/StateTests.cs deleted file mode 100644 index 8e4c0a3..0000000 --- a/C#/src/dagshub_api.Test/Model/StateTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing State - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class StateTests - { - // TODO uncomment below to declare an instance variable for State - //private State instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of State - //instance = new State(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of State - /// - [Test] - public void StateInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" State - //Assert.IsInstanceOfType (instance, "variable 'instance' is a State"); - } - - - - } - -} diff --git a/C#/src/dagshub_api.Test/Model/UserTests.cs b/C#/src/dagshub_api.Test/Model/UserTests.cs index 4b6053c..cf54e47 100644 --- a/C#/src/dagshub_api.Test/Model/UserTests.cs +++ b/C#/src/dagshub_api.Test/Model/UserTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -82,6 +82,14 @@ public void LoginTest() // TODO unit test for the property 'Login' } /// + /// Test the property 'Username' + /// + [Test] + public void UsernameTest() + { + // TODO unit test for the property 'Username' + } + /// /// Test the property 'FullName' /// [Test] @@ -98,12 +106,36 @@ public void AvatarUrlTest() // TODO unit test for the property 'AvatarUrl' } /// - /// Test the property 'Username' + /// Test the property 'PublicEmail' /// [Test] - public void UsernameTest() + public void PublicEmailTest() { - // TODO unit test for the property 'Username' + // TODO unit test for the property 'PublicEmail' + } + /// + /// Test the property 'Website' + /// + [Test] + public void WebsiteTest() + { + // TODO unit test for the property 'Website' + } + /// + /// Test the property 'Company' + /// + [Test] + public void CompanyTest() + { + // TODO unit test for the property 'Company' + } + /// + /// Test the property 'Description' + /// + [Test] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' } } diff --git a/C#/src/dagshub_api.Test/Model/WebhookConfigTests.cs b/C#/src/dagshub_api.Test/Model/WebhookConfigTests.cs deleted file mode 100644 index abd5658..0000000 --- a/C#/src/dagshub_api.Test/Model/WebhookConfigTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using dagshub_api.Api; -using dagshub_api.Model; -using dagshub_api.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace dagshub_api.Test -{ - /// - /// Class for testing WebhookConfig - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class WebhookConfigTests - { - // TODO uncomment below to declare an instance variable for WebhookConfig - //private WebhookConfig instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of WebhookConfig - //instance = new WebhookConfig(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of WebhookConfig - /// - [Test] - public void WebhookConfigInstanceTest() - { - // TODO uncomment below to test "IsInstanceOfType" WebhookConfig - //Assert.IsInstanceOfType (instance, "variable 'instance' is a WebhookConfig"); - } - - - /// - /// Test the property 'Url' - /// - [Test] - public void UrlTest() - { - // TODO unit test for the property 'Url' - } - /// - /// Test the property 'ContentType' - /// - [Test] - public void ContentTypeTest() - { - // TODO unit test for the property 'ContentType' - } - /// - /// Test the property 'Secret' - /// - [Test] - public void SecretTest() - { - // TODO unit test for the property 'Secret' - } - - } - -} diff --git a/C#/src/dagshub_api.Test/dagshub_api.Test.csproj b/C#/src/dagshub_api.Test/dagshub_api.Test.csproj deleted file mode 100644 index 9aae521..0000000 --- a/C#/src/dagshub_api.Test/dagshub_api.Test.csproj +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Debug - AnyCPU - {19F1DEBC-DE5E-4517-8062-F000CD499087} - Library - Properties - dagshub_api.Test - dagshub_api.Test - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - - - $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll - - - - - - - - - - - - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698} - dagshub_api - - - - diff --git a/C#/src/dagshub_api.Test/packages.config b/C#/src/dagshub_api.Test/packages.config deleted file mode 100644 index ac390c1..0000000 --- a/C#/src/dagshub_api.Test/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/C#/src/dagshub_api/Api/BranchesApi.cs b/C#/src/dagshub_api/Api/BranchesApi.cs deleted file mode 100644 index 8653703..0000000 --- a/C#/src/dagshub_api/Api/BranchesApi.cs +++ /dev/null @@ -1,573 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IBranchesApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Get Branch - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// - void GetBranch (string owner, string repo, string branch); - - /// - /// Get Branch - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// ApiResponse of Object(void) - ApiResponse GetBranchWithHttpInfo (string owner, string repo, string branch); - /// - /// List Branches - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - void ListBranches (string owner, string repo); - - /// - /// List Branches - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - ApiResponse ListBranchesWithHttpInfo (string owner, string repo); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Get Branch - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// Task of void - System.Threading.Tasks.Task GetBranchAsync (string owner, string repo, string branch); - - /// - /// Get Branch - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// Task of ApiResponse - System.Threading.Tasks.Task> GetBranchAsyncWithHttpInfo (string owner, string repo, string branch); - /// - /// List Branches - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - System.Threading.Tasks.Task ListBranchesAsync (string owner, string repo); - - /// - /// List Branches - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - System.Threading.Tasks.Task> ListBranchesAsyncWithHttpInfo (string owner, string repo); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class BranchesApi : IBranchesApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public BranchesApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public BranchesApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public BranchesApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Get Branch - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// - public void GetBranch (string owner, string repo, string branch) - { - GetBranchWithHttpInfo(owner, repo, branch); - } - - /// - /// Get Branch - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// ApiResponse of Object(void) - public ApiResponse GetBranchWithHttpInfo (string owner, string repo, string branch) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling BranchesApi->GetBranch"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling BranchesApi->GetBranch"); - // verify the required parameter 'branch' is set - if (branch == null) - throw new ApiException(400, "Missing required parameter 'branch' when calling BranchesApi->GetBranch"); - - var localVarPath = "/repos/{owner}/{repo}/branches/{branch}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (branch != null) localVarPathParams.Add("branch", this.Configuration.ApiClient.ParameterToString(branch)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetBranch", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get Branch - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// Task of void - public async System.Threading.Tasks.Task GetBranchAsync (string owner, string repo, string branch) - { - await GetBranchAsyncWithHttpInfo(owner, repo, branch); - - } - - /// - /// Get Branch - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetBranchAsyncWithHttpInfo (string owner, string repo, string branch) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling BranchesApi->GetBranch"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling BranchesApi->GetBranch"); - // verify the required parameter 'branch' is set - if (branch == null) - throw new ApiException(400, "Missing required parameter 'branch' when calling BranchesApi->GetBranch"); - - var localVarPath = "/repos/{owner}/{repo}/branches/{branch}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (branch != null) localVarPathParams.Add("branch", this.Configuration.ApiClient.ParameterToString(branch)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetBranch", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List Branches - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - public void ListBranches (string owner, string repo) - { - ListBranchesWithHttpInfo(owner, repo); - } - - /// - /// List Branches - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - public ApiResponse ListBranchesWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling BranchesApi->ListBranches"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling BranchesApi->ListBranches"); - - var localVarPath = "/repos/{owner}/{repo}/branches"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListBranches", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List Branches - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - public async System.Threading.Tasks.Task ListBranchesAsync (string owner, string repo) - { - await ListBranchesAsyncWithHttpInfo(owner, repo); - - } - - /// - /// List Branches - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - public async System.Threading.Tasks.Task> ListBranchesAsyncWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling BranchesApi->ListBranches"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling BranchesApi->ListBranches"); - - var localVarPath = "/repos/{owner}/{repo}/branches"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListBranches", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/C#/src/dagshub_api/Api/CollaboratorsApi.cs b/C#/src/dagshub_api/Api/CollaboratorsApi.cs deleted file mode 100644 index b088cbd..0000000 --- a/C#/src/dagshub_api/Api/CollaboratorsApi.cs +++ /dev/null @@ -1,821 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ICollaboratorsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Add user as a collaborator - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// (optional) - /// - void AddCollaborator (string owner, string repo, string collaborator, CollaboratorsCollaboratorBody body = null); - - /// - /// Add user as a collaborator - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// (optional) - /// ApiResponse of Object(void) - ApiResponse AddCollaboratorWithHttpInfo (string owner, string repo, string collaborator, CollaboratorsCollaboratorBody body = null); - /// - /// Get collaborators - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - void GetCollaborators (string owner, string repo); - - /// - /// Get collaborators - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - ApiResponse GetCollaboratorsWithHttpInfo (string owner, string repo); - /// - /// Delete collaborator - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// - void RemoveCollaborator (string owner, string repo, string collaborator); - - /// - /// Delete collaborator - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// ApiResponse of Object(void) - ApiResponse RemoveCollaboratorWithHttpInfo (string owner, string repo, string collaborator); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Add user as a collaborator - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// (optional) - /// Task of void - System.Threading.Tasks.Task AddCollaboratorAsync (string owner, string repo, string collaborator, CollaboratorsCollaboratorBody body = null); - - /// - /// Add user as a collaborator - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> AddCollaboratorAsyncWithHttpInfo (string owner, string repo, string collaborator, CollaboratorsCollaboratorBody body = null); - /// - /// Get collaborators - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - System.Threading.Tasks.Task GetCollaboratorsAsync (string owner, string repo); - - /// - /// Get collaborators - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - System.Threading.Tasks.Task> GetCollaboratorsAsyncWithHttpInfo (string owner, string repo); - /// - /// Delete collaborator - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// Task of void - System.Threading.Tasks.Task RemoveCollaboratorAsync (string owner, string repo, string collaborator); - - /// - /// Delete collaborator - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// Task of ApiResponse - System.Threading.Tasks.Task> RemoveCollaboratorAsyncWithHttpInfo (string owner, string repo, string collaborator); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class CollaboratorsApi : ICollaboratorsApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public CollaboratorsApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public CollaboratorsApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public CollaboratorsApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Add user as a collaborator - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// (optional) - /// - public void AddCollaborator (string owner, string repo, string collaborator, CollaboratorsCollaboratorBody body = null) - { - AddCollaboratorWithHttpInfo(owner, repo, collaborator, body); - } - - /// - /// Add user as a collaborator - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse AddCollaboratorWithHttpInfo (string owner, string repo, string collaborator, CollaboratorsCollaboratorBody body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling CollaboratorsApi->AddCollaborator"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling CollaboratorsApi->AddCollaborator"); - // verify the required parameter 'collaborator' is set - if (collaborator == null) - throw new ApiException(400, "Missing required parameter 'collaborator' when calling CollaboratorsApi->AddCollaborator"); - - var localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (collaborator != null) localVarPathParams.Add("collaborator", this.Configuration.ApiClient.ParameterToString(collaborator)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddCollaborator", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Add user as a collaborator - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// (optional) - /// Task of void - public async System.Threading.Tasks.Task AddCollaboratorAsync (string owner, string repo, string collaborator, CollaboratorsCollaboratorBody body = null) - { - await AddCollaboratorAsyncWithHttpInfo(owner, repo, collaborator, body); - - } - - /// - /// Add user as a collaborator - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddCollaboratorAsyncWithHttpInfo (string owner, string repo, string collaborator, CollaboratorsCollaboratorBody body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling CollaboratorsApi->AddCollaborator"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling CollaboratorsApi->AddCollaborator"); - // verify the required parameter 'collaborator' is set - if (collaborator == null) - throw new ApiException(400, "Missing required parameter 'collaborator' when calling CollaboratorsApi->AddCollaborator"); - - var localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (collaborator != null) localVarPathParams.Add("collaborator", this.Configuration.ApiClient.ParameterToString(collaborator)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddCollaborator", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get collaborators - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - public void GetCollaborators (string owner, string repo) - { - GetCollaboratorsWithHttpInfo(owner, repo); - } - - /// - /// Get collaborators - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - public ApiResponse GetCollaboratorsWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling CollaboratorsApi->GetCollaborators"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling CollaboratorsApi->GetCollaborators"); - - var localVarPath = "/repos/{owner}/{repo}/collaborators"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetCollaborators", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get collaborators - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - public async System.Threading.Tasks.Task GetCollaboratorsAsync (string owner, string repo) - { - await GetCollaboratorsAsyncWithHttpInfo(owner, repo); - - } - - /// - /// Get collaborators - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetCollaboratorsAsyncWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling CollaboratorsApi->GetCollaborators"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling CollaboratorsApi->GetCollaborators"); - - var localVarPath = "/repos/{owner}/{repo}/collaborators"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetCollaborators", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete collaborator - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// - public void RemoveCollaborator (string owner, string repo, string collaborator) - { - RemoveCollaboratorWithHttpInfo(owner, repo, collaborator); - } - - /// - /// Delete collaborator - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// ApiResponse of Object(void) - public ApiResponse RemoveCollaboratorWithHttpInfo (string owner, string repo, string collaborator) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling CollaboratorsApi->RemoveCollaborator"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling CollaboratorsApi->RemoveCollaborator"); - // verify the required parameter 'collaborator' is set - if (collaborator == null) - throw new ApiException(400, "Missing required parameter 'collaborator' when calling CollaboratorsApi->RemoveCollaborator"); - - var localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (collaborator != null) localVarPathParams.Add("collaborator", this.Configuration.ApiClient.ParameterToString(collaborator)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("RemoveCollaborator", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete collaborator - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// Task of void - public async System.Threading.Tasks.Task RemoveCollaboratorAsync (string owner, string repo, string collaborator) - { - await RemoveCollaboratorAsyncWithHttpInfo(owner, repo, collaborator); - - } - - /// - /// Delete collaborator - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// collaborator username - /// Task of ApiResponse - public async System.Threading.Tasks.Task> RemoveCollaboratorAsyncWithHttpInfo (string owner, string repo, string collaborator) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling CollaboratorsApi->RemoveCollaborator"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling CollaboratorsApi->RemoveCollaborator"); - // verify the required parameter 'collaborator' is set - if (collaborator == null) - throw new ApiException(400, "Missing required parameter 'collaborator' when calling CollaboratorsApi->RemoveCollaborator"); - - var localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (collaborator != null) localVarPathParams.Add("collaborator", this.Configuration.ApiClient.ParameterToString(collaborator)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("RemoveCollaborator", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/C#/src/dagshub_api/Api/CommitsApi.cs b/C#/src/dagshub_api/Api/CommitsApi.cs deleted file mode 100644 index 72582fd..0000000 --- a/C#/src/dagshub_api/Api/CommitsApi.cs +++ /dev/null @@ -1,364 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ICommitsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Get a single commit - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a SHA1 of a commit - /// - void GetCommit (string owner, string repo, string sha); - - /// - /// Get a single commit - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a SHA1 of a commit - /// ApiResponse of Object(void) - ApiResponse GetCommitWithHttpInfo (string owner, string repo, string sha); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Get a single commit - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a SHA1 of a commit - /// Task of void - System.Threading.Tasks.Task GetCommitAsync (string owner, string repo, string sha); - - /// - /// Get a single commit - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a SHA1 of a commit - /// Task of ApiResponse - System.Threading.Tasks.Task> GetCommitAsyncWithHttpInfo (string owner, string repo, string sha); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class CommitsApi : ICommitsApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public CommitsApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public CommitsApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public CommitsApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Get a single commit - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a SHA1 of a commit - /// - public void GetCommit (string owner, string repo, string sha) - { - GetCommitWithHttpInfo(owner, repo, sha); - } - - /// - /// Get a single commit - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a SHA1 of a commit - /// ApiResponse of Object(void) - public ApiResponse GetCommitWithHttpInfo (string owner, string repo, string sha) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling CommitsApi->GetCommit"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling CommitsApi->GetCommit"); - // verify the required parameter 'sha' is set - if (sha == null) - throw new ApiException(400, "Missing required parameter 'sha' when calling CommitsApi->GetCommit"); - - var localVarPath = "/repos/{owner}/{repo}/commits/{sha}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (sha != null) localVarPathParams.Add("sha", this.Configuration.ApiClient.ParameterToString(sha)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetCommit", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get a single commit - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a SHA1 of a commit - /// Task of void - public async System.Threading.Tasks.Task GetCommitAsync (string owner, string repo, string sha) - { - await GetCommitAsyncWithHttpInfo(owner, repo, sha); - - } - - /// - /// Get a single commit - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a SHA1 of a commit - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetCommitAsyncWithHttpInfo (string owner, string repo, string sha) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling CommitsApi->GetCommit"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling CommitsApi->GetCommit"); - // verify the required parameter 'sha' is set - if (sha == null) - throw new ApiException(400, "Missing required parameter 'sha' when calling CommitsApi->GetCommit"); - - var localVarPath = "/repos/{owner}/{repo}/commits/{sha}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (sha != null) localVarPathParams.Add("sha", this.Configuration.ApiClient.ParameterToString(sha)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetCommit", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/C#/src/dagshub_api/Api/ContentApi.cs b/C#/src/dagshub_api/Api/ContentApi.cs deleted file mode 100644 index 749e23c..0000000 --- a/C#/src/dagshub_api/Api/ContentApi.cs +++ /dev/null @@ -1,1182 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IContentApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Download archive - /// - /// - /// This method returns archive by given format. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The format of archive, either .zip or .tar.gz - /// - void GetArchive (string owner, string repo, string _ref, string format); - - /// - /// Download archive - /// - /// - /// This method returns archive by given format. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The format of archive, either .zip or .tar.gz - /// ApiResponse of Object(void) - ApiResponse GetArchiveWithHttpInfo (string owner, string repo, string _ref, string format); - /// - /// List data in a repository folder - /// - /// - /// List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional, default to false) - /// Files - Files GetContent (string owner, string repo, string branch, string path, bool? includeSize = null); - - /// - /// List data in a repository folder - /// - /// - /// List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional, default to false) - /// ApiResponse of Files - ApiResponse GetContentWithHttpInfo (string owner, string repo, string branch, string path, bool? includeSize = null); - /// - /// Download raw content - /// - /// - /// This method returns the raw content of a file. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The content path - /// - void GetRaw (string owner, string repo, string _ref, string path); - - /// - /// Download raw content - /// - /// - /// This method returns the raw content of a file. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The content path - /// ApiResponse of Object(void) - ApiResponse GetRawWithHttpInfo (string owner, string repo, string _ref, string path); - /// - /// Upload data to a repository - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// - void UploadContent (string owner, string repo, string branch, string path, string commitSummary = null, string commitMessage = null, string commitChoice = null, string lastCommit = null, string newBranchName = null, string versioning = null, string files = null); - - /// - /// Upload data to a repository - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// ApiResponse of Object(void) - ApiResponse UploadContentWithHttpInfo (string owner, string repo, string branch, string path, string commitSummary = null, string commitMessage = null, string commitChoice = null, string lastCommit = null, string newBranchName = null, string versioning = null, string files = null); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Download archive - /// - /// - /// This method returns archive by given format. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The format of archive, either .zip or .tar.gz - /// Task of void - System.Threading.Tasks.Task GetArchiveAsync (string owner, string repo, string _ref, string format); - - /// - /// Download archive - /// - /// - /// This method returns archive by given format. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The format of archive, either .zip or .tar.gz - /// Task of ApiResponse - System.Threading.Tasks.Task> GetArchiveAsyncWithHttpInfo (string owner, string repo, string _ref, string format); - /// - /// List data in a repository folder - /// - /// - /// List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional, default to false) - /// Task of Files - System.Threading.Tasks.Task GetContentAsync (string owner, string repo, string branch, string path, bool? includeSize = null); - - /// - /// List data in a repository folder - /// - /// - /// List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional, default to false) - /// Task of ApiResponse (Files) - System.Threading.Tasks.Task> GetContentAsyncWithHttpInfo (string owner, string repo, string branch, string path, bool? includeSize = null); - /// - /// Download raw content - /// - /// - /// This method returns the raw content of a file. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The content path - /// Task of void - System.Threading.Tasks.Task GetRawAsync (string owner, string repo, string _ref, string path); - - /// - /// Download raw content - /// - /// - /// This method returns the raw content of a file. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The content path - /// Task of ApiResponse - System.Threading.Tasks.Task> GetRawAsyncWithHttpInfo (string owner, string repo, string _ref, string path); - /// - /// Upload data to a repository - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Task of void - System.Threading.Tasks.Task UploadContentAsync (string owner, string repo, string branch, string path, string commitSummary = null, string commitMessage = null, string commitChoice = null, string lastCommit = null, string newBranchName = null, string versioning = null, string files = null); - - /// - /// Upload data to a repository - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UploadContentAsyncWithHttpInfo (string owner, string repo, string branch, string path, string commitSummary = null, string commitMessage = null, string commitChoice = null, string lastCommit = null, string newBranchName = null, string versioning = null, string files = null); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class ContentApi : IContentApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public ContentApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public ContentApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public ContentApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Download archive This method returns archive by given format. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The format of archive, either .zip or .tar.gz - /// - public void GetArchive (string owner, string repo, string _ref, string format) - { - GetArchiveWithHttpInfo(owner, repo, _ref, format); - } - - /// - /// Download archive This method returns archive by given format. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The format of archive, either .zip or .tar.gz - /// ApiResponse of Object(void) - public ApiResponse GetArchiveWithHttpInfo (string owner, string repo, string _ref, string format) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ContentApi->GetArchive"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ContentApi->GetArchive"); - // verify the required parameter '_ref' is set - if (_ref == null) - throw new ApiException(400, "Missing required parameter '_ref' when calling ContentApi->GetArchive"); - // verify the required parameter 'format' is set - if (format == null) - throw new ApiException(400, "Missing required parameter 'format' when calling ContentApi->GetArchive"); - - var localVarPath = "/repos/{owner}/{repo}/archive/{ref}{format}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (_ref != null) localVarPathParams.Add("ref", this.Configuration.ApiClient.ParameterToString(_ref)); // path parameter - if (format != null) localVarPathParams.Add("format", this.Configuration.ApiClient.ParameterToString(format)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetArchive", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Download archive This method returns archive by given format. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The format of archive, either .zip or .tar.gz - /// Task of void - public async System.Threading.Tasks.Task GetArchiveAsync (string owner, string repo, string _ref, string format) - { - await GetArchiveAsyncWithHttpInfo(owner, repo, _ref, format); - - } - - /// - /// Download archive This method returns archive by given format. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The format of archive, either .zip or .tar.gz - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetArchiveAsyncWithHttpInfo (string owner, string repo, string _ref, string format) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ContentApi->GetArchive"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ContentApi->GetArchive"); - // verify the required parameter '_ref' is set - if (_ref == null) - throw new ApiException(400, "Missing required parameter '_ref' when calling ContentApi->GetArchive"); - // verify the required parameter 'format' is set - if (format == null) - throw new ApiException(400, "Missing required parameter 'format' when calling ContentApi->GetArchive"); - - var localVarPath = "/repos/{owner}/{repo}/archive/{ref}{format}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (_ref != null) localVarPathParams.Add("ref", this.Configuration.ApiClient.ParameterToString(_ref)); // path parameter - if (format != null) localVarPathParams.Add("format", this.Configuration.ApiClient.ParameterToString(format)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetArchive", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List data in a repository folder List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional, default to false) - /// Files - public Files GetContent (string owner, string repo, string branch, string path, bool? includeSize = null) - { - ApiResponse localVarResponse = GetContentWithHttpInfo(owner, repo, branch, path, includeSize); - return localVarResponse.Data; - } - - /// - /// List data in a repository folder List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional, default to false) - /// ApiResponse of Files - public ApiResponse< Files > GetContentWithHttpInfo (string owner, string repo, string branch, string path, bool? includeSize = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ContentApi->GetContent"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ContentApi->GetContent"); - // verify the required parameter 'branch' is set - if (branch == null) - throw new ApiException(400, "Missing required parameter 'branch' when calling ContentApi->GetContent"); - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling ContentApi->GetContent"); - - var localVarPath = "/repos/{owner}/{repo}/content/{branch}/{path}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (branch != null) localVarPathParams.Add("branch", this.Configuration.ApiClient.ParameterToString(branch)); // path parameter - if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter - if (includeSize != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "include_size", includeSize)); // query parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetContent", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Files) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Files))); - } - - /// - /// List data in a repository folder List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional, default to false) - /// Task of Files - public async System.Threading.Tasks.Task GetContentAsync (string owner, string repo, string branch, string path, bool? includeSize = null) - { - ApiResponse localVarResponse = await GetContentAsyncWithHttpInfo(owner, repo, branch, path, includeSize); - return localVarResponse.Data; - - } - - /// - /// List data in a repository folder List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional, default to false) - /// Task of ApiResponse (Files) - public async System.Threading.Tasks.Task> GetContentAsyncWithHttpInfo (string owner, string repo, string branch, string path, bool? includeSize = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ContentApi->GetContent"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ContentApi->GetContent"); - // verify the required parameter 'branch' is set - if (branch == null) - throw new ApiException(400, "Missing required parameter 'branch' when calling ContentApi->GetContent"); - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling ContentApi->GetContent"); - - var localVarPath = "/repos/{owner}/{repo}/content/{branch}/{path}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (branch != null) localVarPathParams.Add("branch", this.Configuration.ApiClient.ParameterToString(branch)); // path parameter - if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter - if (includeSize != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "include_size", includeSize)); // query parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetContent", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Files) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Files))); - } - - /// - /// Download raw content This method returns the raw content of a file. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The content path - /// - public void GetRaw (string owner, string repo, string _ref, string path) - { - GetRawWithHttpInfo(owner, repo, _ref, path); - } - - /// - /// Download raw content This method returns the raw content of a file. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The content path - /// ApiResponse of Object(void) - public ApiResponse GetRawWithHttpInfo (string owner, string repo, string _ref, string path) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ContentApi->GetRaw"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ContentApi->GetRaw"); - // verify the required parameter '_ref' is set - if (_ref == null) - throw new ApiException(400, "Missing required parameter '_ref' when calling ContentApi->GetRaw"); - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling ContentApi->GetRaw"); - - var localVarPath = "/repos/{owner}/{repo}/raw/{ref}/{path}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (_ref != null) localVarPathParams.Add("ref", this.Configuration.ApiClient.ParameterToString(_ref)); // path parameter - if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetRaw", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Download raw content This method returns the raw content of a file. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The content path - /// Task of void - public async System.Threading.Tasks.Task GetRawAsync (string owner, string repo, string _ref, string path) - { - await GetRawAsyncWithHttpInfo(owner, repo, _ref, path); - - } - - /// - /// Download raw content This method returns the raw content of a file. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// The name of the commit/branch/tag - /// The content path - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetRawAsyncWithHttpInfo (string owner, string repo, string _ref, string path) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ContentApi->GetRaw"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ContentApi->GetRaw"); - // verify the required parameter '_ref' is set - if (_ref == null) - throw new ApiException(400, "Missing required parameter '_ref' when calling ContentApi->GetRaw"); - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling ContentApi->GetRaw"); - - var localVarPath = "/repos/{owner}/{repo}/raw/{ref}/{path}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (_ref != null) localVarPathParams.Add("ref", this.Configuration.ApiClient.ParameterToString(_ref)); // path parameter - if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetRaw", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Upload data to a repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// - public void UploadContent (string owner, string repo, string branch, string path, string commitSummary = null, string commitMessage = null, string commitChoice = null, string lastCommit = null, string newBranchName = null, string versioning = null, string files = null) - { - UploadContentWithHttpInfo(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files); - } - - /// - /// Upload data to a repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse UploadContentWithHttpInfo (string owner, string repo, string branch, string path, string commitSummary = null, string commitMessage = null, string commitChoice = null, string lastCommit = null, string newBranchName = null, string versioning = null, string files = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ContentApi->UploadContent"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ContentApi->UploadContent"); - // verify the required parameter 'branch' is set - if (branch == null) - throw new ApiException(400, "Missing required parameter 'branch' when calling ContentApi->UploadContent"); - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling ContentApi->UploadContent"); - - var localVarPath = "/repos/{owner}/{repo}/content/{branch}/{path}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (branch != null) localVarPathParams.Add("branch", this.Configuration.ApiClient.ParameterToString(branch)); // path parameter - if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter - if (commitSummary != null) localVarFormParams.Add("commit_summary", this.Configuration.ApiClient.ParameterToString(commitSummary)); // form parameter - if (commitMessage != null) localVarFormParams.Add("commit_message", this.Configuration.ApiClient.ParameterToString(commitMessage)); // form parameter - if (commitChoice != null) localVarFormParams.Add("commit_choice", this.Configuration.ApiClient.ParameterToString(commitChoice)); // form parameter - if (lastCommit != null) localVarFormParams.Add("last_commit", this.Configuration.ApiClient.ParameterToString(lastCommit)); // form parameter - if (newBranchName != null) localVarFormParams.Add("new_branch_name", this.Configuration.ApiClient.ParameterToString(newBranchName)); // form parameter - if (versioning != null) localVarFormParams.Add("versioning", this.Configuration.ApiClient.ParameterToString(versioning)); // form parameter - if (files != null) localVarFormParams.Add("files", this.Configuration.ApiClient.ParameterToString(files)); // form parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadContent", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Upload data to a repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Task of void - public async System.Threading.Tasks.Task UploadContentAsync (string owner, string repo, string branch, string path, string commitSummary = null, string commitMessage = null, string commitChoice = null, string lastCommit = null, string newBranchName = null, string versioning = null, string files = null) - { - await UploadContentAsyncWithHttpInfo(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files); - - } - - /// - /// Upload data to a repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// branch of the repository - /// path of a folder in the repository - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UploadContentAsyncWithHttpInfo (string owner, string repo, string branch, string path, string commitSummary = null, string commitMessage = null, string commitChoice = null, string lastCommit = null, string newBranchName = null, string versioning = null, string files = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ContentApi->UploadContent"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ContentApi->UploadContent"); - // verify the required parameter 'branch' is set - if (branch == null) - throw new ApiException(400, "Missing required parameter 'branch' when calling ContentApi->UploadContent"); - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling ContentApi->UploadContent"); - - var localVarPath = "/repos/{owner}/{repo}/content/{branch}/{path}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (branch != null) localVarPathParams.Add("branch", this.Configuration.ApiClient.ParameterToString(branch)); // path parameter - if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter - if (commitSummary != null) localVarFormParams.Add("commit_summary", this.Configuration.ApiClient.ParameterToString(commitSummary)); // form parameter - if (commitMessage != null) localVarFormParams.Add("commit_message", this.Configuration.ApiClient.ParameterToString(commitMessage)); // form parameter - if (commitChoice != null) localVarFormParams.Add("commit_choice", this.Configuration.ApiClient.ParameterToString(commitChoice)); // form parameter - if (lastCommit != null) localVarFormParams.Add("last_commit", this.Configuration.ApiClient.ParameterToString(lastCommit)); // form parameter - if (newBranchName != null) localVarFormParams.Add("new_branch_name", this.Configuration.ApiClient.ParameterToString(newBranchName)); // form parameter - if (versioning != null) localVarFormParams.Add("versioning", this.Configuration.ApiClient.ParameterToString(versioning)); // form parameter - if (files != null) localVarFormParams.Add("files", this.Configuration.ApiClient.ParameterToString(files)); // form parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadContent", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/C#/src/dagshub_api/Api/ExperimentsApi.cs b/C#/src/dagshub_api/Api/ExperimentsApi.cs deleted file mode 100644 index 2ca37d2..0000000 --- a/C#/src/dagshub_api/Api/ExperimentsApi.cs +++ /dev/null @@ -1,1540 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IExperimentsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Add label to experiment - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// - void AddExperimentLabel (string owner, string repo, string experimentKey, string experimentLabel); - - /// - /// Add label to experiment - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// ApiResponse of Object(void) - ApiResponse AddExperimentLabelWithHttpInfo (string owner, string repo, string experimentKey, string experimentLabel); - /// - /// Delete experiment - /// - /// - /// Support both git and MLflow experiments - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// - void DeleteExperiment (string owner, string repo, string experimentKey); - - /// - /// Delete experiment - /// - /// - /// Support both git and MLflow experiments - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// ApiResponse of Object(void) - ApiResponse DeleteExperimentWithHttpInfo (string owner, string repo, string experimentKey); - /// - /// Delete experiment label - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// - void DeleteExperimentLabel (string owner, string repo, string experimentKey, string experimentLabel); - - /// - /// Delete experiment label - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// ApiResponse of Object(void) - ApiResponse DeleteExperimentLabelWithHttpInfo (string owner, string repo, string experimentKey, string experimentLabel); - /// - /// Edit experiment info - /// - /// - /// Edit experiment info, currently supports just changing experiment name. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// (optional) - /// - void EditExperiment (string owner, string repo, string experimentKey, EditExperimentPost body = null); - - /// - /// Edit experiment info - /// - /// - /// Edit experiment info, currently supports just changing experiment name. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// (optional) - /// ApiResponse of Object(void) - ApiResponse EditExperimentWithHttpInfo (string owner, string repo, string experimentKey, EditExperimentPost body = null); - /// - /// Get experiment metrics for experiment - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// - void GetExperimentMetrics (string owner, string repo, ExperimentKeys body = null); - - /// - /// Get experiment metrics for experiment - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// ApiResponse of Object(void) - ApiResponse GetExperimentMetricsWithHttpInfo (string owner, string repo, ExperimentKeys body = null); - /// - /// List Experiments - /// - /// - /// Get a list of experiments in the given repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - void GetExperiments (string owner, string repo); - - /// - /// List Experiments - /// - /// - /// Get a list of experiments in the given repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - ApiResponse GetExperimentsWithHttpInfo (string owner, string repo); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Add label to experiment - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// Task of void - System.Threading.Tasks.Task AddExperimentLabelAsync (string owner, string repo, string experimentKey, string experimentLabel); - - /// - /// Add label to experiment - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// Task of ApiResponse - System.Threading.Tasks.Task> AddExperimentLabelAsyncWithHttpInfo (string owner, string repo, string experimentKey, string experimentLabel); - /// - /// Delete experiment - /// - /// - /// Support both git and MLflow experiments - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// Task of void - System.Threading.Tasks.Task DeleteExperimentAsync (string owner, string repo, string experimentKey); - - /// - /// Delete experiment - /// - /// - /// Support both git and MLflow experiments - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteExperimentAsyncWithHttpInfo (string owner, string repo, string experimentKey); - /// - /// Delete experiment label - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// Task of void - System.Threading.Tasks.Task DeleteExperimentLabelAsync (string owner, string repo, string experimentKey, string experimentLabel); - - /// - /// Delete experiment label - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteExperimentLabelAsyncWithHttpInfo (string owner, string repo, string experimentKey, string experimentLabel); - /// - /// Edit experiment info - /// - /// - /// Edit experiment info, currently supports just changing experiment name. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// (optional) - /// Task of void - System.Threading.Tasks.Task EditExperimentAsync (string owner, string repo, string experimentKey, EditExperimentPost body = null); - - /// - /// Edit experiment info - /// - /// - /// Edit experiment info, currently supports just changing experiment name. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> EditExperimentAsyncWithHttpInfo (string owner, string repo, string experimentKey, EditExperimentPost body = null); - /// - /// Get experiment metrics for experiment - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of void - System.Threading.Tasks.Task GetExperimentMetricsAsync (string owner, string repo, ExperimentKeys body = null); - - /// - /// Get experiment metrics for experiment - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> GetExperimentMetricsAsyncWithHttpInfo (string owner, string repo, ExperimentKeys body = null); - /// - /// List Experiments - /// - /// - /// Get a list of experiments in the given repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - System.Threading.Tasks.Task GetExperimentsAsync (string owner, string repo); - - /// - /// List Experiments - /// - /// - /// Get a list of experiments in the given repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - System.Threading.Tasks.Task> GetExperimentsAsyncWithHttpInfo (string owner, string repo); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class ExperimentsApi : IExperimentsApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public ExperimentsApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public ExperimentsApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public ExperimentsApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Add label to experiment - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// - public void AddExperimentLabel (string owner, string repo, string experimentKey, string experimentLabel) - { - AddExperimentLabelWithHttpInfo(owner, repo, experimentKey, experimentLabel); - } - - /// - /// Add label to experiment - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// ApiResponse of Object(void) - public ApiResponse AddExperimentLabelWithHttpInfo (string owner, string repo, string experimentKey, string experimentLabel) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->AddExperimentLabel"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->AddExperimentLabel"); - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) - throw new ApiException(400, "Missing required parameter 'experimentKey' when calling ExperimentsApi->AddExperimentLabel"); - // verify the required parameter 'experimentLabel' is set - if (experimentLabel == null) - throw new ApiException(400, "Missing required parameter 'experimentLabel' when calling ExperimentsApi->AddExperimentLabel"); - - var localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (experimentKey != null) localVarPathParams.Add("experimentKey", this.Configuration.ApiClient.ParameterToString(experimentKey)); // path parameter - if (experimentLabel != null) localVarPathParams.Add("experimentLabel", this.Configuration.ApiClient.ParameterToString(experimentLabel)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddExperimentLabel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Add label to experiment - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// Task of void - public async System.Threading.Tasks.Task AddExperimentLabelAsync (string owner, string repo, string experimentKey, string experimentLabel) - { - await AddExperimentLabelAsyncWithHttpInfo(owner, repo, experimentKey, experimentLabel); - - } - - /// - /// Add label to experiment - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddExperimentLabelAsyncWithHttpInfo (string owner, string repo, string experimentKey, string experimentLabel) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->AddExperimentLabel"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->AddExperimentLabel"); - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) - throw new ApiException(400, "Missing required parameter 'experimentKey' when calling ExperimentsApi->AddExperimentLabel"); - // verify the required parameter 'experimentLabel' is set - if (experimentLabel == null) - throw new ApiException(400, "Missing required parameter 'experimentLabel' when calling ExperimentsApi->AddExperimentLabel"); - - var localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (experimentKey != null) localVarPathParams.Add("experimentKey", this.Configuration.ApiClient.ParameterToString(experimentKey)); // path parameter - if (experimentLabel != null) localVarPathParams.Add("experimentLabel", this.Configuration.ApiClient.ParameterToString(experimentLabel)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddExperimentLabel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete experiment Support both git and MLflow experiments - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// - public void DeleteExperiment (string owner, string repo, string experimentKey) - { - DeleteExperimentWithHttpInfo(owner, repo, experimentKey); - } - - /// - /// Delete experiment Support both git and MLflow experiments - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// ApiResponse of Object(void) - public ApiResponse DeleteExperimentWithHttpInfo (string owner, string repo, string experimentKey) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->DeleteExperiment"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->DeleteExperiment"); - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) - throw new ApiException(400, "Missing required parameter 'experimentKey' when calling ExperimentsApi->DeleteExperiment"); - - var localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (experimentKey != null) localVarPathParams.Add("experimentKey", this.Configuration.ApiClient.ParameterToString(experimentKey)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteExperiment", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete experiment Support both git and MLflow experiments - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// Task of void - public async System.Threading.Tasks.Task DeleteExperimentAsync (string owner, string repo, string experimentKey) - { - await DeleteExperimentAsyncWithHttpInfo(owner, repo, experimentKey); - - } - - /// - /// Delete experiment Support both git and MLflow experiments - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteExperimentAsyncWithHttpInfo (string owner, string repo, string experimentKey) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->DeleteExperiment"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->DeleteExperiment"); - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) - throw new ApiException(400, "Missing required parameter 'experimentKey' when calling ExperimentsApi->DeleteExperiment"); - - var localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (experimentKey != null) localVarPathParams.Add("experimentKey", this.Configuration.ApiClient.ParameterToString(experimentKey)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteExperiment", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete experiment label - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// - public void DeleteExperimentLabel (string owner, string repo, string experimentKey, string experimentLabel) - { - DeleteExperimentLabelWithHttpInfo(owner, repo, experimentKey, experimentLabel); - } - - /// - /// Delete experiment label - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// ApiResponse of Object(void) - public ApiResponse DeleteExperimentLabelWithHttpInfo (string owner, string repo, string experimentKey, string experimentLabel) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->DeleteExperimentLabel"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->DeleteExperimentLabel"); - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) - throw new ApiException(400, "Missing required parameter 'experimentKey' when calling ExperimentsApi->DeleteExperimentLabel"); - // verify the required parameter 'experimentLabel' is set - if (experimentLabel == null) - throw new ApiException(400, "Missing required parameter 'experimentLabel' when calling ExperimentsApi->DeleteExperimentLabel"); - - var localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (experimentKey != null) localVarPathParams.Add("experimentKey", this.Configuration.ApiClient.ParameterToString(experimentKey)); // path parameter - if (experimentLabel != null) localVarPathParams.Add("experimentLabel", this.Configuration.ApiClient.ParameterToString(experimentLabel)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteExperimentLabel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete experiment label - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// Task of void - public async System.Threading.Tasks.Task DeleteExperimentLabelAsync (string owner, string repo, string experimentKey, string experimentLabel) - { - await DeleteExperimentLabelAsyncWithHttpInfo(owner, repo, experimentKey, experimentLabel); - - } - - /// - /// Delete experiment label - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// A label for the experiment, max 128 characters. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteExperimentLabelAsyncWithHttpInfo (string owner, string repo, string experimentKey, string experimentLabel) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->DeleteExperimentLabel"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->DeleteExperimentLabel"); - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) - throw new ApiException(400, "Missing required parameter 'experimentKey' when calling ExperimentsApi->DeleteExperimentLabel"); - // verify the required parameter 'experimentLabel' is set - if (experimentLabel == null) - throw new ApiException(400, "Missing required parameter 'experimentLabel' when calling ExperimentsApi->DeleteExperimentLabel"); - - var localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (experimentKey != null) localVarPathParams.Add("experimentKey", this.Configuration.ApiClient.ParameterToString(experimentKey)); // path parameter - if (experimentLabel != null) localVarPathParams.Add("experimentLabel", this.Configuration.ApiClient.ParameterToString(experimentLabel)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteExperimentLabel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Edit experiment info Edit experiment info, currently supports just changing experiment name. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// (optional) - /// - public void EditExperiment (string owner, string repo, string experimentKey, EditExperimentPost body = null) - { - EditExperimentWithHttpInfo(owner, repo, experimentKey, body); - } - - /// - /// Edit experiment info Edit experiment info, currently supports just changing experiment name. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse EditExperimentWithHttpInfo (string owner, string repo, string experimentKey, EditExperimentPost body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->EditExperiment"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->EditExperiment"); - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) - throw new ApiException(400, "Missing required parameter 'experimentKey' when calling ExperimentsApi->EditExperiment"); - - var localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (experimentKey != null) localVarPathParams.Add("experimentKey", this.Configuration.ApiClient.ParameterToString(experimentKey)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("EditExperiment", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Edit experiment info Edit experiment info, currently supports just changing experiment name. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// (optional) - /// Task of void - public async System.Threading.Tasks.Task EditExperimentAsync (string owner, string repo, string experimentKey, EditExperimentPost body = null) - { - await EditExperimentAsyncWithHttpInfo(owner, repo, experimentKey, body); - - } - - /// - /// Edit experiment info Edit experiment info, currently supports just changing experiment name. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// a valid experiment key - /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> EditExperimentAsyncWithHttpInfo (string owner, string repo, string experimentKey, EditExperimentPost body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->EditExperiment"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->EditExperiment"); - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) - throw new ApiException(400, "Missing required parameter 'experimentKey' when calling ExperimentsApi->EditExperiment"); - - var localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (experimentKey != null) localVarPathParams.Add("experimentKey", this.Configuration.ApiClient.ParameterToString(experimentKey)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("EditExperiment", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get experiment metrics for experiment - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// - public void GetExperimentMetrics (string owner, string repo, ExperimentKeys body = null) - { - GetExperimentMetricsWithHttpInfo(owner, repo, body); - } - - /// - /// Get experiment metrics for experiment - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse GetExperimentMetricsWithHttpInfo (string owner, string repo, ExperimentKeys body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->GetExperimentMetrics"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->GetExperimentMetrics"); - - var localVarPath = "/repos/{owner}/{repo}/experiments/metricsForExperiments"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetExperimentMetrics", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get experiment metrics for experiment - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of void - public async System.Threading.Tasks.Task GetExperimentMetricsAsync (string owner, string repo, ExperimentKeys body = null) - { - await GetExperimentMetricsAsyncWithHttpInfo(owner, repo, body); - - } - - /// - /// Get experiment metrics for experiment - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetExperimentMetricsAsyncWithHttpInfo (string owner, string repo, ExperimentKeys body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->GetExperimentMetrics"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->GetExperimentMetrics"); - - var localVarPath = "/repos/{owner}/{repo}/experiments/metricsForExperiments"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetExperimentMetrics", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List Experiments Get a list of experiments in the given repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - public void GetExperiments (string owner, string repo) - { - GetExperimentsWithHttpInfo(owner, repo); - } - - /// - /// List Experiments Get a list of experiments in the given repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - public ApiResponse GetExperimentsWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->GetExperiments"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->GetExperiments"); - - var localVarPath = "/repos/{owner}/{repo}/experiments"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetExperiments", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List Experiments Get a list of experiments in the given repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - public async System.Threading.Tasks.Task GetExperimentsAsync (string owner, string repo) - { - await GetExperimentsAsyncWithHttpInfo(owner, repo); - - } - - /// - /// List Experiments Get a list of experiments in the given repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetExperimentsAsyncWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ExperimentsApi->GetExperiments"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ExperimentsApi->GetExperiments"); - - var localVarPath = "/repos/{owner}/{repo}/experiments"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetExperiments", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/C#/src/dagshub_api/Api/IssuesApi.cs b/C#/src/dagshub_api/Api/IssuesApi.cs deleted file mode 100644 index 94af158..0000000 --- a/C#/src/dagshub_api/Api/IssuesApi.cs +++ /dev/null @@ -1,1052 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IIssuesApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create an issue - /// - /// - /// Any user with read access to a repository can create an issue. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Issue - Issue CreateIssue (string owner, string repo, PostIssue body = null); - - /// - /// Create an issue - /// - /// - /// Any user with read access to a repository can create an issue. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// ApiResponse of Issue - ApiResponse CreateIssueWithHttpInfo (string owner, string repo, PostIssue body = null); - /// - /// Edit an issue - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Issue - Issue EditIssue (string owner, string repo, PatchIssue body = null); - - /// - /// Edit an issue - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// ApiResponse of Issue - ApiResponse EditIssueWithHttpInfo (string owner, string repo, PatchIssue body = null); - /// - /// Get a single issue - /// - /// - /// This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// the index of an issue or a pull request - /// Issue - Issue GetIssue (string owner, string repo, int? index); - - /// - /// Get a single issue - /// - /// - /// This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// the index of an issue or a pull request - /// ApiResponse of Issue - ApiResponse GetIssueWithHttpInfo (string owner, string repo, int? index); - /// - /// List issues for a repository - /// - /// - /// This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Issues - Issues ListRepoIssues (string owner, string repo); - - /// - /// List issues for a repository - /// - /// - /// This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Issues - ApiResponse ListRepoIssuesWithHttpInfo (string owner, string repo); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create an issue - /// - /// - /// Any user with read access to a repository can create an issue. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of Issue - System.Threading.Tasks.Task CreateIssueAsync (string owner, string repo, PostIssue body = null); - - /// - /// Create an issue - /// - /// - /// Any user with read access to a repository can create an issue. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of ApiResponse (Issue) - System.Threading.Tasks.Task> CreateIssueAsyncWithHttpInfo (string owner, string repo, PostIssue body = null); - /// - /// Edit an issue - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of Issue - System.Threading.Tasks.Task EditIssueAsync (string owner, string repo, PatchIssue body = null); - - /// - /// Edit an issue - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of ApiResponse (Issue) - System.Threading.Tasks.Task> EditIssueAsyncWithHttpInfo (string owner, string repo, PatchIssue body = null); - /// - /// Get a single issue - /// - /// - /// This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// the index of an issue or a pull request - /// Task of Issue - System.Threading.Tasks.Task GetIssueAsync (string owner, string repo, int? index); - - /// - /// Get a single issue - /// - /// - /// This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// the index of an issue or a pull request - /// Task of ApiResponse (Issue) - System.Threading.Tasks.Task> GetIssueAsyncWithHttpInfo (string owner, string repo, int? index); - /// - /// List issues for a repository - /// - /// - /// This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of Issues - System.Threading.Tasks.Task ListRepoIssuesAsync (string owner, string repo); - - /// - /// List issues for a repository - /// - /// - /// This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse (Issues) - System.Threading.Tasks.Task> ListRepoIssuesAsyncWithHttpInfo (string owner, string repo); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class IssuesApi : IIssuesApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public IssuesApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public IssuesApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public IssuesApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create an issue Any user with read access to a repository can create an issue. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Issue - public Issue CreateIssue (string owner, string repo, PostIssue body = null) - { - ApiResponse localVarResponse = CreateIssueWithHttpInfo(owner, repo, body); - return localVarResponse.Data; - } - - /// - /// Create an issue Any user with read access to a repository can create an issue. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// ApiResponse of Issue - public ApiResponse< Issue > CreateIssueWithHttpInfo (string owner, string repo, PostIssue body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling IssuesApi->CreateIssue"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling IssuesApi->CreateIssue"); - - var localVarPath = "/repos/{owner}/{repo}/issues"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateIssue", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Issue) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Issue))); - } - - /// - /// Create an issue Any user with read access to a repository can create an issue. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of Issue - public async System.Threading.Tasks.Task CreateIssueAsync (string owner, string repo, PostIssue body = null) - { - ApiResponse localVarResponse = await CreateIssueAsyncWithHttpInfo(owner, repo, body); - return localVarResponse.Data; - - } - - /// - /// Create an issue Any user with read access to a repository can create an issue. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of ApiResponse (Issue) - public async System.Threading.Tasks.Task> CreateIssueAsyncWithHttpInfo (string owner, string repo, PostIssue body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling IssuesApi->CreateIssue"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling IssuesApi->CreateIssue"); - - var localVarPath = "/repos/{owner}/{repo}/issues"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateIssue", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Issue) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Issue))); - } - - /// - /// Edit an issue - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Issue - public Issue EditIssue (string owner, string repo, PatchIssue body = null) - { - ApiResponse localVarResponse = EditIssueWithHttpInfo(owner, repo, body); - return localVarResponse.Data; - } - - /// - /// Edit an issue - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// ApiResponse of Issue - public ApiResponse< Issue > EditIssueWithHttpInfo (string owner, string repo, PatchIssue body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling IssuesApi->EditIssue"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling IssuesApi->EditIssue"); - - var localVarPath = "/repos/{owner}/{repo}/issues"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("EditIssue", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Issue) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Issue))); - } - - /// - /// Edit an issue - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of Issue - public async System.Threading.Tasks.Task EditIssueAsync (string owner, string repo, PatchIssue body = null) - { - ApiResponse localVarResponse = await EditIssueAsyncWithHttpInfo(owner, repo, body); - return localVarResponse.Data; - - } - - /// - /// Edit an issue - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of ApiResponse (Issue) - public async System.Threading.Tasks.Task> EditIssueAsyncWithHttpInfo (string owner, string repo, PatchIssue body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling IssuesApi->EditIssue"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling IssuesApi->EditIssue"); - - var localVarPath = "/repos/{owner}/{repo}/issues"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("EditIssue", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Issue) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Issue))); - } - - /// - /// Get a single issue This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// the index of an issue or a pull request - /// Issue - public Issue GetIssue (string owner, string repo, int? index) - { - ApiResponse localVarResponse = GetIssueWithHttpInfo(owner, repo, index); - return localVarResponse.Data; - } - - /// - /// Get a single issue This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// the index of an issue or a pull request - /// ApiResponse of Issue - public ApiResponse< Issue > GetIssueWithHttpInfo (string owner, string repo, int? index) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling IssuesApi->GetIssue"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling IssuesApi->GetIssue"); - // verify the required parameter 'index' is set - if (index == null) - throw new ApiException(400, "Missing required parameter 'index' when calling IssuesApi->GetIssue"); - - var localVarPath = "/repos/{owner}/{repo}/issues/{index}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (index != null) localVarPathParams.Add("index", this.Configuration.ApiClient.ParameterToString(index)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetIssue", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Issue) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Issue))); - } - - /// - /// Get a single issue This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// the index of an issue or a pull request - /// Task of Issue - public async System.Threading.Tasks.Task GetIssueAsync (string owner, string repo, int? index) - { - ApiResponse localVarResponse = await GetIssueAsyncWithHttpInfo(owner, repo, index); - return localVarResponse.Data; - - } - - /// - /// Get a single issue This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// the index of an issue or a pull request - /// Task of ApiResponse (Issue) - public async System.Threading.Tasks.Task> GetIssueAsyncWithHttpInfo (string owner, string repo, int? index) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling IssuesApi->GetIssue"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling IssuesApi->GetIssue"); - // verify the required parameter 'index' is set - if (index == null) - throw new ApiException(400, "Missing required parameter 'index' when calling IssuesApi->GetIssue"); - - var localVarPath = "/repos/{owner}/{repo}/issues/{index}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (index != null) localVarPathParams.Add("index", this.Configuration.ApiClient.ParameterToString(index)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetIssue", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Issue) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Issue))); - } - - /// - /// List issues for a repository This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Issues - public Issues ListRepoIssues (string owner, string repo) - { - ApiResponse localVarResponse = ListRepoIssuesWithHttpInfo(owner, repo); - return localVarResponse.Data; - } - - /// - /// List issues for a repository This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Issues - public ApiResponse< Issues > ListRepoIssuesWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling IssuesApi->ListRepoIssues"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling IssuesApi->ListRepoIssues"); - - var localVarPath = "/repos/{owner}/{repo}/issues"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListRepoIssues", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Issues) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Issues))); - } - - /// - /// List issues for a repository This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of Issues - public async System.Threading.Tasks.Task ListRepoIssuesAsync (string owner, string repo) - { - ApiResponse localVarResponse = await ListRepoIssuesAsyncWithHttpInfo(owner, repo); - return localVarResponse.Data; - - } - - /// - /// List issues for a repository This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse (Issues) - public async System.Threading.Tasks.Task> ListRepoIssuesAsyncWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling IssuesApi->ListRepoIssues"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling IssuesApi->ListRepoIssues"); - - var localVarPath = "/repos/{owner}/{repo}/issues"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListRepoIssues", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Issues) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Issues))); - } - - } -} diff --git a/C#/src/dagshub_api/Api/ReleasesApi.cs b/C#/src/dagshub_api/Api/ReleasesApi.cs deleted file mode 100644 index 263efe4..0000000 --- a/C#/src/dagshub_api/Api/ReleasesApi.cs +++ /dev/null @@ -1,348 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IReleasesApi : IApiAccessor - { - #region Synchronous Operations - /// - /// List Releases - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - void ListReleases (string owner, string repo); - - /// - /// List Releases - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - ApiResponse ListReleasesWithHttpInfo (string owner, string repo); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// List Releases - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - System.Threading.Tasks.Task ListReleasesAsync (string owner, string repo); - - /// - /// List Releases - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - System.Threading.Tasks.Task> ListReleasesAsyncWithHttpInfo (string owner, string repo); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class ReleasesApi : IReleasesApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public ReleasesApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public ReleasesApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public ReleasesApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// List Releases - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - public void ListReleases (string owner, string repo) - { - ListReleasesWithHttpInfo(owner, repo); - } - - /// - /// List Releases - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - public ApiResponse ListReleasesWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ReleasesApi->ListReleases"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ReleasesApi->ListReleases"); - - var localVarPath = "/repos/{owner}/{repo}/releases"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListReleases", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List Releases - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - public async System.Threading.Tasks.Task ListReleasesAsync (string owner, string repo) - { - await ListReleasesAsyncWithHttpInfo(owner, repo); - - } - - /// - /// List Releases - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - public async System.Threading.Tasks.Task> ListReleasesAsyncWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling ReleasesApi->ListReleases"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling ReleasesApi->ListReleases"); - - var localVarPath = "/repos/{owner}/{repo}/releases"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListReleases", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/C#/src/dagshub_api/Api/RepositoryApi.cs b/C#/src/dagshub_api/Api/RepositoryApi.cs deleted file mode 100644 index d3ae0ca..0000000 --- a/C#/src/dagshub_api/Api/RepositoryApi.cs +++ /dev/null @@ -1,1752 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IRepositoryApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create in organization - /// - /// - /// Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// (optional) - /// - void CreateOrgRepo (string orgname, CreateRepo body = null); - - /// - /// Create in organization - /// - /// - /// Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// (optional) - /// ApiResponse of Object(void) - ApiResponse CreateOrgRepoWithHttpInfo (string orgname, CreateRepo body = null); - /// - /// Create - /// - /// - /// Create a new repository for the authenticated user. - /// - /// Thrown when fails to make API call - /// (optional) - /// - void CreateRepo (CreateRepo body = null); - - /// - /// Create - /// - /// - /// Create a new repository for the authenticated user. - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of Object(void) - ApiResponse CreateRepoWithHttpInfo (CreateRepo body = null); - /// - /// Get repository information - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - void GetRepo (string owner, string repo); - - /// - /// Get repository information - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - ApiResponse GetRepoWithHttpInfo (string owner, string repo); - /// - /// List your repositories - /// - /// - /// List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - /// - /// Thrown when fails to make API call - /// Object - Object ListMyRepos (); - - /// - /// List your repositories - /// - /// - /// List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - /// - /// Thrown when fails to make API call - /// ApiResponse of Object - ApiResponse ListMyReposWithHttpInfo (); - /// - /// List organization repositories - /// - /// - /// List repositories that are accessible to the authenticated user. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// - void ListOrgRepos (string orgname); - - /// - /// List organization repositories - /// - /// - /// List repositories that are accessible to the authenticated user. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// ApiResponse of Object(void) - ApiResponse ListOrgReposWithHttpInfo (string orgname); - /// - /// List user repositories - /// - /// - /// List public repositories for the specified user. - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// - void ListUserRepos (string username); - - /// - /// List user repositories - /// - /// - /// List public repositories for the specified user. - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// ApiResponse of Object(void) - ApiResponse ListUserReposWithHttpInfo (string username); - /// - /// Migrate repository - /// - /// - /// Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// (optional) - /// - void MigrateRepo (MigrateRepo body = null); - - /// - /// Migrate repository - /// - /// - /// Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of Object(void) - ApiResponse MigrateRepoWithHttpInfo (MigrateRepo body = null); - /// - /// Search repositories - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - /// Maximum number of repositories in search results. (optional, default to 10) - /// Page number. Default is 1. (optional, default to 1) - /// Object - Object Search (string q, int? uid = null, int? limit = null, int? page = null); - - /// - /// Search repositories - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - /// Maximum number of repositories in search results. (optional, default to 10) - /// Page number. Default is 1. (optional, default to 1) - /// ApiResponse of Object - ApiResponse SearchWithHttpInfo (string q, int? uid = null, int? limit = null, int? page = null); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create in organization - /// - /// - /// Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// (optional) - /// Task of void - System.Threading.Tasks.Task CreateOrgRepoAsync (string orgname, CreateRepo body = null); - - /// - /// Create in organization - /// - /// - /// Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateOrgRepoAsyncWithHttpInfo (string orgname, CreateRepo body = null); - /// - /// Create - /// - /// - /// Create a new repository for the authenticated user. - /// - /// Thrown when fails to make API call - /// (optional) - /// Task of void - System.Threading.Tasks.Task CreateRepoAsync (CreateRepo body = null); - - /// - /// Create - /// - /// - /// Create a new repository for the authenticated user. - /// - /// Thrown when fails to make API call - /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateRepoAsyncWithHttpInfo (CreateRepo body = null); - /// - /// Get repository information - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - System.Threading.Tasks.Task GetRepoAsync (string owner, string repo); - - /// - /// Get repository information - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - System.Threading.Tasks.Task> GetRepoAsyncWithHttpInfo (string owner, string repo); - /// - /// List your repositories - /// - /// - /// List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - /// - /// Thrown when fails to make API call - /// Task of Object - System.Threading.Tasks.Task ListMyReposAsync (); - - /// - /// List your repositories - /// - /// - /// List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - /// - /// Thrown when fails to make API call - /// Task of ApiResponse (Object) - System.Threading.Tasks.Task> ListMyReposAsyncWithHttpInfo (); - /// - /// List organization repositories - /// - /// - /// List repositories that are accessible to the authenticated user. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// Task of void - System.Threading.Tasks.Task ListOrgReposAsync (string orgname); - - /// - /// List organization repositories - /// - /// - /// List repositories that are accessible to the authenticated user. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// Task of ApiResponse - System.Threading.Tasks.Task> ListOrgReposAsyncWithHttpInfo (string orgname); - /// - /// List user repositories - /// - /// - /// List public repositories for the specified user. - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// Task of void - System.Threading.Tasks.Task ListUserReposAsync (string username); - - /// - /// List user repositories - /// - /// - /// List public repositories for the specified user. - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// Task of ApiResponse - System.Threading.Tasks.Task> ListUserReposAsyncWithHttpInfo (string username); - /// - /// Migrate repository - /// - /// - /// Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// (optional) - /// Task of void - System.Threading.Tasks.Task MigrateRepoAsync (MigrateRepo body = null); - - /// - /// Migrate repository - /// - /// - /// Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> MigrateRepoAsyncWithHttpInfo (MigrateRepo body = null); - /// - /// Search repositories - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - /// Maximum number of repositories in search results. (optional, default to 10) - /// Page number. Default is 1. (optional, default to 1) - /// Task of Object - System.Threading.Tasks.Task SearchAsync (string q, int? uid = null, int? limit = null, int? page = null); - - /// - /// Search repositories - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - /// Maximum number of repositories in search results. (optional, default to 10) - /// Page number. Default is 1. (optional, default to 1) - /// Task of ApiResponse (Object) - System.Threading.Tasks.Task> SearchAsyncWithHttpInfo (string q, int? uid = null, int? limit = null, int? page = null); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class RepositoryApi : IRepositoryApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public RepositoryApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public RepositoryApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public RepositoryApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create in organization Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// (optional) - /// - public void CreateOrgRepo (string orgname, CreateRepo body = null) - { - CreateOrgRepoWithHttpInfo(orgname, body); - } - - /// - /// Create in organization Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse CreateOrgRepoWithHttpInfo (string orgname, CreateRepo body = null) - { - // verify the required parameter 'orgname' is set - if (orgname == null) - throw new ApiException(400, "Missing required parameter 'orgname' when calling RepositoryApi->CreateOrgRepo"); - - var localVarPath = "/org/{orgname}/repos"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orgname != null) localVarPathParams.Add("orgname", this.Configuration.ApiClient.ParameterToString(orgname)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateOrgRepo", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Create in organization Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateOrgRepoAsync (string orgname, CreateRepo body = null) - { - await CreateOrgRepoAsyncWithHttpInfo(orgname, body); - - } - - /// - /// Create in organization Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateOrgRepoAsyncWithHttpInfo (string orgname, CreateRepo body = null) - { - // verify the required parameter 'orgname' is set - if (orgname == null) - throw new ApiException(400, "Missing required parameter 'orgname' when calling RepositoryApi->CreateOrgRepo"); - - var localVarPath = "/org/{orgname}/repos"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orgname != null) localVarPathParams.Add("orgname", this.Configuration.ApiClient.ParameterToString(orgname)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateOrgRepo", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Create Create a new repository for the authenticated user. - /// - /// Thrown when fails to make API call - /// (optional) - /// - public void CreateRepo (CreateRepo body = null) - { - CreateRepoWithHttpInfo(body); - } - - /// - /// Create Create a new repository for the authenticated user. - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse CreateRepoWithHttpInfo (CreateRepo body = null) - { - - var localVarPath = "/user/repos"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateRepo", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Create Create a new repository for the authenticated user. - /// - /// Thrown when fails to make API call - /// (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateRepoAsync (CreateRepo body = null) - { - await CreateRepoAsyncWithHttpInfo(body); - - } - - /// - /// Create Create a new repository for the authenticated user. - /// - /// Thrown when fails to make API call - /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateRepoAsyncWithHttpInfo (CreateRepo body = null) - { - - var localVarPath = "/user/repos"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateRepo", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get repository information - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - public void GetRepo (string owner, string repo) - { - GetRepoWithHttpInfo(owner, repo); - } - - /// - /// Get repository information - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - public ApiResponse GetRepoWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RepositoryApi->GetRepo"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling RepositoryApi->GetRepo"); - - var localVarPath = "/repos/{owner}/{repo}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetRepo", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get repository information - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - public async System.Threading.Tasks.Task GetRepoAsync (string owner, string repo) - { - await GetRepoAsyncWithHttpInfo(owner, repo); - - } - - /// - /// Get repository information - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetRepoAsyncWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling RepositoryApi->GetRepo"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling RepositoryApi->GetRepo"); - - var localVarPath = "/repos/{owner}/{repo}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetRepo", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List your repositories List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - /// - /// Thrown when fails to make API call - /// Object - public Object ListMyRepos () - { - ApiResponse localVarResponse = ListMyReposWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// List your repositories List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - /// - /// Thrown when fails to make API call - /// ApiResponse of Object - public ApiResponse< Object > ListMyReposWithHttpInfo () - { - - var localVarPath = "/user/repos"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListMyRepos", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); - } - - /// - /// List your repositories List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - /// - /// Thrown when fails to make API call - /// Task of Object - public async System.Threading.Tasks.Task ListMyReposAsync () - { - ApiResponse localVarResponse = await ListMyReposAsyncWithHttpInfo(); - return localVarResponse.Data; - - } - - /// - /// List your repositories List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - /// - /// Thrown when fails to make API call - /// Task of ApiResponse (Object) - public async System.Threading.Tasks.Task> ListMyReposAsyncWithHttpInfo () - { - - var localVarPath = "/user/repos"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListMyRepos", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); - } - - /// - /// List organization repositories List repositories that are accessible to the authenticated user. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// - public void ListOrgRepos (string orgname) - { - ListOrgReposWithHttpInfo(orgname); - } - - /// - /// List organization repositories List repositories that are accessible to the authenticated user. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// ApiResponse of Object(void) - public ApiResponse ListOrgReposWithHttpInfo (string orgname) - { - // verify the required parameter 'orgname' is set - if (orgname == null) - throw new ApiException(400, "Missing required parameter 'orgname' when calling RepositoryApi->ListOrgRepos"); - - var localVarPath = "/orgs/{orgname}/repos"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orgname != null) localVarPathParams.Add("orgname", this.Configuration.ApiClient.ParameterToString(orgname)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListOrgRepos", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List organization repositories List repositories that are accessible to the authenticated user. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// Task of void - public async System.Threading.Tasks.Task ListOrgReposAsync (string orgname) - { - await ListOrgReposAsyncWithHttpInfo(orgname); - - } - - /// - /// List organization repositories List repositories that are accessible to the authenticated user. - /// - /// Thrown when fails to make API call - /// A DagsHub organization name - /// Task of ApiResponse - public async System.Threading.Tasks.Task> ListOrgReposAsyncWithHttpInfo (string orgname) - { - // verify the required parameter 'orgname' is set - if (orgname == null) - throw new ApiException(400, "Missing required parameter 'orgname' when calling RepositoryApi->ListOrgRepos"); - - var localVarPath = "/orgs/{orgname}/repos"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orgname != null) localVarPathParams.Add("orgname", this.Configuration.ApiClient.ParameterToString(orgname)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListOrgRepos", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List user repositories List public repositories for the specified user. - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// - public void ListUserRepos (string username) - { - ListUserReposWithHttpInfo(username); - } - - /// - /// List user repositories List public repositories for the specified user. - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// ApiResponse of Object(void) - public ApiResponse ListUserReposWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling RepositoryApi->ListUserRepos"); - - var localVarPath = "/users/{username}/repos"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListUserRepos", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List user repositories List public repositories for the specified user. - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// Task of void - public async System.Threading.Tasks.Task ListUserReposAsync (string username) - { - await ListUserReposAsyncWithHttpInfo(username); - - } - - /// - /// List user repositories List public repositories for the specified user. - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// Task of ApiResponse - public async System.Threading.Tasks.Task> ListUserReposAsyncWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling RepositoryApi->ListUserRepos"); - - var localVarPath = "/users/{username}/repos"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListUserRepos", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Migrate repository Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// (optional) - /// - public void MigrateRepo (MigrateRepo body = null) - { - MigrateRepoWithHttpInfo(body); - } - - /// - /// Migrate repository Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse MigrateRepoWithHttpInfo (MigrateRepo body = null) - { - - var localVarPath = "/repos/migrate"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("MigrateRepo", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Migrate repository Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// (optional) - /// Task of void - public async System.Threading.Tasks.Task MigrateRepoAsync (MigrateRepo body = null) - { - await MigrateRepoAsyncWithHttpInfo(body); - - } - - /// - /// Migrate repository Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - /// - /// Thrown when fails to make API call - /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> MigrateRepoAsyncWithHttpInfo (MigrateRepo body = null) - { - - var localVarPath = "/repos/migrate"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("MigrateRepo", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Search repositories - /// - /// Thrown when fails to make API call - /// - /// User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - /// Maximum number of repositories in search results. (optional, default to 10) - /// Page number. Default is 1. (optional, default to 1) - /// Object - public Object Search (string q, int? uid = null, int? limit = null, int? page = null) - { - ApiResponse localVarResponse = SearchWithHttpInfo(q, uid, limit, page); - return localVarResponse.Data; - } - - /// - /// Search repositories - /// - /// Thrown when fails to make API call - /// - /// User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - /// Maximum number of repositories in search results. (optional, default to 10) - /// Page number. Default is 1. (optional, default to 1) - /// ApiResponse of Object - public ApiResponse< Object > SearchWithHttpInfo (string q, int? uid = null, int? limit = null, int? page = null) - { - // verify the required parameter 'q' is set - if (q == null) - throw new ApiException(400, "Missing required parameter 'q' when calling RepositoryApi->Search"); - - var localVarPath = "/repos/search"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (q != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "q", q)); // query parameter - if (uid != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "uid", uid)); // query parameter - if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter - if (page != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "page", page)); // query parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Search", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); - } - - /// - /// Search repositories - /// - /// Thrown when fails to make API call - /// - /// User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - /// Maximum number of repositories in search results. (optional, default to 10) - /// Page number. Default is 1. (optional, default to 1) - /// Task of Object - public async System.Threading.Tasks.Task SearchAsync (string q, int? uid = null, int? limit = null, int? page = null) - { - ApiResponse localVarResponse = await SearchAsyncWithHttpInfo(q, uid, limit, page); - return localVarResponse.Data; - - } - - /// - /// Search repositories - /// - /// Thrown when fails to make API call - /// - /// User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - /// Maximum number of repositories in search results. (optional, default to 10) - /// Page number. Default is 1. (optional, default to 1) - /// Task of ApiResponse (Object) - public async System.Threading.Tasks.Task> SearchAsyncWithHttpInfo (string q, int? uid = null, int? limit = null, int? page = null) - { - // verify the required parameter 'q' is set - if (q == null) - throw new ApiException(400, "Missing required parameter 'q' when calling RepositoryApi->Search"); - - var localVarPath = "/repos/search"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (q != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "q", q)); // query parameter - if (uid != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "uid", uid)); // query parameter - if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter - if (page != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "page", page)); // query parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Search", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); - } - - } -} diff --git a/C#/src/dagshub_api/Api/StorageIntegrationsApi.cs b/C#/src/dagshub_api/Api/StorageIntegrationsApi.cs deleted file mode 100644 index c6ea6c9..0000000 --- a/C#/src/dagshub_api/Api/StorageIntegrationsApi.cs +++ /dev/null @@ -1,895 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IStorageIntegrationsApi : IApiAccessor - { - #region Synchronous Operations - /// - /// List contents in the path - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// path of a folder in the repository - /// (optional, default to false) - /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) - /// Files1 - Files1 GetBucketContent (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null); - - /// - /// List contents in the path - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// path of a folder in the repository - /// (optional, default to false) - /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) - /// ApiResponse of Files1 - ApiResponse GetBucketContentWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null); - /// - /// Get file in the bucket - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// The content path - /// - void GetBucketFile (string owner, string repo, string protocol, string bucket, string path); - - /// - /// Get file in the bucket - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// The content path - /// ApiResponse of Object(void) - ApiResponse GetBucketFileWithHttpInfo (string owner, string repo, string protocol, string bucket, string path); - /// - /// List integrated storages in the repository - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Integration - Integration GetBuckets (string owner, string repo); - - /// - /// List integrated storages in the repository - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Integration - ApiResponse GetBucketsWithHttpInfo (string owner, string repo); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// List contents in the path - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// path of a folder in the repository - /// (optional, default to false) - /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) - /// Task of Files1 - System.Threading.Tasks.Task GetBucketContentAsync (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null); - - /// - /// List contents in the path - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// path of a folder in the repository - /// (optional, default to false) - /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) - /// Task of ApiResponse (Files1) - System.Threading.Tasks.Task> GetBucketContentAsyncWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null); - /// - /// Get file in the bucket - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// The content path - /// Task of void - System.Threading.Tasks.Task GetBucketFileAsync (string owner, string repo, string protocol, string bucket, string path); - - /// - /// Get file in the bucket - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// The content path - /// Task of ApiResponse - System.Threading.Tasks.Task> GetBucketFileAsyncWithHttpInfo (string owner, string repo, string protocol, string bucket, string path); - /// - /// List integrated storages in the repository - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of Integration - System.Threading.Tasks.Task GetBucketsAsync (string owner, string repo); - - /// - /// List integrated storages in the repository - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse (Integration) - System.Threading.Tasks.Task> GetBucketsAsyncWithHttpInfo (string owner, string repo); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class StorageIntegrationsApi : IStorageIntegrationsApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public StorageIntegrationsApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public StorageIntegrationsApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public StorageIntegrationsApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// List contents in the path - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// path of a folder in the repository - /// (optional, default to false) - /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) - /// Files1 - public Files1 GetBucketContent (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null) - { - ApiResponse localVarResponse = GetBucketContentWithHttpInfo(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); - return localVarResponse.Data; - } - - /// - /// List contents in the path - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// path of a folder in the repository - /// (optional, default to false) - /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) - /// ApiResponse of Files1 - public ApiResponse< Files1 > GetBucketContentWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling StorageIntegrationsApi->GetBucketContent"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling StorageIntegrationsApi->GetBucketContent"); - // verify the required parameter 'protocol' is set - if (protocol == null) - throw new ApiException(400, "Missing required parameter 'protocol' when calling StorageIntegrationsApi->GetBucketContent"); - // verify the required parameter 'bucket' is set - if (bucket == null) - throw new ApiException(400, "Missing required parameter 'bucket' when calling StorageIntegrationsApi->GetBucketContent"); - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling StorageIntegrationsApi->GetBucketContent"); - - var localVarPath = "/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (protocol != null) localVarPathParams.Add("protocol", this.Configuration.ApiClient.ParameterToString(protocol)); // path parameter - if (bucket != null) localVarPathParams.Add("bucket", this.Configuration.ApiClient.ParameterToString(bucket)); // path parameter - if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter - if (includeSize != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "include_size", includeSize)); // query parameter - if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter - if (fromToken != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "from_token", fromToken)); // query parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetBucketContent", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Files1) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Files1))); - } - - /// - /// List contents in the path - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// path of a folder in the repository - /// (optional, default to false) - /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) - /// Task of Files1 - public async System.Threading.Tasks.Task GetBucketContentAsync (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null) - { - ApiResponse localVarResponse = await GetBucketContentAsyncWithHttpInfo(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); - return localVarResponse.Data; - - } - - /// - /// List contents in the path - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// path of a folder in the repository - /// (optional, default to false) - /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) - /// Task of ApiResponse (Files1) - public async System.Threading.Tasks.Task> GetBucketContentAsyncWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling StorageIntegrationsApi->GetBucketContent"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling StorageIntegrationsApi->GetBucketContent"); - // verify the required parameter 'protocol' is set - if (protocol == null) - throw new ApiException(400, "Missing required parameter 'protocol' when calling StorageIntegrationsApi->GetBucketContent"); - // verify the required parameter 'bucket' is set - if (bucket == null) - throw new ApiException(400, "Missing required parameter 'bucket' when calling StorageIntegrationsApi->GetBucketContent"); - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling StorageIntegrationsApi->GetBucketContent"); - - var localVarPath = "/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (protocol != null) localVarPathParams.Add("protocol", this.Configuration.ApiClient.ParameterToString(protocol)); // path parameter - if (bucket != null) localVarPathParams.Add("bucket", this.Configuration.ApiClient.ParameterToString(bucket)); // path parameter - if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter - if (includeSize != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "include_size", includeSize)); // query parameter - if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter - if (fromToken != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "from_token", fromToken)); // query parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetBucketContent", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Files1) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Files1))); - } - - /// - /// Get file in the bucket - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// The content path - /// - public void GetBucketFile (string owner, string repo, string protocol, string bucket, string path) - { - GetBucketFileWithHttpInfo(owner, repo, protocol, bucket, path); - } - - /// - /// Get file in the bucket - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// The content path - /// ApiResponse of Object(void) - public ApiResponse GetBucketFileWithHttpInfo (string owner, string repo, string protocol, string bucket, string path) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling StorageIntegrationsApi->GetBucketFile"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling StorageIntegrationsApi->GetBucketFile"); - // verify the required parameter 'protocol' is set - if (protocol == null) - throw new ApiException(400, "Missing required parameter 'protocol' when calling StorageIntegrationsApi->GetBucketFile"); - // verify the required parameter 'bucket' is set - if (bucket == null) - throw new ApiException(400, "Missing required parameter 'bucket' when calling StorageIntegrationsApi->GetBucketFile"); - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling StorageIntegrationsApi->GetBucketFile"); - - var localVarPath = "/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (protocol != null) localVarPathParams.Add("protocol", this.Configuration.ApiClient.ParameterToString(protocol)); // path parameter - if (bucket != null) localVarPathParams.Add("bucket", this.Configuration.ApiClient.ParameterToString(bucket)); // path parameter - if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetBucketFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get file in the bucket - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// The content path - /// Task of void - public async System.Threading.Tasks.Task GetBucketFileAsync (string owner, string repo, string protocol, string bucket, string path) - { - await GetBucketFileAsyncWithHttpInfo(owner, repo, protocol, bucket, path); - - } - - /// - /// Get file in the bucket - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// protocol of the storage integration - /// name and prefix of the bucket integration - /// The content path - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetBucketFileAsyncWithHttpInfo (string owner, string repo, string protocol, string bucket, string path) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling StorageIntegrationsApi->GetBucketFile"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling StorageIntegrationsApi->GetBucketFile"); - // verify the required parameter 'protocol' is set - if (protocol == null) - throw new ApiException(400, "Missing required parameter 'protocol' when calling StorageIntegrationsApi->GetBucketFile"); - // verify the required parameter 'bucket' is set - if (bucket == null) - throw new ApiException(400, "Missing required parameter 'bucket' when calling StorageIntegrationsApi->GetBucketFile"); - // verify the required parameter 'path' is set - if (path == null) - throw new ApiException(400, "Missing required parameter 'path' when calling StorageIntegrationsApi->GetBucketFile"); - - var localVarPath = "/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (protocol != null) localVarPathParams.Add("protocol", this.Configuration.ApiClient.ParameterToString(protocol)); // path parameter - if (bucket != null) localVarPathParams.Add("bucket", this.Configuration.ApiClient.ParameterToString(bucket)); // path parameter - if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetBucketFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List integrated storages in the repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Integration - public Integration GetBuckets (string owner, string repo) - { - ApiResponse localVarResponse = GetBucketsWithHttpInfo(owner, repo); - return localVarResponse.Data; - } - - /// - /// List integrated storages in the repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Integration - public ApiResponse< Integration > GetBucketsWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling StorageIntegrationsApi->GetBuckets"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling StorageIntegrationsApi->GetBuckets"); - - var localVarPath = "/repos/{owner}/{repo}/storage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetBuckets", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Integration) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Integration))); - } - - /// - /// List integrated storages in the repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of Integration - public async System.Threading.Tasks.Task GetBucketsAsync (string owner, string repo) - { - ApiResponse localVarResponse = await GetBucketsAsyncWithHttpInfo(owner, repo); - return localVarResponse.Data; - - } - - /// - /// List integrated storages in the repository - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse (Integration) - public async System.Threading.Tasks.Task> GetBucketsAsyncWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling StorageIntegrationsApi->GetBuckets"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling StorageIntegrationsApi->GetBuckets"); - - var localVarPath = "/repos/{owner}/{repo}/storage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetBuckets", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Integration) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Integration))); - } - - } -} diff --git a/C#/src/dagshub_api/Api/UserApi.cs b/C#/src/dagshub_api/Api/UserApi.cs deleted file mode 100644 index 0b6a847..0000000 --- a/C#/src/dagshub_api/Api/UserApi.cs +++ /dev/null @@ -1,509 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IUserApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Get authenticated user information - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - void GetAuthenticatedUser (); - - /// - /// Get authenticated user information - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - ApiResponse GetAuthenticatedUserWithHttpInfo (); - /// - /// Get information about a user - /// - /// - /// - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// - void GetUser (string username); - - /// - /// Get information about a user - /// - /// - /// - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// ApiResponse of Object(void) - ApiResponse GetUserWithHttpInfo (string username); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Get authenticated user information - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Task of void - System.Threading.Tasks.Task GetAuthenticatedUserAsync (); - - /// - /// Get authenticated user information - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Task of ApiResponse - System.Threading.Tasks.Task> GetAuthenticatedUserAsyncWithHttpInfo (); - /// - /// Get information about a user - /// - /// - /// - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// Task of void - System.Threading.Tasks.Task GetUserAsync (string username); - - /// - /// Get information about a user - /// - /// - /// - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// Task of ApiResponse - System.Threading.Tasks.Task> GetUserAsyncWithHttpInfo (string username); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class UserApi : IUserApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public UserApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public UserApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public UserApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Get authenticated user information - /// - /// Thrown when fails to make API call - /// - public void GetAuthenticatedUser () - { - GetAuthenticatedUserWithHttpInfo(); - } - - /// - /// Get authenticated user information - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - public ApiResponse GetAuthenticatedUserWithHttpInfo () - { - - var localVarPath = "/user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetAuthenticatedUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get authenticated user information - /// - /// Thrown when fails to make API call - /// Task of void - public async System.Threading.Tasks.Task GetAuthenticatedUserAsync () - { - await GetAuthenticatedUserAsyncWithHttpInfo(); - - } - - /// - /// Get authenticated user information - /// - /// Thrown when fails to make API call - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetAuthenticatedUserAsyncWithHttpInfo () - { - - var localVarPath = "/user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetAuthenticatedUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get information about a user - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// - public void GetUser (string username) - { - GetUserWithHttpInfo(username); - } - - /// - /// Get information about a user - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// ApiResponse of Object(void) - public ApiResponse GetUserWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUser"); - - var localVarPath = "/users/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get information about a user - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// Task of void - public async System.Threading.Tasks.Task GetUserAsync (string username) - { - await GetUserAsyncWithHttpInfo(username); - - } - - /// - /// Get information about a user - /// - /// Thrown when fails to make API call - /// A DagsHub username or organization name - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetUserAsyncWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUser"); - - var localVarPath = "/users/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/C#/src/dagshub_api/Api/WebhooksApi.cs b/C#/src/dagshub_api/Api/WebhooksApi.cs deleted file mode 100644 index 3a99a88..0000000 --- a/C#/src/dagshub_api/Api/WebhooksApi.cs +++ /dev/null @@ -1,1058 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using dagshub_api.Client; -using dagshub_api.Model; - -namespace dagshub_api.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IWebhooksApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// - void CreateHook (string owner, string repo, RepoHooksBody body = null); - - /// - /// Create a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// ApiResponse of Object(void) - ApiResponse CreateHookWithHttpInfo (string owner, string repo, RepoHooksBody body = null); - /// - /// Delete a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// - void DeleteHook (string owner, string repo, int? id); - - /// - /// Delete a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// ApiResponse of Object(void) - ApiResponse DeleteHookWithHttpInfo (string owner, string repo, int? id); - /// - /// Edit a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// (optional) - /// - void EditHook (string owner, string repo, int? id, HooksIdBody body = null); - - /// - /// Edit a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// (optional) - /// ApiResponse of Object(void) - ApiResponse EditHookWithHttpInfo (string owner, string repo, int? id, HooksIdBody body = null); - /// - /// List hooks - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - void ListHooks (string owner, string repo); - - /// - /// List hooks - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - ApiResponse ListHooksWithHttpInfo (string owner, string repo); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of void - System.Threading.Tasks.Task CreateHookAsync (string owner, string repo, RepoHooksBody body = null); - - /// - /// Create a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateHookAsyncWithHttpInfo (string owner, string repo, RepoHooksBody body = null); - /// - /// Delete a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// Task of void - System.Threading.Tasks.Task DeleteHookAsync (string owner, string repo, int? id); - - /// - /// Delete a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteHookAsyncWithHttpInfo (string owner, string repo, int? id); - /// - /// Edit a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// (optional) - /// Task of void - System.Threading.Tasks.Task EditHookAsync (string owner, string repo, int? id, HooksIdBody body = null); - - /// - /// Edit a hook - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> EditHookAsyncWithHttpInfo (string owner, string repo, int? id, HooksIdBody body = null); - /// - /// List hooks - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - System.Threading.Tasks.Task ListHooksAsync (string owner, string repo); - - /// - /// List hooks - /// - /// - /// - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - System.Threading.Tasks.Task> ListHooksAsyncWithHttpInfo (string owner, string repo); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class WebhooksApi : IWebhooksApi - { - private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public WebhooksApi(String basePath) - { - this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public WebhooksApi() - { - this.Configuration = dagshub_api.Client.Configuration.Default; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public WebhooksApi(dagshub_api.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = dagshub_api.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public dagshub_api.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public dagshub_api.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// - public void CreateHook (string owner, string repo, RepoHooksBody body = null) - { - CreateHookWithHttpInfo(owner, repo, body); - } - - /// - /// Create a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse CreateHookWithHttpInfo (string owner, string repo, RepoHooksBody body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling WebhooksApi->CreateHook"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling WebhooksApi->CreateHook"); - - var localVarPath = "/repos/{owner}/{repo}/hooks"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateHook", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Create a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateHookAsync (string owner, string repo, RepoHooksBody body = null) - { - await CreateHookAsyncWithHttpInfo(owner, repo, body); - - } - - /// - /// Create a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateHookAsyncWithHttpInfo (string owner, string repo, RepoHooksBody body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling WebhooksApi->CreateHook"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling WebhooksApi->CreateHook"); - - var localVarPath = "/repos/{owner}/{repo}/hooks"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateHook", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// - public void DeleteHook (string owner, string repo, int? id) - { - DeleteHookWithHttpInfo(owner, repo, id); - } - - /// - /// Delete a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// ApiResponse of Object(void) - public ApiResponse DeleteHookWithHttpInfo (string owner, string repo, int? id) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling WebhooksApi->DeleteHook"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling WebhooksApi->DeleteHook"); - // verify the required parameter 'id' is set - if (id == null) - throw new ApiException(400, "Missing required parameter 'id' when calling WebhooksApi->DeleteHook"); - - var localVarPath = "/repos/{owner}/{repo}/hooks/{id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteHook", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// Task of void - public async System.Threading.Tasks.Task DeleteHookAsync (string owner, string repo, int? id) - { - await DeleteHookAsyncWithHttpInfo(owner, repo, id); - - } - - /// - /// Delete a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteHookAsyncWithHttpInfo (string owner, string repo, int? id) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling WebhooksApi->DeleteHook"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling WebhooksApi->DeleteHook"); - // verify the required parameter 'id' is set - if (id == null) - throw new ApiException(400, "Missing required parameter 'id' when calling WebhooksApi->DeleteHook"); - - var localVarPath = "/repos/{owner}/{repo}/hooks/{id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteHook", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Edit a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// (optional) - /// - public void EditHook (string owner, string repo, int? id, HooksIdBody body = null) - { - EditHookWithHttpInfo(owner, repo, id, body); - } - - /// - /// Edit a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse EditHookWithHttpInfo (string owner, string repo, int? id, HooksIdBody body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling WebhooksApi->EditHook"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling WebhooksApi->EditHook"); - // verify the required parameter 'id' is set - if (id == null) - throw new ApiException(400, "Missing required parameter 'id' when calling WebhooksApi->EditHook"); - - var localVarPath = "/repos/{owner}/{repo}/hooks/{id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("EditHook", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Edit a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// (optional) - /// Task of void - public async System.Threading.Tasks.Task EditHookAsync (string owner, string repo, int? id, HooksIdBody body = null) - { - await EditHookAsyncWithHttpInfo(owner, repo, id, body); - - } - - /// - /// Edit a hook - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> EditHookAsyncWithHttpInfo (string owner, string repo, int? id, HooksIdBody body = null) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling WebhooksApi->EditHook"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling WebhooksApi->EditHook"); - // verify the required parameter 'id' is set - if (id == null) - throw new ApiException(400, "Missing required parameter 'id' when calling WebhooksApi->EditHook"); - - var localVarPath = "/repos/{owner}/{repo}/hooks/{id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("EditHook", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List hooks - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// - public void ListHooks (string owner, string repo) - { - ListHooksWithHttpInfo(owner, repo); - } - - /// - /// List hooks - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// ApiResponse of Object(void) - public ApiResponse ListHooksWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling WebhooksApi->ListHooks"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling WebhooksApi->ListHooks"); - - var localVarPath = "/repos/{owner}/{repo}/hooks"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListHooks", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// List hooks - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of void - public async System.Threading.Tasks.Task ListHooksAsync (string owner, string repo) - { - await ListHooksAsyncWithHttpInfo(owner, repo); - - } - - /// - /// List hooks - /// - /// Thrown when fails to make API call - /// owner of the repository - /// name of the repository - /// Task of ApiResponse - public async System.Threading.Tasks.Task> ListHooksAsyncWithHttpInfo (string owner, string repo) - { - // verify the required parameter 'owner' is set - if (owner == null) - throw new ApiException(400, "Missing required parameter 'owner' when calling WebhooksApi->ListHooks"); - // verify the required parameter 'repo' is set - if (repo == null) - throw new ApiException(400, "Missing required parameter 'repo' when calling WebhooksApi->ListHooks"); - - var localVarPath = "/repos/{owner}/{repo}/hooks"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter - if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter - // authentication (basicAuth) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - // authentication (tokenAuth) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("ListHooks", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/C#/src/dagshub_api/Client/ApiClient.cs b/C#/src/dagshub_api/Client/ApiClient.cs deleted file mode 100644 index 94987b2..0000000 --- a/C#/src/dagshub_api/Client/ApiClient.cs +++ /dev/null @@ -1,534 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Web; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp; - -namespace dagshub_api.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - private JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - public ApiClient() - { - Configuration = dagshub_api.Client.Configuration.Default; - RestClient = new RestClient("https://dagshub.com/api/v1"); - } - - /// - /// Initializes a new instance of the class - /// with default base path (https://dagshub.com/api/v1). - /// - /// An instance of Configuration. - public ApiClient(Configuration config) - { - Configuration = config ?? dagshub_api.Client.Configuration.Default; - - RestClient = new RestClient(Configuration.BasePath); - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "https://dagshub.com/api/v1") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - Configuration = Client.Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets an instance of the IReadableConfiguration. - /// - /// An instance of the IReadableConfiguration. - /// - /// helps us to avoid modifying possibly global - /// configuration values from within a given client. It does not guarantee thread-safety - /// of the instance in any way. - /// - public IReadableConfiguration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - request.AddParameter(contentType, postBody, ParameterType.RequestBody); - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - // set timeout - - RestClient.Timeout = Configuration.Timeout; - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - var response = RestClient.Execute(request); - InterceptResponse(request, response); - - return (Object) response; - } - /// - /// Makes the asynchronous HTTP request. - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content type. - /// The Task instance. - public async System.Threading.Tasks.Task CallApiAsync( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - InterceptRequest(request); - var response = await RestClient.ExecuteTaskAsync(request); - InterceptResponse(request, response); - return (Object)response; - } - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - public FileParameter ParameterToFile(string name, byte[] stream) - { - return FileParameter.Create(name, stream, "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - IList headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - ///Check if the given MIME is a JSON MIME. - ///JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public bool IsJsonMime(String mime) - { - var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return "application/json"; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType.ToLower())) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// Key name. - /// Value object. - /// A list of KeyValuePairs - public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) - { - var parameters = new List>(); - - if (IsCollection(value) && collectionFormat == "multi") - { - var valueCollection = value as IEnumerable; - parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); - } - else - { - parameters.Add(new KeyValuePair(name, ParameterToString(value))); - } - - return parameters; - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - } -} diff --git a/C#/src/dagshub_api/Client/ApiException.cs b/C#/src/dagshub_api/Client/ApiException.cs deleted file mode 100644 index 26b264c..0000000 --- a/C#/src/dagshub_api/Client/ApiException.cs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; - -namespace dagshub_api.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/C#/src/dagshub_api/Client/ApiResponse.cs b/C#/src/dagshub_api/Client/ApiResponse.cs deleted file mode 100644 index 404685f..0000000 --- a/C#/src/dagshub_api/Client/ApiResponse.cs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Collections.Generic; - -namespace dagshub_api.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/C#/src/dagshub_api/Client/Configuration.cs b/C#/src/dagshub_api/Client/Configuration.cs deleted file mode 100644 index 66b37b2..0000000 --- a/C#/src/dagshub_api/Client/Configuration.cs +++ /dev/null @@ -1,469 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Reflection; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace dagshub_api.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.3"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - private static readonly object GlobalConfigSync = new { }; - private static Configuration _globalConfiguration; - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.Content), - response.Content); - } - if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); - } - return null; - }; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - - #endregion Static Members - - #region Private Members - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - private IDictionary _apiKey = null; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix = null; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - #endregion Private Members - - #region Constructors - - static Configuration() - { - _globalConfiguration = new GlobalConfiguration(); - } - - /// - /// Initializes a new instance of the class - /// - public Configuration() - { - UserAgent = "Swagger-Codegen/1.0.3/csharp"; - BasePath = "https://dagshub.com/api/v1"; - DefaultHeader = new ConcurrentDictionary(); - ApiKey = new ConcurrentDictionary(); - ApiKeyPrefix = new ConcurrentDictionary(); - - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - public Configuration( - IDictionary defaultHeader, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "https://dagshub.com/api/v1") : this() - { - if (string.IsNullOrWhiteSpace(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeader == null) - throw new ArgumentNullException("defaultHeader"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeader) - { - DefaultHeader.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - /// - /// Initializes a new instance of the class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - [Obsolete("Use explicit object construction and setting of properties.", true)] - public Configuration( - // ReSharper disable UnusedParameter.Local - ApiClient apiClient = null, - IDictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - IDictionary apiKey = null, - IDictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "Swagger-Codegen/1.0.3/csharp" - // ReSharper restore UnusedParameter.Local - ) - { - - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] - // ReSharper disable once UnusedParameter.Local - public Configuration(ApiClient apiClient) - { - - } - - #endregion Constructors - - - #region Properties - - private ApiClient _apiClient = null; - /// - /// Gets an instance of an ApiClient for this configuration - /// - public virtual ApiClient ApiClient - { - get - { - if (_apiClient == null) _apiClient = CreateApiClient(); - return _apiClient; - } - } - - private String _basePath = null; - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath { - get { return _basePath; } - set { - _basePath = value; - // pass-through to ApiClient if it's set. - if(_apiClient != null) { - _apiClient.RestClient.BaseUrl = new Uri(_basePath); - } - } - } - - /// - /// Gets or sets the default header. - /// - public virtual IDictionary DefaultHeader { get; set; } - - private int _timeout = 100000; - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout - { - - get - { - if (_apiClient == null) - { - return _timeout; - } - else - { - return ApiClient.RestClient.Timeout; - } - } - set - { - _timeout = value; - if (_apiClient != null) - { - ApiClient.RestClient.Timeout = _timeout; - } - } - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - // Possible breaking change since swagger-codegen 2.2.1, enforce a valid temporary path on set. - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - #endregion Properties - - #region Methods - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - DefaultHeader[key] = value; - } - - /// - /// Creates a new based on this instance. - /// - /// - public ApiClient CreateApiClient() - { - return new ApiClient(BasePath) { Configuration = this }; - } - - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK (dagshub_api) Debug Report:\n"; - report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.0.2\n"; - report += " SDK Package Version: 1.0.3\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - } -} diff --git a/C#/src/dagshub_api/Client/ExceptionFactory.cs b/C#/src/dagshub_api/Client/ExceptionFactory.cs deleted file mode 100644 index d34648f..0000000 --- a/C#/src/dagshub_api/Client/ExceptionFactory.cs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using RestSharp; - -namespace dagshub_api.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/C#/src/dagshub_api/Client/GlobalConfiguration.cs b/C#/src/dagshub_api/Client/GlobalConfiguration.cs deleted file mode 100644 index 87abb12..0000000 --- a/C#/src/dagshub_api/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; - -namespace dagshub_api.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .swagger-codegen-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - - } -} \ No newline at end of file diff --git a/C#/src/dagshub_api/Client/IApiAccessor.cs b/C#/src/dagshub_api/Client/IApiAccessor.cs deleted file mode 100644 index aa06f6b..0000000 --- a/C#/src/dagshub_api/Client/IApiAccessor.cs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; - -namespace dagshub_api.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/C#/src/dagshub_api/Client/IReadableConfiguration.cs b/C#/src/dagshub_api/Client/IReadableConfiguration.cs deleted file mode 100644 index c7aa0e2..0000000 --- a/C#/src/dagshub_api/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,93 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System.Collections.Generic; - -namespace dagshub_api.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time foramt. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - IDictionary DefaultHeader { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - } -} diff --git a/C#/src/dagshub_api/Client/SwaggerDateConverter.cs b/C#/src/dagshub_api/Client/SwaggerDateConverter.cs deleted file mode 100644 index fcdda3a..0000000 --- a/C#/src/dagshub_api/Client/SwaggerDateConverter.cs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using Newtonsoft.Json.Converters; - -namespace dagshub_api.Client -{ - /// - /// Formatter for 'date' swagger formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types - /// - public class SwaggerDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public SwaggerDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/C#/src/dagshub_api/Model/CollaboratorsCollaboratorBody.cs b/C#/src/dagshub_api/Model/CollaboratorsCollaboratorBody.cs deleted file mode 100644 index 8305228..0000000 --- a/C#/src/dagshub_api/Model/CollaboratorsCollaboratorBody.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// CollaboratorsCollaboratorBody - /// - [DataContract] - public partial class CollaboratorsCollaboratorBody : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. (default to "write"). - public CollaboratorsCollaboratorBody(string permission = "write") - { - // use default value if no "permission" provided - if (permission == null) - { - this.Permission = "write"; - } - else - { - this.Permission = permission; - } - } - - /// - /// The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. - /// - /// The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. - [DataMember(Name="permission", EmitDefaultValue=false)] - public string Permission { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class CollaboratorsCollaboratorBody {\n"); - sb.Append(" Permission: ").Append(Permission).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CollaboratorsCollaboratorBody); - } - - /// - /// Returns true if CollaboratorsCollaboratorBody instances are equal - /// - /// Instance of CollaboratorsCollaboratorBody to be compared - /// Boolean - public bool Equals(CollaboratorsCollaboratorBody input) - { - if (input == null) - return false; - - return - ( - this.Permission == input.Permission || - (this.Permission != null && - this.Permission.Equals(input.Permission)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Permission != null) - hashCode = hashCode * 59 + this.Permission.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/CreateRepo.cs b/C#/src/dagshub_api/Model/CreateRepo.cs deleted file mode 100644 index 495779c..0000000 --- a/C#/src/dagshub_api/Model/CreateRepo.cs +++ /dev/null @@ -1,478 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// CreateRepo - /// - [DataContract] - public partial class CreateRepo : IEquatable, IValidatableObject - { - /// - /// Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - /// - /// Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - [JsonConverter(typeof(StringEnumConverter))] - public enum ProjectTemplateEnum - { - /// - /// Enum CookiecutterDagshubDvc for value: cookiecutter-dagshub-dvc - /// - [EnumMember(Value = "cookiecutter-dagshub-dvc")] - CookiecutterDagshubDvc = 1, - /// - /// Enum Custom for value: custom - /// - [EnumMember(Value = "custom")] - Custom = 2, - /// - /// Enum None for value: none - /// - [EnumMember(Value = "none")] - None = 3, - /// - /// Enum NotebookTemplate for value: notebook-template - /// - [EnumMember(Value = "notebook-template")] - NotebookTemplate = 4 } - /// - /// Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - /// - /// Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - [DataMember(Name="project_template", EmitDefaultValue=false)] - public ProjectTemplateEnum? ProjectTemplate { get; set; } - /// - /// Desired LICENSE template to apply. Use the name of the template. - /// - /// Desired LICENSE template to apply. Use the name of the template. - [JsonConverter(typeof(StringEnumConverter))] - public enum LicenseEnum - { - /// - /// Enum ApacheLicense20 for value: Apache License 2.0 - /// - [EnumMember(Value = "Apache License 2.0")] - ApacheLicense20 = 1, - /// - /// Enum MITLicense for value: MIT License - /// - [EnumMember(Value = "MIT License")] - MITLicense = 2, - /// - /// Enum AbstylesLicense for value: Abstyles License - /// - [EnumMember(Value = "Abstyles License")] - AbstylesLicense = 3, - /// - /// Enum AcademicFreeLicensev11 for value: Academic Free License v1.1 - /// - [EnumMember(Value = "Academic Free License v1.1")] - AcademicFreeLicensev11 = 4, - /// - /// Enum AcademicFreeLicensev12 for value: Academic Free License v1.2 - /// - [EnumMember(Value = "Academic Free License v1.2")] - AcademicFreeLicensev12 = 5, - /// - /// Enum AcademicFreeLicensev20 for value: Academic Free License v2.0 - /// - [EnumMember(Value = "Academic Free License v2.0")] - AcademicFreeLicensev20 = 6, - /// - /// Enum AcademicFreeLicensev21 for value: Academic Free License v2.1 - /// - [EnumMember(Value = "Academic Free License v2.1")] - AcademicFreeLicensev21 = 7, - /// - /// Enum AcademicFreeLicensev30 for value: Academic Free License v3.0 - /// - [EnumMember(Value = "Academic Free License v3.0")] - AcademicFreeLicensev30 = 8, - /// - /// Enum AfferoGeneralPublicLicensev10 for value: Affero General Public License v1.0 - /// - [EnumMember(Value = "Affero General Public License v1.0")] - AfferoGeneralPublicLicensev10 = 9, - /// - /// Enum ApacheLicense10 for value: Apache License 1.0 - /// - [EnumMember(Value = "Apache License 1.0")] - ApacheLicense10 = 10, - /// - /// Enum ApacheLicense11 for value: Apache License 1.1 - /// - [EnumMember(Value = "Apache License 1.1")] - ApacheLicense11 = 11, - /// - /// Enum ArtisticLicense10 for value: Artistic License 1.0 - /// - [EnumMember(Value = "Artistic License 1.0")] - ArtisticLicense10 = 12, - /// - /// Enum ArtisticLicense20 for value: Artistic License 2.0 - /// - [EnumMember(Value = "Artistic License 2.0")] - ArtisticLicense20 = 13, - /// - /// Enum BSD2ClauseLicense for value: BSD 2-clause License - /// - [EnumMember(Value = "BSD 2-clause License")] - BSD2ClauseLicense = 14, - /// - /// Enum BSD3ClauseLicense for value: BSD 3-clause License - /// - [EnumMember(Value = "BSD 3-clause License")] - BSD3ClauseLicense = 15, - /// - /// Enum BSD4ClauseLicense for value: BSD 4-clause License - /// - [EnumMember(Value = "BSD 4-clause License")] - BSD4ClauseLicense = 16, - /// - /// Enum CreativeCommonsCC010Universal for value: Creative Commons CC0 1.0 Universal - /// - [EnumMember(Value = "Creative Commons CC0 1.0 Universal")] - CreativeCommonsCC010Universal = 17, - /// - /// Enum EclipsePublicLicense10 for value: Eclipse Public License 1.0 - /// - [EnumMember(Value = "Eclipse Public License 1.0")] - EclipsePublicLicense10 = 18, - /// - /// Enum EducationalCommunityLicensev10 for value: Educational Community License v1.0 - /// - [EnumMember(Value = "Educational Community License v1.0")] - EducationalCommunityLicensev10 = 19, - /// - /// Enum EducationalCommunityLicensev20 for value: Educational Community License v2.0 - /// - [EnumMember(Value = "Educational Community License v2.0")] - EducationalCommunityLicensev20 = 20, - /// - /// Enum GNUAfferoGeneralPublicLicensev30 for value: GNU Affero General Public License v3.0 - /// - [EnumMember(Value = "GNU Affero General Public License v3.0")] - GNUAfferoGeneralPublicLicensev30 = 21, - /// - /// Enum GNUFreeDocumentationLicensev11 for value: GNU Free Documentation License v1.1 - /// - [EnumMember(Value = "GNU Free Documentation License v1.1")] - GNUFreeDocumentationLicensev11 = 22, - /// - /// Enum GNUFreeDocumentationLicensev12 for value: GNU Free Documentation License v1.2 - /// - [EnumMember(Value = "GNU Free Documentation License v1.2")] - GNUFreeDocumentationLicensev12 = 23, - /// - /// Enum GNUFreeDocumentationLicensev13 for value: GNU Free Documentation License v1.3 - /// - [EnumMember(Value = "GNU Free Documentation License v1.3")] - GNUFreeDocumentationLicensev13 = 24, - /// - /// Enum GNUGeneralPublicLicensev10 for value: GNU General Public License v1.0 - /// - [EnumMember(Value = "GNU General Public License v1.0")] - GNUGeneralPublicLicensev10 = 25, - /// - /// Enum GNUGeneralPublicLicensev20 for value: GNU General Public License v2.0 - /// - [EnumMember(Value = "GNU General Public License v2.0")] - GNUGeneralPublicLicensev20 = 26, - /// - /// Enum GNUGeneralPublicLicensev30 for value: GNU General Public License v3.0 - /// - [EnumMember(Value = "GNU General Public License v3.0")] - GNUGeneralPublicLicensev30 = 27, - /// - /// Enum GNULesserGeneralPublicLicensev21 for value: GNU Lesser General Public License v2.1 - /// - [EnumMember(Value = "GNU Lesser General Public License v2.1")] - GNULesserGeneralPublicLicensev21 = 28, - /// - /// Enum GNULesserGeneralPublicLicensev30 for value: GNU Lesser General Public License v3.0 - /// - [EnumMember(Value = "GNU Lesser General Public License v3.0")] - GNULesserGeneralPublicLicensev30 = 29, - /// - /// Enum GNULibraryGeneralPublicLicensev20 for value: GNU Library General Public License v2.0 - /// - [EnumMember(Value = "GNU Library General Public License v2.0")] - GNULibraryGeneralPublicLicensev20 = 30, - /// - /// Enum ISClicense for value: ISC license - /// - [EnumMember(Value = "ISC license")] - ISClicense = 31, - /// - /// Enum MozillaPublicLicense10 for value: Mozilla Public License 1.0 - /// - [EnumMember(Value = "Mozilla Public License 1.0")] - MozillaPublicLicense10 = 32, - /// - /// Enum MozillaPublicLicense11 for value: Mozilla Public License 1.1 - /// - [EnumMember(Value = "Mozilla Public License 1.1")] - MozillaPublicLicense11 = 33, - /// - /// Enum MozillaPublicLicense203 for value: Mozilla Public License 2.03 - /// - [EnumMember(Value = "Mozilla Public License 2.03")] - MozillaPublicLicense203 = 34 } - /// - /// Desired LICENSE template to apply. Use the name of the template. - /// - /// Desired LICENSE template to apply. Use the name of the template. - [DataMember(Name="license", EmitDefaultValue=false)] - public LicenseEnum? License { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// name of the repository (required). - /// A short description of the repository. - /// Either true to create a private repository, or false to create a public one. (default to false). - /// Pass true to create an initial commit with README, .gitignore and LICENSE. (default to false). - /// Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. . - /// Desired language .gitignore templates to apply. Use the name of the templates.. - /// Desired LICENSE template to apply. Use the name of the template.. - /// Desired README template to apply. Use the name of the template. (default to "Default"). - public CreateRepo(string name = default(string), string description = default(string), bool? _private = false, bool? autoInit = false, ProjectTemplateEnum? projectTemplate = default(ProjectTemplateEnum?), string gitignores = default(string), LicenseEnum? license = default(LicenseEnum?), string readme = "Default") - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for CreateRepo and cannot be null"); - } - else - { - this.Name = name; - } - this.Description = description; - // use default value if no "_private" provided - if (_private == null) - { - this._Private = false; - } - else - { - this._Private = _private; - } - // use default value if no "autoInit" provided - if (autoInit == null) - { - this.AutoInit = false; - } - else - { - this.AutoInit = autoInit; - } - this.ProjectTemplate = projectTemplate; - this.Gitignores = gitignores; - this.License = license; - // use default value if no "readme" provided - if (readme == null) - { - this.Readme = "Default"; - } - else - { - this.Readme = readme; - } - } - - /// - /// name of the repository - /// - /// name of the repository - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// A short description of the repository - /// - /// A short description of the repository - [DataMember(Name="description", EmitDefaultValue=false)] - public string Description { get; set; } - - /// - /// Either true to create a private repository, or false to create a public one. - /// - /// Either true to create a private repository, or false to create a public one. - [DataMember(Name="private", EmitDefaultValue=false)] - public bool? _Private { get; set; } - - /// - /// Pass true to create an initial commit with README, .gitignore and LICENSE. - /// - /// Pass true to create an initial commit with README, .gitignore and LICENSE. - [DataMember(Name="auto_init", EmitDefaultValue=false)] - public bool? AutoInit { get; set; } - - - /// - /// Desired language .gitignore templates to apply. Use the name of the templates. - /// - /// Desired language .gitignore templates to apply. Use the name of the templates. - [DataMember(Name="gitignores", EmitDefaultValue=false)] - public string Gitignores { get; set; } - - - /// - /// Desired README template to apply. Use the name of the template. - /// - /// Desired README template to apply. Use the name of the template. - [DataMember(Name="readme", EmitDefaultValue=false)] - public string Readme { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class CreateRepo {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" _Private: ").Append(_Private).Append("\n"); - sb.Append(" AutoInit: ").Append(AutoInit).Append("\n"); - sb.Append(" ProjectTemplate: ").Append(ProjectTemplate).Append("\n"); - sb.Append(" Gitignores: ").Append(Gitignores).Append("\n"); - sb.Append(" License: ").Append(License).Append("\n"); - sb.Append(" Readme: ").Append(Readme).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateRepo); - } - - /// - /// Returns true if CreateRepo instances are equal - /// - /// Instance of CreateRepo to be compared - /// Boolean - public bool Equals(CreateRepo input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this._Private == input._Private || - (this._Private != null && - this._Private.Equals(input._Private)) - ) && - ( - this.AutoInit == input.AutoInit || - (this.AutoInit != null && - this.AutoInit.Equals(input.AutoInit)) - ) && - ( - this.ProjectTemplate == input.ProjectTemplate || - (this.ProjectTemplate != null && - this.ProjectTemplate.Equals(input.ProjectTemplate)) - ) && - ( - this.Gitignores == input.Gitignores || - (this.Gitignores != null && - this.Gitignores.Equals(input.Gitignores)) - ) && - ( - this.License == input.License || - (this.License != null && - this.License.Equals(input.License)) - ) && - ( - this.Readme == input.Readme || - (this.Readme != null && - this.Readme.Equals(input.Readme)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this._Private != null) - hashCode = hashCode * 59 + this._Private.GetHashCode(); - if (this.AutoInit != null) - hashCode = hashCode * 59 + this.AutoInit.GetHashCode(); - if (this.ProjectTemplate != null) - hashCode = hashCode * 59 + this.ProjectTemplate.GetHashCode(); - if (this.Gitignores != null) - hashCode = hashCode * 59 + this.Gitignores.GetHashCode(); - if (this.License != null) - hashCode = hashCode * 59 + this.License.GetHashCode(); - if (this.Readme != null) - hashCode = hashCode * 59 + this.Readme.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/EditExperimentPost.cs b/C#/src/dagshub_api/Model/EditExperimentPost.cs deleted file mode 100644 index 364eae6..0000000 --- a/C#/src/dagshub_api/Model/EditExperimentPost.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// EditExperimentPost - /// - [DataContract] - public partial class EditExperimentPost : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name (required). - public EditExperimentPost(string name = default(string)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for EditExperimentPost and cannot be null"); - } - else - { - this.Name = name; - } - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EditExperimentPost {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EditExperimentPost); - } - - /// - /// Returns true if EditExperimentPost instances are equal - /// - /// Instance of EditExperimentPost to be compared - /// Boolean - public bool Equals(EditExperimentPost input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/ExperimentKeys.cs b/C#/src/dagshub_api/Model/ExperimentKeys.cs index 11ea7f6..48891d4 100644 --- a/C#/src/dagshub_api/Model/ExperimentKeys.cs +++ b/C#/src/dagshub_api/Model/ExperimentKeys.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/WebhookEvents.cs b/C#/src/dagshub_api/Model/ExperimentMetricsResponse.cs similarity index 78% rename from C#/src/dagshub_api/Model/WebhookEvents.cs rename to C#/src/dagshub_api/Model/ExperimentMetricsResponse.cs index 5528f29..aa15f11 100644 --- a/C#/src/dagshub_api/Model/WebhookEvents.cs +++ b/C#/src/dagshub_api/Model/ExperimentMetricsResponse.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -24,15 +24,15 @@ namespace dagshub_api.Model { /// - /// Determines what events the hook is triggered format. + /// Map of experiment IDs to their metrics by path /// [DataContract] - public partial class WebhookEvents : List, IEquatable, IValidatableObject + public partial class ExperimentMetricsResponse : Dictionary, IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public WebhookEvents() : base() + public ExperimentMetricsResponse() : base() { } @@ -43,7 +43,7 @@ public WebhookEvents() : base() public override string ToString() { var sb = new StringBuilder(); - sb.Append("class WebhookEvents {\n"); + sb.Append("class ExperimentMetricsResponse {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -53,7 +53,7 @@ public override string ToString() /// Returns the JSON string presentation of the object /// /// JSON string presentation of the object - public string ToJson() + public override string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } @@ -65,15 +65,15 @@ public string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as WebhookEvents); + return this.Equals(input as ExperimentMetricsResponse); } /// - /// Returns true if WebhookEvents instances are equal + /// Returns true if ExperimentMetricsResponse instances are equal /// - /// Instance of WebhookEvents to be compared + /// Instance of ExperimentMetricsResponse to be compared /// Boolean - public bool Equals(WebhookEvents input) + public bool Equals(ExperimentMetricsResponse input) { if (input == null) return false; diff --git a/C#/src/dagshub_api/Model/ExperimentsResponse.cs b/C#/src/dagshub_api/Model/ExperimentsResponse.cs new file mode 100644 index 0000000..ab5cbf2 --- /dev/null +++ b/C#/src/dagshub_api/Model/ExperimentsResponse.cs @@ -0,0 +1,158 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; + +namespace dagshub_api.Model +{ + /// + /// ExperimentsResponse + /// + [DataContract] + public partial class ExperimentsResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Map of experiment ID to experiment details. + /// Whether the authenticated user can edit experiments in this repo. + /// Pagination token for the next page of results (empty string when no more pages). + public ExperimentsResponse(Dictionary experiments = default(Dictionary), bool? isEditor = default(bool?), string nextPageToken = default(string)) + { + this.Experiments = experiments; + this.IsEditor = isEditor; + this.NextPageToken = nextPageToken; + } + + /// + /// Map of experiment ID to experiment details + /// + /// Map of experiment ID to experiment details + [DataMember(Name="experiments", EmitDefaultValue=false)] + public Dictionary Experiments { get; set; } + + /// + /// Whether the authenticated user can edit experiments in this repo + /// + /// Whether the authenticated user can edit experiments in this repo + [DataMember(Name="isEditor", EmitDefaultValue=false)] + public bool? IsEditor { get; set; } + + /// + /// Pagination token for the next page of results (empty string when no more pages) + /// + /// Pagination token for the next page of results (empty string when no more pages) + [DataMember(Name="nextPageToken", EmitDefaultValue=false)] + public string NextPageToken { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ExperimentsResponse {\n"); + sb.Append(" Experiments: ").Append(Experiments).Append("\n"); + sb.Append(" IsEditor: ").Append(IsEditor).Append("\n"); + sb.Append(" NextPageToken: ").Append(NextPageToken).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ExperimentsResponse); + } + + /// + /// Returns true if ExperimentsResponse instances are equal + /// + /// Instance of ExperimentsResponse to be compared + /// Boolean + public bool Equals(ExperimentsResponse input) + { + if (input == null) + return false; + + return + ( + this.Experiments == input.Experiments || + this.Experiments != null && + input.Experiments != null && + this.Experiments.SequenceEqual(input.Experiments) + ) && + ( + this.IsEditor == input.IsEditor || + (this.IsEditor != null && + this.IsEditor.Equals(input.IsEditor)) + ) && + ( + this.NextPageToken == input.NextPageToken || + (this.NextPageToken != null && + this.NextPageToken.Equals(input.NextPageToken)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Experiments != null) + hashCode = hashCode * 59 + this.Experiments.GetHashCode(); + if (this.IsEditor != null) + hashCode = hashCode * 59 + this.IsEditor.GetHashCode(); + if (this.NextPageToken != null) + hashCode = hashCode * 59 + this.NextPageToken.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/C#/src/dagshub_api/Model/File.cs b/C#/src/dagshub_api/Model/File.cs deleted file mode 100644 index 04c6f91..0000000 --- a/C#/src/dagshub_api/Model/File.cs +++ /dev/null @@ -1,255 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// File - /// - [DataContract] - public partial class File : IEquatable, IValidatableObject - { - /// - /// Defines Type - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum File for value: file - /// - [EnumMember(Value = "file")] - File = 1, - /// - /// Enum Dir for value: dir - /// - [EnumMember(Value = "dir")] - Dir = 2 } - /// - /// Gets or Sets Type - /// - [DataMember(Name="type", EmitDefaultValue=false)] - public TypeEnum? Type { get; set; } - /// - /// Defines Versioning - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum VersioningEnum - { - /// - /// Enum Git for value: git - /// - [EnumMember(Value = "git")] - Git = 1, - /// - /// Enum Dvc for value: dvc - /// - [EnumMember(Value = "dvc")] - Dvc = 2, - /// - /// Enum Bucket for value: bucket - /// - [EnumMember(Value = "bucket")] - Bucket = 3 } - /// - /// Gets or Sets Versioning - /// - [DataMember(Name="versioning", EmitDefaultValue=false)] - public VersioningEnum? Versioning { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// path. - /// type. - /// size. - /// hash. - /// versioning. - /// downloadUrl. - /// contentUrl. - public File(string path = default(string), TypeEnum? type = default(TypeEnum?), long? size = default(long?), string hash = default(string), VersioningEnum? versioning = default(VersioningEnum?), string downloadUrl = default(string), string contentUrl = default(string)) - { - this.Path = path; - this.Type = type; - this.Size = size; - this.Hash = hash; - this.Versioning = versioning; - this.DownloadUrl = downloadUrl; - this.ContentUrl = contentUrl; - } - - /// - /// Gets or Sets Path - /// - [DataMember(Name="path", EmitDefaultValue=false)] - public string Path { get; set; } - - - /// - /// Gets or Sets Size - /// - [DataMember(Name="size", EmitDefaultValue=false)] - public long? Size { get; set; } - - /// - /// Gets or Sets Hash - /// - [DataMember(Name="hash", EmitDefaultValue=false)] - public string Hash { get; set; } - - - /// - /// Gets or Sets DownloadUrl - /// - [DataMember(Name="download_url", EmitDefaultValue=false)] - public string DownloadUrl { get; set; } - - /// - /// Gets or Sets ContentUrl - /// - [DataMember(Name="content_url", EmitDefaultValue=false)] - public string ContentUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class File {\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Size: ").Append(Size).Append("\n"); - sb.Append(" Hash: ").Append(Hash).Append("\n"); - sb.Append(" Versioning: ").Append(Versioning).Append("\n"); - sb.Append(" DownloadUrl: ").Append(DownloadUrl).Append("\n"); - sb.Append(" ContentUrl: ").Append(ContentUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as File); - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File input) - { - if (input == null) - return false; - - return - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Size == input.Size || - (this.Size != null && - this.Size.Equals(input.Size)) - ) && - ( - this.Hash == input.Hash || - (this.Hash != null && - this.Hash.Equals(input.Hash)) - ) && - ( - this.Versioning == input.Versioning || - (this.Versioning != null && - this.Versioning.Equals(input.Versioning)) - ) && - ( - this.DownloadUrl == input.DownloadUrl || - (this.DownloadUrl != null && - this.DownloadUrl.Equals(input.DownloadUrl)) - ) && - ( - this.ContentUrl == input.ContentUrl || - (this.ContentUrl != null && - this.ContentUrl.Equals(input.ContentUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Path != null) - hashCode = hashCode * 59 + this.Path.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Size != null) - hashCode = hashCode * 59 + this.Size.GetHashCode(); - if (this.Hash != null) - hashCode = hashCode * 59 + this.Hash.GetHashCode(); - if (this.Versioning != null) - hashCode = hashCode * 59 + this.Versioning.GetHashCode(); - if (this.DownloadUrl != null) - hashCode = hashCode * 59 + this.DownloadUrl.GetHashCode(); - if (this.ContentUrl != null) - hashCode = hashCode * 59 + this.ContentUrl.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/Files.cs b/C#/src/dagshub_api/Model/Files.cs index 5e981fe..d3f26cb 100644 --- a/C#/src/dagshub_api/Model/Files.cs +++ b/C#/src/dagshub_api/Model/Files.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -27,7 +27,7 @@ namespace dagshub_api.Model /// Files /// [DataContract] - public partial class Files : List, IEquatable, IValidatableObject + public partial class Files : List, IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. diff --git a/C#/src/dagshub_api/Model/Files1.cs b/C#/src/dagshub_api/Model/Files1.cs index b1cd46b..3325229 100644 --- a/C#/src/dagshub_api/Model/Files1.cs +++ b/C#/src/dagshub_api/Model/Files1.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -33,12 +33,10 @@ public partial class Files1 : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// entries. - /// limit. - /// nextToken. - public Files1(List entries = default(List), int? limit = default(int?), string nextToken = default(string)) + /// Next token to continue pagination from. + public Files1(List entries = default(List), string nextToken = default(string)) { this.Entries = entries; - this.Limit = limit; this.NextToken = nextToken; } @@ -46,17 +44,12 @@ public partial class Files1 : IEquatable, IValidatableObject /// Gets or Sets Entries /// [DataMember(Name="entries", EmitDefaultValue=false)] - public List Entries { get; set; } + public List Entries { get; set; } /// - /// Gets or Sets Limit - /// - [DataMember(Name="limit", EmitDefaultValue=false)] - public int? Limit { get; set; } - - /// - /// Gets or Sets NextToken + /// Next token to continue pagination from /// + /// Next token to continue pagination from [DataMember(Name="next_token", EmitDefaultValue=false)] public string NextToken { get; set; } @@ -69,7 +62,6 @@ public override string ToString() var sb = new StringBuilder(); sb.Append("class Files1 {\n"); sb.Append(" Entries: ").Append(Entries).Append("\n"); - sb.Append(" Limit: ").Append(Limit).Append("\n"); sb.Append(" NextToken: ").Append(NextToken).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -111,11 +103,6 @@ public bool Equals(Files1 input) input.Entries != null && this.Entries.SequenceEqual(input.Entries) ) && - ( - this.Limit == input.Limit || - (this.Limit != null && - this.Limit.Equals(input.Limit)) - ) && ( this.NextToken == input.NextToken || (this.NextToken != null && @@ -134,8 +121,6 @@ public override int GetHashCode() int hashCode = 41; if (this.Entries != null) hashCode = hashCode * 59 + this.Entries.GetHashCode(); - if (this.Limit != null) - hashCode = hashCode * 59 + this.Limit.GetHashCode(); if (this.NextToken != null) hashCode = hashCode * 59 + this.NextToken.GetHashCode(); return hashCode; diff --git a/C#/src/dagshub_api/Model/HooksIdBody.cs b/C#/src/dagshub_api/Model/HooksIdBody.cs deleted file mode 100644 index d8e242b..0000000 --- a/C#/src/dagshub_api/Model/HooksIdBody.cs +++ /dev/null @@ -1,155 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// HooksIdBody - /// - [DataContract] - public partial class HooksIdBody : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// config. - /// events. - /// Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged.. - public HooksIdBody(WebhookConfig config = default(WebhookConfig), WebhookEvents events = default(WebhookEvents), bool? active = default(bool?)) - { - this.Config = config; - this.Events = events; - this.Active = active; - } - - /// - /// Gets or Sets Config - /// - [DataMember(Name="config", EmitDefaultValue=false)] - public WebhookConfig Config { get; set; } - - /// - /// Gets or Sets Events - /// - [DataMember(Name="events", EmitDefaultValue=false)] - public WebhookEvents Events { get; set; } - - /// - /// Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. - /// - /// Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. - [DataMember(Name="active", EmitDefaultValue=false)] - public bool? Active { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class HooksIdBody {\n"); - sb.Append(" Config: ").Append(Config).Append("\n"); - sb.Append(" Events: ").Append(Events).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HooksIdBody); - } - - /// - /// Returns true if HooksIdBody instances are equal - /// - /// Instance of HooksIdBody to be compared - /// Boolean - public bool Equals(HooksIdBody input) - { - if (input == null) - return false; - - return - ( - this.Config == input.Config || - (this.Config != null && - this.Config.Equals(input.Config)) - ) && - ( - this.Events == input.Events || - (this.Events != null && - this.Events.Equals(input.Events)) - ) && - ( - this.Active == input.Active || - (this.Active != null && - this.Active.Equals(input.Active)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Config != null) - hashCode = hashCode * 59 + this.Config.GetHashCode(); - if (this.Events != null) - hashCode = hashCode * 59 + this.Events.GetHashCode(); - if (this.Active != null) - hashCode = hashCode * 59 + this.Active.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/Integration.cs b/C#/src/dagshub_api/Model/Integration.cs index 745578f..0ef081f 100644 --- a/C#/src/dagshub_api/Model/Integration.cs +++ b/C#/src/dagshub_api/Model/Integration.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -27,7 +27,7 @@ namespace dagshub_api.Model /// Integration /// [DataContract] - public partial class Integration : List, IEquatable, IValidatableObject + public partial class Integration : List, IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. diff --git a/C#/src/dagshub_api/Model/IntegrationInner.cs b/C#/src/dagshub_api/Model/IntegrationInner.cs deleted file mode 100644 index 9e32419..0000000 --- a/C#/src/dagshub_api/Model/IntegrationInner.cs +++ /dev/null @@ -1,174 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// IntegrationInner - /// - [DataContract] - public partial class IntegrationInner : IEquatable, IValidatableObject - { - /// - /// Protocol used by the integration - /// - /// Protocol used by the integration - [JsonConverter(typeof(StringEnumConverter))] - public enum ProtocolEnum - { - /// - /// Enum S3 for value: s3 - /// - [EnumMember(Value = "s3")] - S3 = 1, - /// - /// Enum Gs for value: gs - /// - [EnumMember(Value = "gs")] - Gs = 2 } - /// - /// Protocol used by the integration - /// - /// Protocol used by the integration - [DataMember(Name="protocol", EmitDefaultValue=false)] - public ProtocolEnum? Protocol { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Name/path of the bucket. - /// Protocol used by the integration. - /// URL to list the root of this bucket. - public IntegrationInner(string name = default(string), ProtocolEnum? protocol = default(ProtocolEnum?), string listPath = default(string)) - { - this.Name = name; - this.Protocol = protocol; - this.ListPath = listPath; - } - - /// - /// Name/path of the bucket - /// - /// Name/path of the bucket - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - - /// - /// URL to list the root of this bucket - /// - /// URL to list the root of this bucket - [DataMember(Name="list_path", EmitDefaultValue=false)] - public string ListPath { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class IntegrationInner {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Protocol: ").Append(Protocol).Append("\n"); - sb.Append(" ListPath: ").Append(ListPath).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IntegrationInner); - } - - /// - /// Returns true if IntegrationInner instances are equal - /// - /// Instance of IntegrationInner to be compared - /// Boolean - public bool Equals(IntegrationInner input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Protocol == input.Protocol || - (this.Protocol != null && - this.Protocol.Equals(input.Protocol)) - ) && - ( - this.ListPath == input.ListPath || - (this.ListPath != null && - this.ListPath.Equals(input.ListPath)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Protocol != null) - hashCode = hashCode * 59 + this.Protocol.GetHashCode(); - if (this.ListPath != null) - hashCode = hashCode * 59 + this.ListPath.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/Issue.cs b/C#/src/dagshub_api/Model/Issue.cs index 3254e66..0c12b25 100644 --- a/C#/src/dagshub_api/Model/Issue.cs +++ b/C#/src/dagshub_api/Model/Issue.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -29,82 +29,53 @@ namespace dagshub_api.Model [DataContract] public partial class Issue : IEquatable, IValidatableObject { + /// + /// Defines State + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum StateEnum + { + /// + /// Enum Open for value: open + /// + [EnumMember(Value = "open")] + Open = 1, + /// + /// Enum Closed for value: closed + /// + [EnumMember(Value = "closed")] + Closed = 2 } + /// + /// Gets or Sets State + /// + [DataMember(Name="state", EmitDefaultValue=false)] + public StateEnum? State { get; set; } /// /// Initializes a new instance of the class. /// /// id. - /// number. + /// Issue index within the repository. /// user. - /// title (required). - /// body (required). - /// labels (required). - /// milestone (required). - /// assignee (required). + /// title. + /// body. + /// labels. + /// milestone. + /// assignee. /// state. /// comments. /// createdAt. /// updatedAt. - /// pullRequest. - /// closed (required). - public Issue(int? id = default(int?), int? number = default(int?), User user = default(User), string title = default(string), string body = default(string), List labels = default(List), IssueMilestone milestone = default(IssueMilestone), IssueAssignee assignee = default(IssueAssignee), string state = default(string), int? comments = default(int?), string createdAt = default(string), string updatedAt = default(string), Object pullRequest = default(Object), bool? closed = default(bool?)) + /// Present when the issue is associated with a pull request. + public Issue(long? id = default(long?), long? number = default(long?), ComponentsschemasUserYaml user = default(ComponentsschemasUserYaml), string title = default(string), string body = default(string), List labels = default(List), Object milestone = default(Object), ComponentsschemasUserYaml assignee = default(ComponentsschemasUserYaml), StateEnum? state = default(StateEnum?), int? comments = default(int?), DateTime? createdAt = default(DateTime?), DateTime? updatedAt = default(DateTime?), Object pullRequest = default(Object)) { - // to ensure "title" is required (not null) - if (title == null) - { - throw new InvalidDataException("title is a required property for Issue and cannot be null"); - } - else - { - this.Title = title; - } - // to ensure "body" is required (not null) - if (body == null) - { - throw new InvalidDataException("body is a required property for Issue and cannot be null"); - } - else - { - this.Body = body; - } - // to ensure "labels" is required (not null) - if (labels == null) - { - throw new InvalidDataException("labels is a required property for Issue and cannot be null"); - } - else - { - this.Labels = labels; - } - // to ensure "milestone" is required (not null) - if (milestone == null) - { - throw new InvalidDataException("milestone is a required property for Issue and cannot be null"); - } - else - { - this.Milestone = milestone; - } - // to ensure "assignee" is required (not null) - if (assignee == null) - { - throw new InvalidDataException("assignee is a required property for Issue and cannot be null"); - } - else - { - this.Assignee = assignee; - } - // to ensure "closed" is required (not null) - if (closed == null) - { - throw new InvalidDataException("closed is a required property for Issue and cannot be null"); - } - else - { - this.Closed = closed; - } this.Id = id; this.Number = number; this.User = user; + this.Title = title; + this.Body = body; + this.Labels = labels; + this.Milestone = milestone; + this.Assignee = assignee; this.State = state; this.Comments = comments; this.CreatedAt = createdAt; @@ -116,19 +87,20 @@ public partial class Issue : IEquatable, IValidatableObject /// Gets or Sets Id /// [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + public long? Id { get; set; } /// - /// Gets or Sets Number + /// Issue index within the repository /// + /// Issue index within the repository [DataMember(Name="number", EmitDefaultValue=false)] - public int? Number { get; set; } + public long? Number { get; set; } /// /// Gets or Sets User /// [DataMember(Name="user", EmitDefaultValue=false)] - public User User { get; set; } + public ComponentsschemasUserYaml User { get; set; } /// /// Gets or Sets Title @@ -146,25 +118,20 @@ public partial class Issue : IEquatable, IValidatableObject /// Gets or Sets Labels /// [DataMember(Name="labels", EmitDefaultValue=false)] - public List Labels { get; set; } + public List Labels { get; set; } /// /// Gets or Sets Milestone /// [DataMember(Name="milestone", EmitDefaultValue=false)] - public IssueMilestone Milestone { get; set; } + public Object Milestone { get; set; } /// /// Gets or Sets Assignee /// [DataMember(Name="assignee", EmitDefaultValue=false)] - public IssueAssignee Assignee { get; set; } + public ComponentsschemasUserYaml Assignee { get; set; } - /// - /// Gets or Sets State - /// - [DataMember(Name="state", EmitDefaultValue=false)] - public string State { get; set; } /// /// Gets or Sets Comments @@ -176,26 +143,21 @@ public partial class Issue : IEquatable, IValidatableObject /// Gets or Sets CreatedAt /// [DataMember(Name="created_at", EmitDefaultValue=false)] - public string CreatedAt { get; set; } + public DateTime? CreatedAt { get; set; } /// /// Gets or Sets UpdatedAt /// [DataMember(Name="updated_at", EmitDefaultValue=false)] - public string UpdatedAt { get; set; } + public DateTime? UpdatedAt { get; set; } /// - /// Gets or Sets PullRequest + /// Present when the issue is associated with a pull request /// + /// Present when the issue is associated with a pull request [DataMember(Name="pull_request", EmitDefaultValue=false)] public Object PullRequest { get; set; } - /// - /// Gets or Sets Closed - /// - [DataMember(Name="closed", EmitDefaultValue=false)] - public bool? Closed { get; set; } - /// /// Returns the string presentation of the object /// @@ -217,7 +179,6 @@ public override string ToString() sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); sb.Append(" PullRequest: ").Append(PullRequest).Append("\n"); - sb.Append(" Closed: ").Append(Closed).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -317,11 +278,6 @@ public bool Equals(Issue input) this.PullRequest == input.PullRequest || (this.PullRequest != null && this.PullRequest.Equals(input.PullRequest)) - ) && - ( - this.Closed == input.Closed || - (this.Closed != null && - this.Closed.Equals(input.Closed)) ); } @@ -360,8 +316,6 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); if (this.PullRequest != null) hashCode = hashCode * 59 + this.PullRequest.GetHashCode(); - if (this.Closed != null) - hashCode = hashCode * 59 + this.Closed.GetHashCode(); return hashCode; } } diff --git a/C#/src/dagshub_api/Model/IssueAssignee.cs b/C#/src/dagshub_api/Model/IssueAssignee.cs deleted file mode 100644 index c62c743..0000000 --- a/C#/src/dagshub_api/Model/IssueAssignee.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// IssueAssignee - /// - [DataContract] - public partial class IssueAssignee : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// login. - /// fullName. - /// avatarUrl. - /// username. - public IssueAssignee(int? id = default(int?), string login = default(string), string fullName = default(string), string avatarUrl = default(string), string username = default(string)) - { - this.Id = id; - this.Login = login; - this.FullName = fullName; - this.AvatarUrl = avatarUrl; - this.Username = username; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } - - /// - /// Gets or Sets Login - /// - [DataMember(Name="login", EmitDefaultValue=false)] - public string Login { get; set; } - - /// - /// Gets or Sets FullName - /// - [DataMember(Name="full_name", EmitDefaultValue=false)] - public string FullName { get; set; } - - /// - /// Gets or Sets AvatarUrl - /// - [DataMember(Name="avatar_url", EmitDefaultValue=false)] - public string AvatarUrl { get; set; } - - /// - /// Gets or Sets Username - /// - [DataMember(Name="username", EmitDefaultValue=false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class IssueAssignee {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Login: ").Append(Login).Append("\n"); - sb.Append(" FullName: ").Append(FullName).Append("\n"); - sb.Append(" AvatarUrl: ").Append(AvatarUrl).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IssueAssignee); - } - - /// - /// Returns true if IssueAssignee instances are equal - /// - /// Instance of IssueAssignee to be compared - /// Boolean - public bool Equals(IssueAssignee input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Login == input.Login || - (this.Login != null && - this.Login.Equals(input.Login)) - ) && - ( - this.FullName == input.FullName || - (this.FullName != null && - this.FullName.Equals(input.FullName)) - ) && - ( - this.AvatarUrl == input.AvatarUrl || - (this.AvatarUrl != null && - this.AvatarUrl.Equals(input.AvatarUrl)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Login != null) - hashCode = hashCode * 59 + this.Login.GetHashCode(); - if (this.FullName != null) - hashCode = hashCode * 59 + this.FullName.GetHashCode(); - if (this.AvatarUrl != null) - hashCode = hashCode * 59 + this.AvatarUrl.GetHashCode(); - if (this.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/IssueLabels.cs b/C#/src/dagshub_api/Model/IssueLabels.cs deleted file mode 100644 index 8dfd38f..0000000 --- a/C#/src/dagshub_api/Model/IssueLabels.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// IssueLabels - /// - [DataContract] - public partial class IssueLabels : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// color. - /// url. - public IssueLabels(int? id = default(int?), string name = default(string), string color = default(string), string url = default(string)) - { - this.Id = id; - this.Name = name; - this.Color = color; - this.Url = url; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Gets or Sets Color - /// - [DataMember(Name="color", EmitDefaultValue=false)] - public string Color { get; set; } - - /// - /// Gets or Sets Url - /// - [DataMember(Name="url", EmitDefaultValue=false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class IssueLabels {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IssueLabels); - } - - /// - /// Returns true if IssueLabels instances are equal - /// - /// Instance of IssueLabels to be compared - /// Boolean - public bool Equals(IssueLabels input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Color != null) - hashCode = hashCode * 59 + this.Color.GetHashCode(); - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/IssueMilestone.cs b/C#/src/dagshub_api/Model/IssueMilestone.cs deleted file mode 100644 index 870ec33..0000000 --- a/C#/src/dagshub_api/Model/IssueMilestone.cs +++ /dev/null @@ -1,234 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// IssueMilestone - /// - [DataContract] - public partial class IssueMilestone : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// title. - /// description. - /// state. - /// openIssues. - /// closedIssues. - /// closedAt. - /// dueOn. - public IssueMilestone(int? id = default(int?), string title = default(string), string description = default(string), string state = default(string), int? openIssues = default(int?), int? closedIssues = default(int?), string closedAt = default(string), string dueOn = default(string)) - { - this.Id = id; - this.Title = title; - this.Description = description; - this.State = state; - this.OpenIssues = openIssues; - this.ClosedIssues = closedIssues; - this.ClosedAt = closedAt; - this.DueOn = dueOn; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } - - /// - /// Gets or Sets Title - /// - [DataMember(Name="title", EmitDefaultValue=false)] - public string Title { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name="description", EmitDefaultValue=false)] - public string Description { get; set; } - - /// - /// Gets or Sets State - /// - [DataMember(Name="state", EmitDefaultValue=false)] - public string State { get; set; } - - /// - /// Gets or Sets OpenIssues - /// - [DataMember(Name="open_issues", EmitDefaultValue=false)] - public int? OpenIssues { get; set; } - - /// - /// Gets or Sets ClosedIssues - /// - [DataMember(Name="closed_issues", EmitDefaultValue=false)] - public int? ClosedIssues { get; set; } - - /// - /// Gets or Sets ClosedAt - /// - [DataMember(Name="closed_at", EmitDefaultValue=false)] - public string ClosedAt { get; set; } - - /// - /// Gets or Sets DueOn - /// - [DataMember(Name="due_on", EmitDefaultValue=false)] - public string DueOn { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class IssueMilestone {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" State: ").Append(State).Append("\n"); - sb.Append(" OpenIssues: ").Append(OpenIssues).Append("\n"); - sb.Append(" ClosedIssues: ").Append(ClosedIssues).Append("\n"); - sb.Append(" ClosedAt: ").Append(ClosedAt).Append("\n"); - sb.Append(" DueOn: ").Append(DueOn).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IssueMilestone); - } - - /// - /// Returns true if IssueMilestone instances are equal - /// - /// Instance of IssueMilestone to be compared - /// Boolean - public bool Equals(IssueMilestone input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.OpenIssues == input.OpenIssues || - (this.OpenIssues != null && - this.OpenIssues.Equals(input.OpenIssues)) - ) && - ( - this.ClosedIssues == input.ClosedIssues || - (this.ClosedIssues != null && - this.ClosedIssues.Equals(input.ClosedIssues)) - ) && - ( - this.ClosedAt == input.ClosedAt || - (this.ClosedAt != null && - this.ClosedAt.Equals(input.ClosedAt)) - ) && - ( - this.DueOn == input.DueOn || - (this.DueOn != null && - this.DueOn.Equals(input.DueOn)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Title != null) - hashCode = hashCode * 59 + this.Title.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.State != null) - hashCode = hashCode * 59 + this.State.GetHashCode(); - if (this.OpenIssues != null) - hashCode = hashCode * 59 + this.OpenIssues.GetHashCode(); - if (this.ClosedIssues != null) - hashCode = hashCode * 59 + this.ClosedIssues.GetHashCode(); - if (this.ClosedAt != null) - hashCode = hashCode * 59 + this.ClosedAt.GetHashCode(); - if (this.DueOn != null) - hashCode = hashCode * 59 + this.DueOn.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/Issues.cs b/C#/src/dagshub_api/Model/Issues.cs index 1ec6b7c..5ba630e 100644 --- a/C#/src/dagshub_api/Model/Issues.cs +++ b/C#/src/dagshub_api/Model/Issues.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -27,7 +27,7 @@ namespace dagshub_api.Model /// Issues /// [DataContract] - public partial class Issues : List, IEquatable, IValidatableObject + public partial class Issues : List, IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. diff --git a/C#/src/dagshub_api/Model/Labels.cs b/C#/src/dagshub_api/Model/Labels.cs deleted file mode 100644 index 4de30df..0000000 --- a/C#/src/dagshub_api/Model/Labels.cs +++ /dev/null @@ -1,107 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// Labels **ID** to associate with this issue. **Note:** Only users with write access can set labels for new issues. Labels are silently dropped otherwise. - /// - [DataContract] - public partial class Labels : List, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - public Labels() : base() - { - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Labels {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Labels); - } - - /// - /// Returns true if Labels instances are equal - /// - /// Instance of Labels to be compared - /// Boolean - public bool Equals(Labels input) - { - if (input == null) - return false; - - return base.Equals(input); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/MigrateRepo.cs b/C#/src/dagshub_api/Model/MigrateRepo.cs deleted file mode 100644 index 515224d..0000000 --- a/C#/src/dagshub_api/Model/MigrateRepo.cs +++ /dev/null @@ -1,291 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// MigrateRepo - /// - [DataContract] - public partial class MigrateRepo : IEquatable, IValidatableObject - { - /// - /// Repository will be private or public. - /// - /// Repository will be private or public. - [JsonConverter(typeof(StringEnumConverter))] - public enum VisibilityEnum - { - /// - /// Enum Private for value: private - /// - [EnumMember(Value = "private")] - Private = 1, - /// - /// Enum Public for value: public - /// - [EnumMember(Value = "public")] - Public = 2 } - /// - /// Repository will be private or public. - /// - /// Repository will be private or public. - [DataMember(Name="visibility", EmitDefaultValue=false)] - public VisibilityEnum? Visibility { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Remote Git address (HTTP/HTTPS URL or local path) (required). - /// Authorization username. - /// Authorization password. - /// User ID who takes ownership of this repository (required). - /// Name of the repository. - /// Repository will be a mirror (connected repository). (default to false). - /// Repository will be private or public. (default to false). - /// Description of the repository. - public MigrateRepo(string cloneAddr = default(string), string authUsername = default(string), string authPassword = default(string), int? userId = default(int?), string repoName = default(string), bool? mirror = false, VisibilityEnum? visibility = false, string description = default(string)) - { - // to ensure "cloneAddr" is required (not null) - if (cloneAddr == null) - { - throw new InvalidDataException("cloneAddr is a required property for MigrateRepo and cannot be null"); - } - else - { - this.CloneAddr = cloneAddr; - } - // to ensure "userId" is required (not null) - if (userId == null) - { - throw new InvalidDataException("userId is a required property for MigrateRepo and cannot be null"); - } - else - { - this.UserId = userId; - } - this.AuthUsername = authUsername; - this.AuthPassword = authPassword; - this.RepoName = repoName; - // use default value if no "mirror" provided - if (mirror == null) - { - this.Mirror = false; - } - else - { - this.Mirror = mirror; - } - // use default value if no "visibility" provided - if (visibility == null) - { - this.Visibility = false; - } - else - { - this.Visibility = visibility; - } - this.Description = description; - } - - /// - /// Remote Git address (HTTP/HTTPS URL or local path) - /// - /// Remote Git address (HTTP/HTTPS URL or local path) - [DataMember(Name="clone_addr", EmitDefaultValue=false)] - public string CloneAddr { get; set; } - - /// - /// Authorization username - /// - /// Authorization username - [DataMember(Name="auth_username", EmitDefaultValue=false)] - public string AuthUsername { get; set; } - - /// - /// Authorization password - /// - /// Authorization password - [DataMember(Name="auth_password", EmitDefaultValue=false)] - public string AuthPassword { get; set; } - - /// - /// User ID who takes ownership of this repository - /// - /// User ID who takes ownership of this repository - [DataMember(Name="user_id", EmitDefaultValue=false)] - public int? UserId { get; set; } - - /// - /// Name of the repository - /// - /// Name of the repository - [DataMember(Name="repo_name", EmitDefaultValue=false)] - public string RepoName { get; set; } - - /// - /// Repository will be a mirror (connected repository). - /// - /// Repository will be a mirror (connected repository). - [DataMember(Name="mirror", EmitDefaultValue=false)] - public bool? Mirror { get; set; } - - - /// - /// Description of the repository - /// - /// Description of the repository - [DataMember(Name="description", EmitDefaultValue=false)] - public string Description { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MigrateRepo {\n"); - sb.Append(" CloneAddr: ").Append(CloneAddr).Append("\n"); - sb.Append(" AuthUsername: ").Append(AuthUsername).Append("\n"); - sb.Append(" AuthPassword: ").Append(AuthPassword).Append("\n"); - sb.Append(" UserId: ").Append(UserId).Append("\n"); - sb.Append(" RepoName: ").Append(RepoName).Append("\n"); - sb.Append(" Mirror: ").Append(Mirror).Append("\n"); - sb.Append(" Visibility: ").Append(Visibility).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MigrateRepo); - } - - /// - /// Returns true if MigrateRepo instances are equal - /// - /// Instance of MigrateRepo to be compared - /// Boolean - public bool Equals(MigrateRepo input) - { - if (input == null) - return false; - - return - ( - this.CloneAddr == input.CloneAddr || - (this.CloneAddr != null && - this.CloneAddr.Equals(input.CloneAddr)) - ) && - ( - this.AuthUsername == input.AuthUsername || - (this.AuthUsername != null && - this.AuthUsername.Equals(input.AuthUsername)) - ) && - ( - this.AuthPassword == input.AuthPassword || - (this.AuthPassword != null && - this.AuthPassword.Equals(input.AuthPassword)) - ) && - ( - this.UserId == input.UserId || - (this.UserId != null && - this.UserId.Equals(input.UserId)) - ) && - ( - this.RepoName == input.RepoName || - (this.RepoName != null && - this.RepoName.Equals(input.RepoName)) - ) && - ( - this.Mirror == input.Mirror || - (this.Mirror != null && - this.Mirror.Equals(input.Mirror)) - ) && - ( - this.Visibility == input.Visibility || - (this.Visibility != null && - this.Visibility.Equals(input.Visibility)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CloneAddr != null) - hashCode = hashCode * 59 + this.CloneAddr.GetHashCode(); - if (this.AuthUsername != null) - hashCode = hashCode * 59 + this.AuthUsername.GetHashCode(); - if (this.AuthPassword != null) - hashCode = hashCode * 59 + this.AuthPassword.GetHashCode(); - if (this.UserId != null) - hashCode = hashCode * 59 + this.UserId.GetHashCode(); - if (this.RepoName != null) - hashCode = hashCode * 59 + this.RepoName.GetHashCode(); - if (this.Mirror != null) - hashCode = hashCode * 59 + this.Mirror.GetHashCode(); - if (this.Visibility != null) - hashCode = hashCode * 59 + this.Visibility.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/PatchIssue.cs b/C#/src/dagshub_api/Model/PatchIssue.cs index 78e0101..27d0b47 100644 --- a/C#/src/dagshub_api/Model/PatchIssue.cs +++ b/C#/src/dagshub_api/Model/PatchIssue.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -37,7 +37,7 @@ public partial class PatchIssue : IEquatable, IValidatableObject /// assignee. /// milestone. /// state. - public PatchIssue(string title = default(string), string body = default(string), string assignee = default(string), int? milestone = default(int?), State state = default(State)) + public PatchIssue(ComponentsschemasTitleYaml title = default(ComponentsschemasTitleYaml), ComponentsschemasBodyYaml body = default(ComponentsschemasBodyYaml), ComponentsschemasAssigneeYaml assignee = default(ComponentsschemasAssigneeYaml), ComponentsschemasMilestoneYaml milestone = default(ComponentsschemasMilestoneYaml), ComponentsschemasStateYaml state = default(ComponentsschemasStateYaml)) { this.Title = title; this.Body = body; @@ -50,31 +50,31 @@ public partial class PatchIssue : IEquatable, IValidatableObject /// Gets or Sets Title /// [DataMember(Name="title", EmitDefaultValue=false)] - public string Title { get; set; } + public ComponentsschemasTitleYaml Title { get; set; } /// /// Gets or Sets Body /// [DataMember(Name="body", EmitDefaultValue=false)] - public string Body { get; set; } + public ComponentsschemasBodyYaml Body { get; set; } /// /// Gets or Sets Assignee /// [DataMember(Name="assignee", EmitDefaultValue=false)] - public string Assignee { get; set; } + public ComponentsschemasAssigneeYaml Assignee { get; set; } /// /// Gets or Sets Milestone /// [DataMember(Name="milestone", EmitDefaultValue=false)] - public int? Milestone { get; set; } + public ComponentsschemasMilestoneYaml Milestone { get; set; } /// /// Gets or Sets State /// [DataMember(Name="state", EmitDefaultValue=false)] - public State State { get; set; } + public ComponentsschemasStateYaml State { get; set; } /// /// Returns the string presentation of the object diff --git a/C#/src/dagshub_api/Model/PostIssue.cs b/C#/src/dagshub_api/Model/PostIssue.cs index 5e7935c..3790512 100644 --- a/C#/src/dagshub_api/Model/PostIssue.cs +++ b/C#/src/dagshub_api/Model/PostIssue.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -38,7 +38,7 @@ public partial class PostIssue : IEquatable, IValidatableObject /// milestone. /// labels. /// closed. - public PostIssue(string title = default(string), string body = default(string), string assignee = default(string), int? milestone = default(int?), Labels labels = default(Labels), bool? closed = default(bool?)) + public PostIssue(ComponentsschemasTitleYaml title = default(ComponentsschemasTitleYaml), ComponentsschemasBodyYaml body = default(ComponentsschemasBodyYaml), ComponentsschemasAssigneeYaml assignee = default(ComponentsschemasAssigneeYaml), ComponentsschemasMilestoneYaml milestone = default(ComponentsschemasMilestoneYaml), ComponentsschemasLabelsYaml labels = default(ComponentsschemasLabelsYaml), ComponentsschemasClosedYaml closed = default(ComponentsschemasClosedYaml)) { this.Title = title; this.Body = body; @@ -52,37 +52,37 @@ public partial class PostIssue : IEquatable, IValidatableObject /// Gets or Sets Title /// [DataMember(Name="title", EmitDefaultValue=false)] - public string Title { get; set; } + public ComponentsschemasTitleYaml Title { get; set; } /// /// Gets or Sets Body /// [DataMember(Name="body", EmitDefaultValue=false)] - public string Body { get; set; } + public ComponentsschemasBodyYaml Body { get; set; } /// /// Gets or Sets Assignee /// [DataMember(Name="assignee", EmitDefaultValue=false)] - public string Assignee { get; set; } + public ComponentsschemasAssigneeYaml Assignee { get; set; } /// /// Gets or Sets Milestone /// [DataMember(Name="milestone", EmitDefaultValue=false)] - public int? Milestone { get; set; } + public ComponentsschemasMilestoneYaml Milestone { get; set; } /// /// Gets or Sets Labels /// [DataMember(Name="labels", EmitDefaultValue=false)] - public Labels Labels { get; set; } + public ComponentsschemasLabelsYaml Labels { get; set; } /// /// Gets or Sets Closed /// [DataMember(Name="closed", EmitDefaultValue=false)] - public bool? Closed { get; set; } + public ComponentsschemasClosedYaml Closed { get; set; } /// /// Returns the string presentation of the object diff --git a/C#/src/dagshub_api/Model/PutFile.cs b/C#/src/dagshub_api/Model/PutFile.cs index 28c7460..af87d8c 100644 --- a/C#/src/dagshub_api/Model/PutFile.cs +++ b/C#/src/dagshub_api/Model/PutFile.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/RepoHooksBody.cs b/C#/src/dagshub_api/Model/RepoHooksBody.cs deleted file mode 100644 index 2e0e502..0000000 --- a/C#/src/dagshub_api/Model/RepoHooksBody.cs +++ /dev/null @@ -1,198 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// RepoHooksBody - /// - [DataContract] - public partial class RepoHooksBody : IEquatable, IValidatableObject - { - /// - /// The type of webhook - /// - /// The type of webhook - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Dagshub for value: dagshub - /// - [EnumMember(Value = "dagshub")] - Dagshub = 1, - /// - /// Enum Slack for value: slack - /// - [EnumMember(Value = "slack")] - Slack = 2, - /// - /// Enum Discord for value: discord - /// - [EnumMember(Value = "discord")] - Discord = 3, - /// - /// Enum Dingtalk for value: dingtalk - /// - [EnumMember(Value = "dingtalk")] - Dingtalk = 4 } - /// - /// The type of webhook - /// - /// The type of webhook - [DataMember(Name="type", EmitDefaultValue=false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of webhook (required). - /// config (required). - /// events. - public RepoHooksBody(TypeEnum type = default(TypeEnum), WebhookConfig config = default(WebhookConfig), WebhookEvents events = default(WebhookEvents)) - { - // to ensure "type" is required (not null) - if (type == null) - { - throw new InvalidDataException("type is a required property for RepoHooksBody and cannot be null"); - } - else - { - this.Type = type; - } - // to ensure "config" is required (not null) - if (config == null) - { - throw new InvalidDataException("config is a required property for RepoHooksBody and cannot be null"); - } - else - { - this.Config = config; - } - this.Events = events; - } - - - /// - /// Gets or Sets Config - /// - [DataMember(Name="config", EmitDefaultValue=false)] - public WebhookConfig Config { get; set; } - - /// - /// Gets or Sets Events - /// - [DataMember(Name="events", EmitDefaultValue=false)] - public WebhookEvents Events { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class RepoHooksBody {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Config: ").Append(Config).Append("\n"); - sb.Append(" Events: ").Append(Events).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RepoHooksBody); - } - - /// - /// Returns true if RepoHooksBody instances are equal - /// - /// Instance of RepoHooksBody to be compared - /// Boolean - public bool Equals(RepoHooksBody input) - { - if (input == null) - return false; - - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Config == input.Config || - (this.Config != null && - this.Config.Equals(input.Config)) - ) && - ( - this.Events == input.Events || - (this.Events != null && - this.Events.Equals(input.Events)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Config != null) - hashCode = hashCode * 59 + this.Config.GetHashCode(); - if (this.Events != null) - hashCode = hashCode * 59 + this.Events.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Model/State.cs b/C#/src/dagshub_api/Model/State.cs deleted file mode 100644 index 5958b32..0000000 --- a/C#/src/dagshub_api/Model/State.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// Defines State - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum State - { - /// - /// Enum Open for value: open - /// - [EnumMember(Value = "open")] - Open = 1, - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2 } -} diff --git a/C#/src/dagshub_api/Model/User.cs b/C#/src/dagshub_api/Model/User.cs index c61ded0..b2a9d8f 100644 --- a/C#/src/dagshub_api/Model/User.cs +++ b/C#/src/dagshub_api/Model/User.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -34,23 +34,31 @@ public partial class User : IEquatable, IValidatableObject /// /// id. /// login. + /// Alias for login (legacy compatibility). /// fullName. /// avatarUrl. - /// username. - public User(int? id = default(int?), string login = default(string), string fullName = default(string), string avatarUrl = default(string), string username = default(string)) + /// publicEmail. + /// website. + /// company. + /// description. + public User(long? id = default(long?), string login = default(string), string username = default(string), string fullName = default(string), string avatarUrl = default(string), string publicEmail = default(string), string website = default(string), string company = default(string), string description = default(string)) { this.Id = id; this.Login = login; + this.Username = username; this.FullName = fullName; this.AvatarUrl = avatarUrl; - this.Username = username; + this.PublicEmail = publicEmail; + this.Website = website; + this.Company = company; + this.Description = description; } /// /// Gets or Sets Id /// [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + public long? Id { get; set; } /// /// Gets or Sets Login @@ -58,6 +66,13 @@ public partial class User : IEquatable, IValidatableObject [DataMember(Name="login", EmitDefaultValue=false)] public string Login { get; set; } + /// + /// Alias for login (legacy compatibility) + /// + /// Alias for login (legacy compatibility) + [DataMember(Name="username", EmitDefaultValue=false)] + public string Username { get; set; } + /// /// Gets or Sets FullName /// @@ -71,10 +86,28 @@ public partial class User : IEquatable, IValidatableObject public string AvatarUrl { get; set; } /// - /// Gets or Sets Username + /// Gets or Sets PublicEmail /// - [DataMember(Name="username", EmitDefaultValue=false)] - public string Username { get; set; } + [DataMember(Name="public_email", EmitDefaultValue=false)] + public string PublicEmail { get; set; } + + /// + /// Gets or Sets Website + /// + [DataMember(Name="website", EmitDefaultValue=false)] + public string Website { get; set; } + + /// + /// Gets or Sets Company + /// + [DataMember(Name="company", EmitDefaultValue=false)] + public string Company { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } /// /// Returns the string presentation of the object @@ -86,9 +119,13 @@ public override string ToString() sb.Append("class User {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Login: ").Append(Login).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); sb.Append(" FullName: ").Append(FullName).Append("\n"); sb.Append(" AvatarUrl: ").Append(AvatarUrl).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" PublicEmail: ").Append(PublicEmail).Append("\n"); + sb.Append(" Website: ").Append(Website).Append("\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -133,6 +170,11 @@ public bool Equals(User input) (this.Login != null && this.Login.Equals(input.Login)) ) && + ( + this.Username == input.Username || + (this.Username != null && + this.Username.Equals(input.Username)) + ) && ( this.FullName == input.FullName || (this.FullName != null && @@ -144,9 +186,24 @@ public bool Equals(User input) this.AvatarUrl.Equals(input.AvatarUrl)) ) && ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) + this.PublicEmail == input.PublicEmail || + (this.PublicEmail != null && + this.PublicEmail.Equals(input.PublicEmail)) + ) && + ( + this.Website == input.Website || + (this.Website != null && + this.Website.Equals(input.Website)) + ) && + ( + this.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) ); } @@ -163,12 +220,20 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Login != null) hashCode = hashCode * 59 + this.Login.GetHashCode(); + if (this.Username != null) + hashCode = hashCode * 59 + this.Username.GetHashCode(); if (this.FullName != null) hashCode = hashCode * 59 + this.FullName.GetHashCode(); if (this.AvatarUrl != null) hashCode = hashCode * 59 + this.AvatarUrl.GetHashCode(); - if (this.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); + if (this.PublicEmail != null) + hashCode = hashCode * 59 + this.PublicEmail.GetHashCode(); + if (this.Website != null) + hashCode = hashCode * 59 + this.Website.GetHashCode(); + if (this.Company != null) + hashCode = hashCode * 59 + this.Company.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); return hashCode; } } diff --git a/C#/src/dagshub_api/Model/WebhookConfig.cs b/C#/src/dagshub_api/Model/WebhookConfig.cs deleted file mode 100644 index 717bd28..0000000 --- a/C#/src/dagshub_api/Model/WebhookConfig.cs +++ /dev/null @@ -1,190 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; - -namespace dagshub_api.Model -{ - /// - /// Key/value pairs to provide settings for this hook - /// - [DataContract] - public partial class WebhookConfig : IEquatable, IValidatableObject - { - /// - /// A string defining the media type used to serialize the payloads. - /// - /// A string defining the media type used to serialize the payloads. - [JsonConverter(typeof(StringEnumConverter))] - public enum ContentTypeEnum - { - /// - /// Enum Json for value: json - /// - [EnumMember(Value = "json")] - Json = 1, - /// - /// Enum Form for value: form - /// - [EnumMember(Value = "form")] - Form = 2 } - /// - /// A string defining the media type used to serialize the payloads. - /// - /// A string defining the media type used to serialize the payloads. - [DataMember(Name="content_type", EmitDefaultValue=false)] - public ContentTypeEnum ContentType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// A string defining the URL to which the payloads will be delivered. (required). - /// A string defining the media type used to serialize the payloads. (required). - /// An optional string that's passed with the HTTP requests body.. - public WebhookConfig(string url = default(string), ContentTypeEnum contentType = default(ContentTypeEnum), string secret = default(string)) - { - // to ensure "url" is required (not null) - if (url == null) - { - throw new InvalidDataException("url is a required property for WebhookConfig and cannot be null"); - } - else - { - this.Url = url; - } - // to ensure "contentType" is required (not null) - if (contentType == null) - { - throw new InvalidDataException("contentType is a required property for WebhookConfig and cannot be null"); - } - else - { - this.ContentType = contentType; - } - this.Secret = secret; - } - - /// - /// A string defining the URL to which the payloads will be delivered. - /// - /// A string defining the URL to which the payloads will be delivered. - [DataMember(Name="url", EmitDefaultValue=false)] - public string Url { get; set; } - - - /// - /// An optional string that's passed with the HTTP requests body. - /// - /// An optional string that's passed with the HTTP requests body. - [DataMember(Name="secret", EmitDefaultValue=false)] - public string Secret { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class WebhookConfig {\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" ContentType: ").Append(ContentType).Append("\n"); - sb.Append(" Secret: ").Append(Secret).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookConfig); - } - - /// - /// Returns true if WebhookConfig instances are equal - /// - /// Instance of WebhookConfig to be compared - /// Boolean - public bool Equals(WebhookConfig input) - { - if (input == null) - return false; - - return - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.ContentType == input.ContentType || - (this.ContentType != null && - this.ContentType.Equals(input.ContentType)) - ) && - ( - this.Secret == input.Secret || - (this.Secret != null && - this.Secret.Equals(input.Secret)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - if (this.ContentType != null) - hashCode = hashCode * 59 + this.ContentType.GetHashCode(); - if (this.Secret != null) - hashCode = hashCode * 59 + this.Secret.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/C#/src/dagshub_api/Properties/AssemblyInfo.cs b/C#/src/dagshub_api/Properties/AssemblyInfo.cs deleted file mode 100644 index 47be498..0000000 --- a/C#/src/dagshub_api/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Swagger Library")] -[assembly: AssemblyDescription("A library generated from a Swagger doc")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Swagger")] -[assembly: AssemblyProduct("SwaggerLibrary")] -[assembly: AssemblyCopyright("No Copyright")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.3")] -[assembly: AssemblyFileVersion("1.0.3")] diff --git a/C#/src/dagshub_api/dagshub_api.csproj b/C#/src/dagshub_api/dagshub_api.csproj deleted file mode 100644 index 12026a3..0000000 --- a/C#/src/dagshub_api/dagshub_api.csproj +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - Debug - AnyCPU - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698} - Library - Properties - dagshub_api - dagshub_api - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - - - - - - - - - - - diff --git a/C#/src/dagshub_api/dagshub_api.nuspec b/C#/src/dagshub_api/dagshub_api.nuspec deleted file mode 100644 index 93f28ce..0000000 --- a/C#/src/dagshub_api/dagshub_api.nuspec +++ /dev/null @@ -1,40 +0,0 @@ - - - - - $id$ - Swagger Library - - - $version$ - - - $author$ - - - $author$ - false - false - - - A library generated from a Swagger doc - - - - - - - - - - - - - - - - - - diff --git a/C#/src/dagshub_api/packages.config b/C#/src/dagshub_api/packages.config deleted file mode 100644 index 3caf34e..0000000 --- a/C#/src/dagshub_api/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Go/.gitignore b/Go/.gitignore deleted file mode 100644 index daf913b..0000000 --- a/Go/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/Go/.swagger-codegen-ignore b/Go/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/Go/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/Go/.swagger-codegen/VERSION b/Go/.swagger-codegen/VERSION deleted file mode 100644 index 053a355..0000000 --- a/Go/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.35 \ No newline at end of file diff --git a/Go/.travis.yml b/Go/.travis.yml deleted file mode 100644 index f5cb2ce..0000000 --- a/Go/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/Go/README.md b/Go/README.md deleted file mode 100644 index 89fa403..0000000 --- a/Go/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# Go API client for dagshub_api - -This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - -## Overview -This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. - -- API version: 1.0.2 -- Package version: 1.0.3 -- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen - -## Installation -Put the package under your project folder and add the following in import: -```golang -import "./dagshub_api" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://dagshub.com/api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*BranchesApi* | [**GetBranch**](docs/BranchesApi.md#getbranch) | **Get** /repos/{owner}/{repo}/branches/{branch} | Get Branch -*BranchesApi* | [**ListBranches**](docs/BranchesApi.md#listbranches) | **Get** /repos/{owner}/{repo}/branches | List Branches -*CollaboratorsApi* | [**AddCollaborator**](docs/CollaboratorsApi.md#addcollaborator) | **Put** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -*CollaboratorsApi* | [**GetCollaborators**](docs/CollaboratorsApi.md#getcollaborators) | **Get** /repos/{owner}/{repo}/collaborators | Get collaborators -*CollaboratorsApi* | [**RemoveCollaborator**](docs/CollaboratorsApi.md#removecollaborator) | **Delete** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator -*CommitsApi* | [**GetCommit**](docs/CommitsApi.md#getcommit) | **Get** /repos/{owner}/{repo}/commits/{sha} | Get a single commit -*ContentApi* | [**GetArchive**](docs/ContentApi.md#getarchive) | **Get** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -*ContentApi* | [**GetContent**](docs/ContentApi.md#getcontent) | **Get** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -*ContentApi* | [**GetRaw**](docs/ContentApi.md#getraw) | **Get** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -*ContentApi* | [**UploadContent**](docs/ContentApi.md#uploadcontent) | **Put** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository -*ExperimentsApi* | [**AddExperimentLabel**](docs/ExperimentsApi.md#addexperimentlabel) | **Post** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -*ExperimentsApi* | [**DeleteExperiment**](docs/ExperimentsApi.md#deleteexperiment) | **Delete** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -*ExperimentsApi* | [**DeleteExperimentLabel**](docs/ExperimentsApi.md#deleteexperimentlabel) | **Delete** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -*ExperimentsApi* | [**EditExperiment**](docs/ExperimentsApi.md#editexperiment) | **Post** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -*ExperimentsApi* | [**GetExperimentMetrics**](docs/ExperimentsApi.md#getexperimentmetrics) | **Post** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -*ExperimentsApi* | [**GetExperiments**](docs/ExperimentsApi.md#getexperiments) | **Get** /repos/{owner}/{repo}/experiments | List Experiments -*IssuesApi* | [**CreateIssue**](docs/IssuesApi.md#createissue) | **Post** /repos/{owner}/{repo}/issues | Create an issue -*IssuesApi* | [**EditIssue**](docs/IssuesApi.md#editissue) | **Patch** /repos/{owner}/{repo}/issues | Edit an issue -*IssuesApi* | [**GetIssue**](docs/IssuesApi.md#getissue) | **Get** /repos/{owner}/{repo}/issues/{index} | Get a single issue -*IssuesApi* | [**ListRepoIssues**](docs/IssuesApi.md#listrepoissues) | **Get** /repos/{owner}/{repo}/issues | List issues for a repository -*ReleasesApi* | [**ListReleases**](docs/ReleasesApi.md#listreleases) | **Get** /repos/{owner}/{repo}/releases | List Releases -*RepositoryApi* | [**CreateOrgRepo**](docs/RepositoryApi.md#createorgrepo) | **Post** /org/{orgname}/repos | Create in organization -*RepositoryApi* | [**CreateRepo**](docs/RepositoryApi.md#createrepo) | **Post** /user/repos | Create -*RepositoryApi* | [**GetRepo**](docs/RepositoryApi.md#getrepo) | **Get** /repos/{owner}/{repo} | Get repository information -*RepositoryApi* | [**ListMyRepos**](docs/RepositoryApi.md#listmyrepos) | **Get** /user/repos | List your repositories -*RepositoryApi* | [**ListOrgRepos**](docs/RepositoryApi.md#listorgrepos) | **Get** /orgs/{orgname}/repos | List organization repositories -*RepositoryApi* | [**ListUserRepos**](docs/RepositoryApi.md#listuserrepos) | **Get** /users/{username}/repos | List user repositories -*RepositoryApi* | [**MigrateRepo**](docs/RepositoryApi.md#migraterepo) | **Post** /repos/migrate | Migrate repository -*RepositoryApi* | [**Search**](docs/RepositoryApi.md#search) | **Get** /repos/search | Search repositories -*StorageIntegrationsApi* | [**GetBucketContent**](docs/StorageIntegrationsApi.md#getbucketcontent) | **Get** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -*StorageIntegrationsApi* | [**GetBucketFile**](docs/StorageIntegrationsApi.md#getbucketfile) | **Get** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -*StorageIntegrationsApi* | [**GetBuckets**](docs/StorageIntegrationsApi.md#getbuckets) | **Get** /repos/{owner}/{repo}/storage | List integrated storages in the repository -*UserApi* | [**GetAuthenticatedUser**](docs/UserApi.md#getauthenticateduser) | **Get** /user | Get authenticated user information -*UserApi* | [**GetUser**](docs/UserApi.md#getuser) | **Get** /users/{username} | Get information about a user -*WebhooksApi* | [**CreateHook**](docs/WebhooksApi.md#createhook) | **Post** /repos/{owner}/{repo}/hooks | Create a hook -*WebhooksApi* | [**DeleteHook**](docs/WebhooksApi.md#deletehook) | **Delete** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -*WebhooksApi* | [**EditHook**](docs/WebhooksApi.md#edithook) | **Patch** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -*WebhooksApi* | [**ListHooks**](docs/WebhooksApi.md#listhooks) | **Get** /repos/{owner}/{repo}/hooks | List hooks - -## Documentation For Models - - - [CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) - - [CreateRepo](docs/CreateRepo.md) - - [EditExperimentPost](docs/EditExperimentPost.md) - - [ExperimentKeys](docs/ExperimentKeys.md) - - [File](docs/File.md) - - [Files1](docs/Files1.md) - - [HooksIdBody](docs/HooksIdBody.md) - - [IntegrationInner](docs/IntegrationInner.md) - - [Issue](docs/Issue.md) - - [IssueAssignee](docs/IssueAssignee.md) - - [IssueLabels](docs/IssueLabels.md) - - [IssueMilestone](docs/IssueMilestone.md) - - [MigrateRepo](docs/MigrateRepo.md) - - [PatchIssue](docs/PatchIssue.md) - - [PostIssue](docs/PostIssue.md) - - [PutFile](docs/PutFile.md) - - [RepoHooksBody](docs/RepoHooksBody.md) - - [State](docs/State.md) - - [User](docs/User.md) - - [WebhookConfig](docs/WebhookConfig.md) - -## Documentation For Authorization - -## basicAuth -- **Type**: HTTP basic authentication - -Example -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` -## tokenAuth -- **Type**: API key - -Example -```golang -auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ - Key: "APIKEY", - Prefix: "Bearer", // Omit if not necessary. -}) -r, err := client.Service.Operation(auth, args) -``` - -## Author - - diff --git a/Go/api/swagger.yaml b/Go/api/swagger.yaml deleted file mode 100644 index 654f63a..0000000 --- a/Go/api/swagger.yaml +++ /dev/null @@ -1,2268 +0,0 @@ -openapi: 3.0.3 -info: - title: DagsHub API - description: | - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. - The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - version: 1.0.2 -servers: -- url: https://dagshub.com/api/v1 -security: -- basicAuth: [] -- tokenAuth: [] -paths: - /repos/{owner}/{repo}/content/{branch}/{path}: - get: - tags: - - Content - summary: List data in a repository folder - description: | - List files, commit sha1, and versioning type for a folder in repository. - - To get sizes add to the query param `include_size=true`. May result in a slower response. - operationId: getContent - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: branch - in: path - description: branch of the repository - required: true - schema: - type: string - - name: path - in: path - description: path of a folder in the repository - required: true - schema: - type: string - default: "." - - name: include_size - in: query - required: false - schema: - type: boolean - default: false - responses: - "200": - description: Successfully retrieved the data - content: - application/json: - schema: - $ref: '#/components/schemas/Files' - example: - - path: images/000.png - type: file - size: 0 - hash: 79fb7f8632d7e15b3b46a7411d08bcdd - versioning: dvc - download_url: https://dagshub.com/api/v1/repos/Simon/baby-yoda-segmentation-dataset/raw/master/images/000.png - content_url: https://dagshub.com/api/v1/repos/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png - - path: images/001.png - type: file - size: 0 - hash: 7dd5befce39375036da253b435e1db98 - versioning: dvc - download_url: https://dagshub.com/api/v1/repos/Simon/baby-yoda-segmentation-dataset/raw/master/images/001.png - content_url: https://dagshub.com/api/v1/repos/Simon/baby-yoda-segmentation-dataset/content/master/images/001.png - - path: images/002.png - type: file - size: 0 - hash: a58f181cd982a1e21c77949588737c8b - versioning: dvc - download_url: https://dagshub.com/api/v1/repos/Simon/baby-yoda-segmentation-dataset/raw/master/images/002.png - content_url: https://dagshub.com/api/v1/repos/Simon/baby-yoda-segmentation-dataset/content/master/images/002.png - "404": - description: Non existing path - put: - tags: - - Content - summary: Upload data to a repository - operationId: uploadContent - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: branch - in: path - description: branch of the repository - required: true - schema: - type: string - - name: path - in: path - description: path of a folder in the repository - required: true - schema: - type: string - default: "." - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/PutFile' - responses: - "200": - description: Successfully uploaded content - /repos/{owner}/{repo}/storage: - get: - tags: - - Storage Integrations - summary: List integrated storages in the repository - operationId: getBuckets - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - responses: - "200": - description: Successfully listed integrated storages - content: - application/json: - schema: - $ref: '#/components/schemas/Integration' - example: - - name: spacenet-dataset - protocol: s3 - list_path: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/content/s3/spacenet-dataset - /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}: - get: - tags: - - Storage Integrations - summary: List contents in the path - operationId: getBucketContent - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: protocol - in: path - description: protocol of the storage integration - required: true - schema: - type: string - enum: - - gs - - s3 - example: s3 - - name: bucket - in: path - description: name and prefix of the bucket integration - required: true - schema: - type: string - example: spacenet-dataset - - name: path - in: path - description: path of a folder in the repository - required: true - schema: - type: string - default: "." - - name: include_size - in: query - required: false - schema: - type: boolean - default: false - - name: limit - in: query - description: Maximum amount of items to return - schema: - type: integer - default: 100 - - name: from_token - in: query - description: "Token, from which to continue iteration" - schema: - type: string - responses: - "200": - description: Successfully listed a directory - content: - application/json: - schema: - $ref: '#/components/schemas/Files_1' - example: - entries: - - path: s3/spacenet-dataset - type: dir - size: 0 - hash: "" - versioning: bucket - download_url: "" - content_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/content/s3/spacenet-dataset - - path: s3/spacenet-dataset/AOIs - type: dir - size: 0 - hash: "" - versioning: bucket - download_url: "" - content_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/content/s3/spacenet-dataset/AOIs - - path: s3/spacenet-dataset/Hosted-Datasets - type: dir - size: 0 - hash: "" - versioning: bucket - download_url: "" - content_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/content/s3/spacenet-dataset/Hosted-Datasets - - path: s3/spacenet-dataset/SpaceNet_Off-Nadir_Dataset - type: dir - size: 0 - hash: "" - versioning: bucket - download_url: "" - content_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/content/s3/spacenet-dataset/SpaceNet_Off-Nadir_Dataset - - path: s3/spacenet-dataset/spacenet-model-weights - type: dir - size: 0 - hash: "" - versioning: bucket - download_url: "" - content_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/content/s3/spacenet-dataset/spacenet-model-weights - - path: s3/spacenet-dataset/spacenet-stac - type: dir - size: 0 - hash: "" - versioning: bucket - download_url: "" - content_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/content/s3/spacenet-dataset/spacenet-stac - - path: s3/spacenet-dataset/spacenet - type: dir - size: 0 - hash: "" - versioning: bucket - download_url: "" - content_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/content/s3/spacenet-dataset/spacenet - - path: s3/spacenet-dataset/LICENSE.md - type: file - size: 299 - hash: "" - versioning: bucket - download_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/raw/s3/spacenet-dataset/LICENSE.md - content_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/content/s3/spacenet-dataset/LICENSE.md - limit: 8 - next_token: "" - "404": - description: Folder or file not found - /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}: - get: - tags: - - Storage Integrations - summary: Get file in the bucket - operationId: getBucketFile - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: protocol - in: path - description: protocol of the storage integration - required: true - schema: - type: string - enum: - - gs - - s3 - example: s3 - - name: bucket - in: path - description: name and prefix of the bucket integration - required: true - schema: - type: string - example: spacenet-dataset - - name: path - in: path - description: The content path - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: File downloaded - "404": - description: File not found - /user: - get: - tags: - - User - summary: Get authenticated user information - operationId: GetAuthenticatedUser - responses: - "200": - description: successfully retrieved user information - content: - application/json: - example: - id: 5 - login: Dean - full_name: Dean Pleban - avatar_url: https://dagshub.com/avatars/5 - username: Dean - /users/{username}: - get: - tags: - - User - summary: Get information about a user - operationId: getUser - parameters: - - name: username - in: path - description: A DagsHub username or organization name - required: true - schema: - type: string - example: Dean - responses: - "200": - description: successfully retrieved user information - content: - application/json: - example: - id: 5 - login: Dean - full_name: Dean Pleban - avatar_url: https://dagshub.com/avatars/5 - username: Dean - /repos/{owner}/{repo}/issues: - get: - tags: - - Issues - summary: List issues for a repository - description: "This endpoint may also return pull requests in the response. If\ - \ an issue is a pull request, the object will include a pull_request key." - operationId: listRepoIssues - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - responses: - "200": - description: Successfully retrived the data - content: - application/json: - schema: - $ref: '#/components/schemas/Issues' - post: - tags: - - Issues - summary: Create an issue - description: Any user with read access to a repository can create an issue. - operationId: createIssue - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PostIssue' - responses: - "201": - description: Successfully created an issue - content: - application/json: - schema: - $ref: '#/components/schemas/Issue' - patch: - tags: - - Issues - summary: Edit an issue - operationId: editIssue - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchIssue' - responses: - "201": - description: Successfully created an issue - content: - application/json: - schema: - $ref: '#/components/schemas/Issue' - /repos/{owner}/{repo}/issues/{index}: - get: - tags: - - Issues - summary: Get a single issue - description: "This endpoint may also return pull requests in the response. If\ - \ an issue is a pull request, the object will include a pull_request key." - operationId: getIssue - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: index - in: path - description: the index of an issue or a pull request - required: true - schema: - type: integer - responses: - "200": - description: Successfully retrived the data - content: - application/json: - schema: - $ref: '#/components/schemas/Issue' - /repos/{owner}/{repo}/experiments: - get: - tags: - - Experiments - summary: List Experiments - description: Get a list of experiments in the given repository - operationId: getExperiments - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - responses: - "200": - description: retrieved experiments successfully - content: - application/json: - example: - experiments: - "2301": - ID: "2301" - RepoID: 74 - CommitID: 6cdbe879ecf2adbfff2631d90b27de6569c0fc2a - TimeUnixMs: 1595149314000 - Tags: - CommitAuthorName: Martin Daniel - CommitAuthorTimestampUnixSec: 1595149314 - CommitCommitterName: Martin Daniel - CommitCommitterTimestampUnixSec: 1595149314 - CommitMessage: | - Change parameters - Name: "" - MetricsByPath: - metrics.csv: - LatestByName: - test__accuracy: - ExperimentID: "2301" - Name: test__accuracy - Value: 0.91712 - Timestamp: 1595149274803 - Step: 1 - ValueStr: "0.91712" - Path: metrics.csv - IsInvalidFloat: false - HyperParamsByPath: - params.yml: - - ExperimentID: 2301 - Name: tfidf__max_df - Value: "1" - Path: params.yml - Labels: [] - Errors: [] - Source: git - Group: "" - /repos/{owner}/{repo}/experiments/metricsForExperiments: - post: - tags: - - Experiments - summary: Get experiment metrics for experiment - operationId: getExperimentMetrics - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ExperimentKeys' - responses: - "200": - description: Retrieved experiments metrics - content: - application/json: - example: - "2306": - metrics.csv: - test__accuracy: - - Value: 0.91712 - Timestamp: 1595149274803 - Step: 1 - ValueStr: "0.91712" - train__roc_auc: - - Value: 0.9997316690244479 - Timestamp: 1595149273838 - Step: 1 - ValueStr: "0.9997316690244479" - /repos/{owner}/{repo}/experiments/experiment/{experimentKey}: - post: - tags: - - Experiments - summary: Edit experiment info - description: "Edit experiment info, currently supports just changing experiment\ - \ name." - operationId: editExperiment - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: experimentKey - in: path - description: a valid experiment key - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EditExperimentPost' - responses: - "200": - description: Edit experiment info successfully - content: - application/json: - example: Awesome New Experiment Name - delete: - tags: - - Experiments - summary: Delete experiment - description: Support both git and MLflow experiments - operationId: deleteExperiment - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: experimentKey - in: path - description: a valid experiment key - required: true - schema: - type: string - responses: - "200": - description: Deleted experiment successfully - "404": - description: Experiment not found - /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}: - post: - tags: - - Experiments - summary: Add label to experiment - operationId: addExperimentLabel - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: experimentKey - in: path - description: a valid experiment key - required: true - schema: - type: string - - name: experimentLabel - in: path - description: "A label for the experiment, max 128 characters." - required: true - schema: - type: string - responses: - "404": - description: Experiment not found - "400": - description: Bad request - "200": - description: Experiment label was added - content: - application/json: - example: Cool New Label - delete: - tags: - - Experiments - summary: Delete experiment label - operationId: deleteExperimentLabel - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: experimentKey - in: path - description: a valid experiment key - required: true - schema: - type: string - - name: experimentLabel - in: path - description: "A label for the experiment, max 128 characters." - required: true - schema: - type: string - responses: - "404": - description: Label/experiment not found - "400": - description: "Bad request: experiment label name can be up to 128 characters\ - \ long." - "200": - description: Experiment label was deleted - content: - application/json: - example: [] - /repos/search: - get: - tags: - - Repository - summary: Search repositories - operationId: search - parameters: - - name: q - in: query - required: true - style: form - explode: true - schema: - type: string - - name: uid - in: query - description: User ID to specify search whose repositories. Default is 0 and - search all repositories - required: false - style: form - explode: true - schema: - type: integer - default: 0 - - name: limit - in: query - description: Maximum number of repositories in search results. - required: false - style: form - explode: true - schema: - type: integer - default: 10 - - name: page - in: query - description: Page number. Default is 1. - required: false - style: form - explode: true - schema: - type: integer - default: 1 - responses: - "200": - description: Success - content: - application/json: - schema: - example: - data: - - id: 1213 - owner: - id: 6 - login: DAGsHub-Official - full_name: DagsHub Official - avatar_url: https://dagshub.com/avatars/6 - username: DAGsHub-Official - name: dagshub-docs - full_name: DAGsHub-Official/dagshub-docs - description: Official repo for DagsHub documentation. - private: false - fork: false - parent: null - empty: false - mirror: false - size: 458313728 - html_url: https://dagshub.com/DAGsHub-Official/dagshub-docs - ssh_url: ssh://git@dagshub.com:2200/DAGsHub-Official/dagshub-docs.git - clone_url: https://dagshub.com/DAGsHub-Official/dagshub-docs.git - website: https://dagshub.com/docs - stars_count: 4 - forks_count: 11 - watchers_count: 1 - open_issues_count: 2 - default_branch: main - created_at: 2021-02-23T11:53:45Z - updated_at: 2022-09-14T09:55:35Z - ok: true - x-content-type: application/json - /repos/{owner}/{repo}: - get: - tags: - - Repository - summary: Get repository information - operationId: getRepo - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - responses: - "200": - description: repository information successfully retrieved - /user/repos: - get: - tags: - - Repository - summary: List your repositories - description: | - List repositories that are accessible to the authenticated user. - - This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - operationId: listMyRepos - responses: - "200": - description: Success - content: - application/json: - schema: - example: - - id: 2942 - owner: - id: 23 - login: DagsHub - full_name: DagsHub - avatar_url: https://dagshub.com/avatars/23 - username: DagsHub - name: audio-datasets - full_name: DagsHub/audio-datasets - description: Open-source audio datasets hosted on DagsHub - private: false - fork: false - parent: null - empty: false - mirror: true - size: 10121216 - html_url: https://dagshub.com/DagsHub/audio-datasets - ssh_url: ssh://git@dagshub.com:2200/DagsHub/audio-datasets.git - clone_url: https://github.com/DAGsHub/audio-datasets.git - website: "" - stars_count: 2 - forks_count: 2 - watchers_count: 7 - open_issues_count: 11 - default_branch: main - created_at: 2021-10-05T16:02:42Z - updated_at: 2022-08-22T09:54:12Z - permissions: - admin: true - push: true - pull: true - x-content-type: application/json - post: - tags: - - Repository - summary: Create - description: Create a new repository for the authenticated user. - operationId: createRepo - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateRepo' - responses: - "201": - description: Created - /users/{username}/repos: - get: - tags: - - Repository - summary: List user repositories - description: List public repositories for the specified user. - operationId: listUserRepos - parameters: - - name: username - in: path - description: A DagsHub username or organization name - required: true - schema: - type: string - example: Dean - responses: - "200": - description: Success - /orgs/{orgname}/repos: - get: - tags: - - Repository - summary: List organization repositories - description: List repositories that are accessible to the authenticated user. - operationId: listOrgRepos - parameters: - - name: orgname - in: path - description: A DagsHub organization name - required: true - schema: - type: string - example: DAGsHub-Official - responses: - "200": - description: Success - /org/{orgname}/repos: - post: - tags: - - Repository - summary: Create in organization - description: Create a new repository in this organization. The authenticated - user must be an **owner** of the specified organization. - operationId: createOrgRepo - parameters: - - name: orgname - in: path - description: A DagsHub organization name - required: true - schema: - type: string - example: DAGsHub-Official - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateRepo' - responses: - "201": - description: Created - /repos/migrate: - post: - tags: - - Repository - summary: Migrate repository - description: | - Migrate a repository from other Git hosting sources for the authenticated user. - - To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - operationId: migrateRepo - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MigrateRepo' - responses: - "201": - description: Created - /repos/{owner}/{repo}/raw/{ref}/{path}: - get: - tags: - - Content - summary: Download raw content - description: This method returns the raw content of a file. - operationId: getRaw - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: ref - in: path - description: The name of the commit/branch/tag - required: true - schema: - type: string - example: main - - name: path - in: path - description: The content path - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - /repos/{owner}/{repo}/archive/{ref}{format}: - get: - tags: - - Content - summary: Download archive - description: This method returns archive by given format. - operationId: getArchive - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: ref - in: path - description: The name of the commit/branch/tag - required: true - schema: - type: string - example: main - - name: format - in: path - description: "The format of archive, either .zip or .tar.gz" - required: true - style: simple - explode: false - schema: - type: string - enum: - - .zip - - .tar.gz - responses: - "200": - description: OK - /repos/{owner}/{repo}/branches: - get: - tags: - - Branches - summary: List Branches - operationId: listBranches - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - responses: - "200": - description: OK - content: - application/json: - example: - - name: master - commit: - id: c1c220c4dd6df895965a02b8be575c5e2f78dfd1 - message: "A commit message. \n" - url: Not implemented - author: - name: Author Name - email: author@email.com - username: "" - - name: second-branch - commit: - id: 0a0fdf63c23af6a2836c426c5284136015ec2996 - message: | - A second commit message. - url: Not implemented - author: - name: Author Name - email: author@email.com - username: "" - /repos/{owner}/{repo}/branches/{branch}: - get: - tags: - - Branches - summary: Get Branch - operationId: getBranch - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: branch - in: path - description: branch of the repository - required: true - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - example: - name: :branchname - commit: - id: 0a0fdf63c23af6a2836c426c5284136015ec2996 - message: | - A second commit message. - url: Not implemented - author: - name: Author Name - email: author@email.com - username: "" - /repos/{owner}/{repo}/collaborators/{collaborator}: - put: - tags: - - Collaborators - summary: Add user as a collaborator - operationId: addCollaborator - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: collaborator - in: path - description: collaborator username - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/collaborators_collaborator_body' - responses: - "200": - description: Success - delete: - tags: - - Collaborators - summary: Delete collaborator - operationId: removeCollaborator - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: collaborator - in: path - description: collaborator username - required: true - schema: - type: string - responses: - "204": - description: "No Content, deleted successfully" - "422": - description: User does not exist - "500": - description: Internal error - /repos/{owner}/{repo}/collaborators: - get: - tags: - - Collaborators - summary: Get collaborators - operationId: getCollaborators - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - responses: - "200": - description: OK - content: - application/json: - example: - - id: 3 - username: user1 - login: user1 - full_name: "" - email: user1@user.com - avatar_url: https://secure.gravatar.com/avatar/0207f4280f6c1bd45e1a2ed7cb1cca3d - permissions: - admin: false - push: true - pull: true - /repos/{owner}/{repo}/commits/{sha}: - get: - tags: - - Commits - summary: Get a single commit - operationId: getCommit - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: sha - in: path - description: a SHA1 of a commit - required: true - schema: - type: string - example: 9227a50146b3fd815fe864af99b984c77d06326a - responses: - "200": - description: OK - content: - application/json: - example: - commit: - id: 106201d5de4b7f0cce296b4578747ba43504d152 - message: |- - Merge pull request #65 from drecali/main - - fix broken Discord invite link and clarify project sharing instructions - url: "" - author: - name: Dean P - email: deanp07@gmail.com - username: "" - committer: - name: GitHub - email: noreply@github.com - username: "" - added: null - removed: null - modified: null - timestamp: 2022-08-22T09:53:53Z - files: - - filename: CONTRIBUTING.md - sha: Not Implemented - blob_url: Not Implemented - additions: 1 - deletions: 1 - changes: 2 - status: changed - stats: - additions: 1 - deletions: 1 - total: 2 - experiment: null - /repos/{owner}/{repo}/releases: - get: - tags: - - Releases - summary: List Releases - operationId: listReleases - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - responses: - "200": - description: OK - content: - application/json: - example: - - id: 1 - tag_name: sometag - target_commitish: master - name: awesome-release - body: Description of the release - draft: false - prerelease: false - author: - id: 1 - username: Author Name - login: "" - full_name: "" - email: author@email.com - avatar_url: "" - created_at: 2020-03-28T13:38:00+03:00 - /repos/{owner}/{repo}/hooks: - get: - tags: - - Webhooks - summary: List hooks - operationId: listHooks - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - responses: - "200": - description: OK - content: - application/json: - example: - - id: 9 - type: dagshub - config: - content_type: json - url: - events: - - create - - delete - - push - - pull_request - - release - active: true - updated_at: 2022-09-14T10:01:11Z - created_at: 2021-03-21T11:39:30Z - - id: 11 - type: discord - config: - content_type: json - url: https://discord.com/api/webhooks/awesome-webhook - events: - - fork - - issues - - pull_request - - issue_comment - active: true - updated_at: 2022-09-14T10:01:12Z - created_at: 2021-03-22T11:28:45Z - post: - tags: - - Webhooks - summary: Create a hook - operationId: createHook - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/repo_hooks_body' - responses: - "201": - description: Created - content: - application/json: - example: - id: 20 - type: discord - config: - content_type: json - url: - events: - - create - - push - active: true - updated_at: 2022-08-29T11:31:22.453572732+08:00 - created_at: 2022-08-29T11:31:22.453569275+08:00 - /repos/{owner}/{repo}/hooks/{id}: - delete: - tags: - - Webhooks - summary: Delete a hook - operationId: deleteHook - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: id - in: path - required: true - style: simple - explode: false - schema: - type: integer - responses: - "204": - description: "No Content, deleted successfully" - patch: - tags: - - Webhooks - summary: Edit a hook - operationId: editHook - parameters: - - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - - name: id - in: path - required: true - style: simple - explode: false - schema: - type: integer - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/hooks_id_body' - responses: - "200": - description: OK - content: - application/json: - example: - id: 20 - type: dagshub - config: - content_type: json - url: - events: - - push - active: true - updated_at: 2022-08-29T11:45:30.577057789+08:00 - created_at: 2022-08-29T11:31:22+08:00 -components: - schemas: - Files: - type: array - items: - $ref: '#/components/schemas/File' - x-schema-name: Files - PutFile: - required: - - commit_choice - - files - type: object - properties: - commit_summary: - type: string - commit_message: - type: string - example: Upload file using API - commit_choice: - type: string - example: direct - enum: - - direct - - commit-to-new-branch - last_commit: - type: string - description: "If omitted, **only new files** will be accepted. \n \nOtherwise,\ - \ the request is accepted only if **the tip of the branch is the same\ - \ as `last_commit`** at the moment of processing the request.\n\nThis\ - \ is done to prevent accidental conflicting changes.\nTo get the latest\ - \ commit you can use the [branches API](#operations-Branches-getBranch)\n" - new_branch_name: - type: string - example: new-branch - versioning: - type: string - default: auto - enum: - - auto - - dvc - - git - - bucket - files: - type: string - description: This property can be sent multiple times to upload multiple - files. - format: binary - Integration: - type: array - items: - $ref: '#/components/schemas/Integration_inner' - x-schema-name: Integration - Files_1: - type: object - properties: - entries: - type: array - items: - $ref: '#/components/schemas/File' - limit: - type: integer - next_token: - type: string - example: - entries: - - path: images/000.png - versioning: dvc - size: 421 - download_url: https://dagshub.com/Simon/baby-yoda-segmentation-dataset/raw/master/images/000.png - content_url: https://dagshub.com/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png - type: "[file]" - hash: 79fb7f8632d7e15b3b46a7411d08bcdd - - path: images/000.png - versioning: dvc - size: 421 - download_url: https://dagshub.com/Simon/baby-yoda-segmentation-dataset/raw/master/images/000.png - content_url: https://dagshub.com/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png - type: "[file]" - hash: 79fb7f8632d7e15b3b46a7411d08bcdd - limit: 0 - next_token: next_token - Issues: - type: array - items: - $ref: '#/components/schemas/Issue' - x-schema-name: Issues - PostIssue: - type: object - properties: - title: - $ref: '#/components/schemas/Title' - body: - $ref: '#/components/schemas/Body' - assignee: - $ref: '#/components/schemas/Assignee' - milestone: - $ref: '#/components/schemas/Milestone' - labels: - $ref: '#/components/schemas/Labels' - closed: - $ref: '#/components/schemas/Closed' - Issue: - required: - - assignee - - body - - closed - - labels - - milestone - - title - type: object - properties: - id: - type: integer - number: - type: integer - user: - $ref: '#/components/schemas/User' - title: - $ref: '#/components/schemas/Title' - body: - $ref: '#/components/schemas/Body' - labels: - type: array - items: - $ref: '#/components/schemas/Issue_labels' - milestone: - $ref: '#/components/schemas/Issue_milestone' - assignee: - $ref: '#/components/schemas/Issue_assignee' - state: - type: string - comments: - type: integer - created_at: - type: string - updated_at: - type: string - pull_request: - type: object - closed: - type: boolean - example: - id: 72 - number: 1 - state: open - title: test issue - body: "" - user: - id: 3 - username: user1 - full_name: "" - email: fake@local - avatar_url: https://secure.gravatar.com/avatar/0207f4280f6c1bd45e1a2ed7cb1cca3d - labels: - - bug - assignee: null - milestone: null - comments: 1 - pull_request: null - created_at: 2016-03-05T13:18:51-05:00 - updated_at: 2016-03-05T13:18:51-05:00 - PatchIssue: - type: object - properties: - title: - $ref: '#/components/schemas/Title' - body: - $ref: '#/components/schemas/Body' - assignee: - $ref: '#/components/schemas/Assignee' - milestone: - $ref: '#/components/schemas/Milestone' - state: - $ref: '#/components/schemas/State' - ExperimentKeys: - required: - - experiment_keys - type: object - properties: - experiment_keys: - type: array - items: - type: string - EditExperimentPost: - required: - - name - type: object - properties: - name: - type: string - example: Awesome Experiment - CreateRepo: - required: - - name - type: object - properties: - name: - type: string - description: name of the repository - example: repo-name - description: - type: string - description: A short description of the repository - private: - type: boolean - description: "Either true to create a private repository, or false to create\ - \ a public one." - default: false - auto_init: - type: boolean - description: "Pass true to create an initial commit with README, .gitignore\ - \ and LICENSE." - default: false - project_template: - type: string - description: | - Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. - For other templates you may specify only the license. - enum: - - cookiecutter-dagshub-dvc - - custom - - none - - notebook-template - gitignores: - type: string - description: Desired language .gitignore templates to apply. Use the name - of the templates. - example: "Go, Sublime Text" - license: - type: string - description: Desired LICENSE template to apply. Use the name of the template. - example: MIT License - enum: - - Apache License 2.0 - - MIT License - - Abstyles License - - Academic Free License v1.1 - - Academic Free License v1.2 - - Academic Free License v2.0 - - Academic Free License v2.1 - - Academic Free License v3.0 - - Affero General Public License v1.0 - - Apache License 1.0 - - Apache License 1.1 - - Artistic License 1.0 - - Artistic License 2.0 - - BSD 2-clause License - - BSD 3-clause License - - BSD 4-clause License - - Creative Commons CC0 1.0 Universal - - Eclipse Public License 1.0 - - Educational Community License v1.0 - - Educational Community License v2.0 - - GNU Affero General Public License v3.0 - - GNU Free Documentation License v1.1 - - GNU Free Documentation License v1.2 - - GNU Free Documentation License v1.3 - - GNU General Public License v1.0 - - GNU General Public License v2.0 - - GNU General Public License v3.0 - - GNU Lesser General Public License v2.1 - - GNU Lesser General Public License v3.0 - - GNU Library General Public License v2.0 - - ISC license - - Mozilla Public License 1.0 - - Mozilla Public License 1.1 - - Mozilla Public License 2.03 - readme: - type: string - description: Desired README template to apply. Use the name of the template. - default: Default - MigrateRepo: - required: - - clone_addr - - user_id - type: object - properties: - clone_addr: - type: string - description: Remote Git address (HTTP/HTTPS URL or local path) - auth_username: - type: string - description: Authorization username - auth_password: - type: string - description: Authorization password - user_id: - type: integer - description: User ID who takes ownership of this repository - repo_name: - type: string - description: Name of the repository - example: repo-name - mirror: - type: boolean - description: Repository will be a mirror (connected repository). - default: false - visibility: - type: string - description: Repository will be private or public. - default: "false" - enum: - - private - - public - description: - type: string - description: Description of the repository - example: This is a repository - WebhookConfig: - required: - - content_type - - url - type: object - properties: - url: - type: string - description: A string defining the URL to which the payloads will be delivered. - example: http://yourwebsite.io - content_type: - type: string - description: A string defining the media type used to serialize the payloads. - example: json - enum: - - json - - form - secret: - type: string - description: An optional string that's passed with the HTTP requests body. - example: supersecretkey - description: Key/value pairs to provide settings for this hook - WebhookEvents: - type: array - description: Determines what events the hook is triggered format. - example: - - create - - delete - - fork - - push - - issues - - issue_comment - - pull_request - - release - items: - type: string - default: - - push - x-schema-name: WebhookEvents - File: - type: object - properties: - path: - type: string - example: images/000.png - type: - type: string - example: "[file]" - enum: - - file - - dir - size: - type: integer - format: int64 - example: 421 - hash: - type: string - example: 79fb7f8632d7e15b3b46a7411d08bcdd - versioning: - type: string - example: dvc - enum: - - git - - dvc - - bucket - download_url: - type: string - example: https://dagshub.com/Simon/baby-yoda-segmentation-dataset/raw/master/images/000.png - content_url: - type: string - example: https://dagshub.com/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png - example: - path: images/000.png - versioning: dvc - size: 421 - download_url: https://dagshub.com/Simon/baby-yoda-segmentation-dataset/raw/master/images/000.png - content_url: https://dagshub.com/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png - type: "[file]" - hash: 79fb7f8632d7e15b3b46a7411d08bcdd - Title: - type: string - description: The title of the issue - example: Test Issue from API documentation - Body: - type: string - description: The contents of the issue. - example: "This issue was made from the API using [DagsHub docs](https://dagshub.com/docs/api)" - Assignee: - type: string - description: "Username for the user that this issue should be assigned to. \n\ - \n**Note:** Only users with write access can set the assignee for new issues.\ - \ \nThe assignee is silently dropped otherwise." - Milestone: - type: integer - description: "The **ID** of the milestone to associate this issue with. \n\n\ - **Note:** Only users with write access can set the milestone for new issues.\ - \ \nThe milestone is silently dropped otherwise." - Labels: - type: array - description: "Labels **ID** to associate with this issue. \n\n**Note:** Only\ - \ users with write access can set labels for new issues. \nLabels are silently\ - \ dropped otherwise." - items: - type: integer - x-schema-name: Labels - Closed: - type: boolean - description: Indicate initial issue state as closed (**true**) or open (**false**). - example: true - default: false - User: - type: object - properties: - id: - type: integer - login: - type: string - full_name: - type: string - avatar_url: - type: string - username: - type: string - additionalProperties: false - State: - type: string - enum: - - open - - closed - collaborators_collaborator_body: - type: object - properties: - permission: - type: string - description: "The permission to grant the collaborator. Can be one of **read**,\ - \ **write** and **admin**." - default: write - repo_hooks_body: - required: - - config - - type - type: object - properties: - type: - type: string - description: The type of webhook - example: discord - enum: - - dagshub - - slack - - discord - - dingtalk - config: - $ref: '#/components/schemas/WebhookConfig' - events: - $ref: '#/components/schemas/WebhookEvents' - hooks_id_body: - type: object - properties: - config: - $ref: '#/components/schemas/WebhookConfig' - events: - $ref: '#/components/schemas/WebhookEvents' - active: - type: boolean - description: Weather the hook is actually triggered on pushes or not. Ignore - this field to leave it unchanged. - Integration_inner: - type: object - properties: - name: - type: string - description: Name/path of the bucket - protocol: - type: string - description: Protocol used by the integration - enum: - - s3 - - gs - list_path: - type: string - description: URL to list the root of this bucket - example: - protocol: s3 - name: name - list_path: list_path - Issue_labels: - type: object - properties: - id: - type: integer - name: - type: string - color: - type: string - url: - type: string - Issue_milestone: - type: object - properties: - id: - type: integer - title: - type: string - description: - type: string - state: - type: string - open_issues: - type: integer - closed_issues: - type: integer - closed_at: - type: string - due_on: - type: string - additionalProperties: false - Issue_assignee: - type: object - properties: - id: - type: integer - login: - type: string - full_name: - type: string - avatar_url: - type: string - username: - type: string - additionalProperties: false - parameters: - Owner: - name: owner - in: path - description: owner of the repository - required: true - schema: - type: string - example: OperationSavta - Repository: - name: repo - in: path - description: name of the repository - required: true - schema: - type: string - example: SavtaDepth - Branch: - name: branch - in: path - description: branch of the repository - required: true - schema: - type: string - Path: - name: path - in: path - description: path of a folder in the repository - required: true - schema: - type: string - default: "." - IncludeSize: - name: include_size - in: query - required: false - schema: - type: boolean - default: false - Protocol: - name: protocol - in: path - description: protocol of the storage integration - required: true - schema: - type: string - enum: - - gs - - s3 - example: s3 - Bucket: - name: bucket - in: path - description: name and prefix of the bucket integration - required: true - schema: - type: string - example: spacenet-dataset - Limit: - name: limit - in: query - description: Maximum amount of items to return - schema: - type: integer - default: 100 - FromToken: - name: from_token - in: query - description: "Token, from which to continue iteration" - schema: - type: string - Username: - name: username - in: path - description: A DagsHub username or organization name - required: true - schema: - type: string - example: Dean - Index: - name: index - in: path - description: the index of an issue or a pull request - required: true - schema: - type: integer - ExperimentKey: - name: experimentKey - in: path - description: a valid experiment key - required: true - schema: - type: string - ExperimentLabel: - name: experimentLabel - in: path - description: "A label for the experiment, max 128 characters." - required: true - schema: - type: string - Orgname: - name: orgname - in: path - description: A DagsHub organization name - required: true - schema: - type: string - example: DAGsHub-Official - Ref: - name: ref - in: path - description: The name of the commit/branch/tag - required: true - schema: - type: string - example: main - Collaborator: - name: collaborator - in: path - description: collaborator username - required: true - schema: - type: string - Sha: - name: sha - in: path - description: a SHA1 of a commit - required: true - schema: - type: string - example: 9227a50146b3fd815fe864af99b984c77d06326a - securitySchemes: - basicAuth: - type: http - description: | - Use your DagsHub username and password/access token. - scheme: basic - tokenAuth: - type: apiKey - description: | - You can generate a token [here](http://dagshub.com/user/settings/tokens) - name: token - in: query diff --git a/Go/api_branches.go b/Go/api_branches.go deleted file mode 100644 index c5db693..0000000 --- a/Go/api_branches.go +++ /dev/null @@ -1,192 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" -) - -// Linger please -var ( - _ context.Context -) - -type BranchesApiService service -/* -BranchesApiService Get Branch - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - -*/ -func (a *BranchesApiService) GetBranch(ctx context.Context, owner string, repo string, branch string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/branches/{branch}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"branch"+"}", fmt.Sprintf("%v", branch), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -BranchesApiService List Branches - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - -*/ -func (a *BranchesApiService) ListBranches(ctx context.Context, owner string, repo string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/branches" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} diff --git a/Go/api_collaborators.go b/Go/api_collaborators.go deleted file mode 100644 index 471cc20..0000000 --- a/Go/api_collaborators.go +++ /dev/null @@ -1,290 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" - "github.com/antihax/optional" -) - -// Linger please -var ( - _ context.Context -) - -type CollaboratorsApiService service -/* -CollaboratorsApiService Add user as a collaborator - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param collaborator collaborator username - * @param optional nil or *CollaboratorsApiAddCollaboratorOpts - Optional Parameters: - * @param "Body" (optional.Interface of CollaboratorsCollaboratorBody) - - -*/ - -type CollaboratorsApiAddCollaboratorOpts struct { - Body optional.Interface -} - -func (a *CollaboratorsApiService) AddCollaborator(ctx context.Context, owner string, repo string, collaborator string, localVarOptionals *CollaboratorsApiAddCollaboratorOpts) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/collaborators/{collaborator}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"collaborator"+"}", fmt.Sprintf("%v", collaborator), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -CollaboratorsApiService Get collaborators - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - -*/ -func (a *CollaboratorsApiService) GetCollaborators(ctx context.Context, owner string, repo string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/collaborators" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -CollaboratorsApiService Delete collaborator - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param collaborator collaborator username - -*/ -func (a *CollaboratorsApiService) RemoveCollaborator(ctx context.Context, owner string, repo string, collaborator string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Delete") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/collaborators/{collaborator}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"collaborator"+"}", fmt.Sprintf("%v", collaborator), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} diff --git a/Go/api_commits.go b/Go/api_commits.go deleted file mode 100644 index 2b12740..0000000 --- a/Go/api_commits.go +++ /dev/null @@ -1,110 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" -) - -// Linger please -var ( - _ context.Context -) - -type CommitsApiService service -/* -CommitsApiService Get a single commit - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param sha a SHA1 of a commit - -*/ -func (a *CommitsApiService) GetCommit(ctx context.Context, owner string, repo string, sha string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/commits/{sha}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"sha"+"}", fmt.Sprintf("%v", sha), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} diff --git a/Go/api_content.go b/Go/api_content.go deleted file mode 100644 index 54f76c1..0000000 --- a/Go/api_content.go +++ /dev/null @@ -1,441 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" - "github.com/antihax/optional" -) - -// Linger please -var ( - _ context.Context -) - -type ContentApiService service -/* -ContentApiService Download archive -This method returns archive by given format. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param ref The name of the commit/branch/tag - * @param format The format of archive, either .zip or .tar.gz - -*/ -func (a *ContentApiService) GetArchive(ctx context.Context, owner string, repo string, ref string, format string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/archive/{ref}{format}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"ref"+"}", fmt.Sprintf("%v", ref), -1) - localVarPath = strings.Replace(localVarPath, "{"+"format"+"}", fmt.Sprintf("%v", format), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -ContentApiService List data in a repository folder -List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @param path path of a folder in the repository - * @param optional nil or *ContentApiGetContentOpts - Optional Parameters: - * @param "IncludeSize" (optional.Bool) - -@return []*os.File -*/ - -type ContentApiGetContentOpts struct { - IncludeSize optional.Bool -} - -func (a *ContentApiService) GetContent(ctx context.Context, owner string, repo string, branch string, path string, localVarOptionals *ContentApiGetContentOpts) ([]*os.File, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []*os.File - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/content/{branch}/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"branch"+"}", fmt.Sprintf("%v", branch), -1) - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", fmt.Sprintf("%v", path), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && localVarOptionals.IncludeSize.IsSet() { - localVarQueryParams.Add("include_size", parameterToString(localVarOptionals.IncludeSize.Value(), "")) - } - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v []*os.File - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} -/* -ContentApiService Download raw content -This method returns the raw content of a file. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param ref The name of the commit/branch/tag - * @param path The content path - -*/ -func (a *ContentApiService) GetRaw(ctx context.Context, owner string, repo string, ref string, path string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/raw/{ref}/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"ref"+"}", fmt.Sprintf("%v", ref), -1) - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", fmt.Sprintf("%v", path), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -ContentApiService Upload data to a repository - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @param path path of a folder in the repository - * @param optional nil or *ContentApiUploadContentOpts - Optional Parameters: - * @param "CommitSummary" (optional.String) - - * @param "CommitMessage" (optional.String) - - * @param "CommitChoice" (optional.String) - - * @param "LastCommit" (optional.String) - - * @param "NewBranchName" (optional.String) - - * @param "Versioning" (optional.String) - - * @param "Files" (optional.String) - - -*/ - -type ContentApiUploadContentOpts struct { - CommitSummary optional.String - CommitMessage optional.String - CommitChoice optional.String - LastCommit optional.String - NewBranchName optional.String - Versioning optional.String - Files optional.String -} - -func (a *ContentApiService) UploadContent(ctx context.Context, owner string, repo string, branch string, path string, localVarOptionals *ContentApiUploadContentOpts) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/content/{branch}/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"branch"+"}", fmt.Sprintf("%v", branch), -1) - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", fmt.Sprintf("%v", path), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"multipart/form-data"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if localVarOptionals != nil && localVarOptionals.CommitSummary.IsSet() { - localVarFormParams.Add("commit_summary", parameterToString(localVarOptionals.CommitSummary.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.CommitMessage.IsSet() { - localVarFormParams.Add("commit_message", parameterToString(localVarOptionals.CommitMessage.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.CommitChoice.IsSet() { - localVarFormParams.Add("commit_choice", parameterToString(localVarOptionals.CommitChoice.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.LastCommit.IsSet() { - localVarFormParams.Add("last_commit", parameterToString(localVarOptionals.LastCommit.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.NewBranchName.IsSet() { - localVarFormParams.Add("new_branch_name", parameterToString(localVarOptionals.NewBranchName.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Versioning.IsSet() { - localVarFormParams.Add("versioning", parameterToString(localVarOptionals.Versioning.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Files.IsSet() { - localVarFormParams.Add("files", parameterToString(localVarOptionals.Files.Value(), "")) - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} diff --git a/Go/api_experiments.go b/Go/api_experiments.go deleted file mode 100644 index c49caf3..0000000 --- a/Go/api_experiments.go +++ /dev/null @@ -1,560 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" - "github.com/antihax/optional" -) - -// Linger please -var ( - _ context.Context -) - -type ExperimentsApiService service -/* -ExperimentsApiService Add label to experiment - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param experimentLabel A label for the experiment, max 128 characters. - -*/ -func (a *ExperimentsApiService) AddExperimentLabel(ctx context.Context, owner string, repo string, experimentKey string, experimentLabel string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"experimentKey"+"}", fmt.Sprintf("%v", experimentKey), -1) - localVarPath = strings.Replace(localVarPath, "{"+"experimentLabel"+"}", fmt.Sprintf("%v", experimentLabel), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -ExperimentsApiService Delete experiment -Support both git and MLflow experiments - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - -*/ -func (a *ExperimentsApiService) DeleteExperiment(ctx context.Context, owner string, repo string, experimentKey string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Delete") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"experimentKey"+"}", fmt.Sprintf("%v", experimentKey), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -ExperimentsApiService Delete experiment label - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param experimentLabel A label for the experiment, max 128 characters. - -*/ -func (a *ExperimentsApiService) DeleteExperimentLabel(ctx context.Context, owner string, repo string, experimentKey string, experimentLabel string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Delete") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"experimentKey"+"}", fmt.Sprintf("%v", experimentKey), -1) - localVarPath = strings.Replace(localVarPath, "{"+"experimentLabel"+"}", fmt.Sprintf("%v", experimentLabel), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -ExperimentsApiService Edit experiment info -Edit experiment info, currently supports just changing experiment name. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param optional nil or *ExperimentsApiEditExperimentOpts - Optional Parameters: - * @param "Body" (optional.Interface of EditExperimentPost) - - -*/ - -type ExperimentsApiEditExperimentOpts struct { - Body optional.Interface -} - -func (a *ExperimentsApiService) EditExperiment(ctx context.Context, owner string, repo string, experimentKey string, localVarOptionals *ExperimentsApiEditExperimentOpts) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"experimentKey"+"}", fmt.Sprintf("%v", experimentKey), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -ExperimentsApiService Get experiment metrics for experiment - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param optional nil or *ExperimentsApiGetExperimentMetricsOpts - Optional Parameters: - * @param "Body" (optional.Interface of ExperimentKeys) - - -*/ - -type ExperimentsApiGetExperimentMetricsOpts struct { - Body optional.Interface -} - -func (a *ExperimentsApiService) GetExperimentMetrics(ctx context.Context, owner string, repo string, localVarOptionals *ExperimentsApiGetExperimentMetricsOpts) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/experiments/metricsForExperiments" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -ExperimentsApiService List Experiments -Get a list of experiments in the given repository - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - -*/ -func (a *ExperimentsApiService) GetExperiments(ctx context.Context, owner string, repo string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/experiments" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} diff --git a/Go/api_issues.go b/Go/api_issues.go deleted file mode 100644 index a33bb9c..0000000 --- a/Go/api_issues.go +++ /dev/null @@ -1,454 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" - "github.com/antihax/optional" -) - -// Linger please -var ( - _ context.Context -) - -type IssuesApiService service -/* -IssuesApiService Create an issue -Any user with read access to a repository can create an issue. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param optional nil or *IssuesApiCreateIssueOpts - Optional Parameters: - * @param "Body" (optional.Interface of PostIssue) - -@return Issue -*/ - -type IssuesApiCreateIssueOpts struct { - Body optional.Interface -} - -func (a *IssuesApiService) CreateIssue(ctx context.Context, owner string, repo string, localVarOptionals *IssuesApiCreateIssueOpts) (Issue, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Issue - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/issues" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 201 { - var v Issue - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} -/* -IssuesApiService Edit an issue - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param optional nil or *IssuesApiEditIssueOpts - Optional Parameters: - * @param "Body" (optional.Interface of PatchIssue) - -@return Issue -*/ - -type IssuesApiEditIssueOpts struct { - Body optional.Interface -} - -func (a *IssuesApiService) EditIssue(ctx context.Context, owner string, repo string, localVarOptionals *IssuesApiEditIssueOpts) (Issue, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Patch") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Issue - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/issues" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 201 { - var v Issue - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} -/* -IssuesApiService Get a single issue -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param index the index of an issue or a pull request -@return Issue -*/ -func (a *IssuesApiService) GetIssue(ctx context.Context, owner string, repo string, index int32) (Issue, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Issue - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/issues/{index}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"index"+"}", fmt.Sprintf("%v", index), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v Issue - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} -/* -IssuesApiService List issues for a repository -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository -@return []Issue -*/ -func (a *IssuesApiService) ListRepoIssues(ctx context.Context, owner string, repo string) ([]Issue, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []Issue - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/issues" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v []Issue - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} diff --git a/Go/api_releases.go b/Go/api_releases.go deleted file mode 100644 index f0c97da..0000000 --- a/Go/api_releases.go +++ /dev/null @@ -1,108 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" -) - -// Linger please -var ( - _ context.Context -) - -type ReleasesApiService service -/* -ReleasesApiService List Releases - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - -*/ -func (a *ReleasesApiService) ListReleases(ctx context.Context, owner string, repo string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/releases" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} diff --git a/Go/api_repository.go b/Go/api_repository.go deleted file mode 100644 index 6eaf5c5..0000000 --- a/Go/api_repository.go +++ /dev/null @@ -1,762 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" - "github.com/antihax/optional" -) - -// Linger please -var ( - _ context.Context -) - -type RepositoryApiService service -/* -RepositoryApiService Create in organization -Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orgname A DagsHub organization name - * @param optional nil or *RepositoryApiCreateOrgRepoOpts - Optional Parameters: - * @param "Body" (optional.Interface of CreateRepo) - - -*/ - -type RepositoryApiCreateOrgRepoOpts struct { - Body optional.Interface -} - -func (a *RepositoryApiService) CreateOrgRepo(ctx context.Context, orgname string, localVarOptionals *RepositoryApiCreateOrgRepoOpts) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/org/{orgname}/repos" - localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", fmt.Sprintf("%v", orgname), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -RepositoryApiService Create -Create a new repository for the authenticated user. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *RepositoryApiCreateRepoOpts - Optional Parameters: - * @param "Body" (optional.Interface of CreateRepo) - - -*/ - -type RepositoryApiCreateRepoOpts struct { - Body optional.Interface -} - -func (a *RepositoryApiService) CreateRepo(ctx context.Context, localVarOptionals *RepositoryApiCreateRepoOpts) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/user/repos" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -RepositoryApiService Get repository information - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - -*/ -func (a *RepositoryApiService) GetRepo(ctx context.Context, owner string, repo string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -RepositoryApiService List your repositories -List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return Object -*/ -func (a *RepositoryApiService) ListMyRepos(ctx context.Context) (Object, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Object - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/user/repos" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v Object - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} -/* -RepositoryApiService List organization repositories -List repositories that are accessible to the authenticated user. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param orgname A DagsHub organization name - -*/ -func (a *RepositoryApiService) ListOrgRepos(ctx context.Context, orgname string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/orgs/{orgname}/repos" - localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", fmt.Sprintf("%v", orgname), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -RepositoryApiService List user repositories -List public repositories for the specified user. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param username A DagsHub username or organization name - -*/ -func (a *RepositoryApiService) ListUserRepos(ctx context.Context, username string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/users/{username}/repos" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", fmt.Sprintf("%v", username), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -RepositoryApiService Migrate repository -Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *RepositoryApiMigrateRepoOpts - Optional Parameters: - * @param "Body" (optional.Interface of MigrateRepo) - - -*/ - -type RepositoryApiMigrateRepoOpts struct { - Body optional.Interface -} - -func (a *RepositoryApiService) MigrateRepo(ctx context.Context, localVarOptionals *RepositoryApiMigrateRepoOpts) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/migrate" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -RepositoryApiService Search repositories - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param q - * @param optional nil or *RepositoryApiSearchOpts - Optional Parameters: - * @param "Uid" (optional.Int32) - User ID to specify search whose repositories. Default is 0 and search all repositories - * @param "Limit" (optional.Int32) - Maximum number of repositories in search results. - * @param "Page" (optional.Int32) - Page number. Default is 1. -@return Object -*/ - -type RepositoryApiSearchOpts struct { - Uid optional.Int32 - Limit optional.Int32 - Page optional.Int32 -} - -func (a *RepositoryApiService) Search(ctx context.Context, q string, localVarOptionals *RepositoryApiSearchOpts) (Object, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Object - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/search" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - localVarQueryParams.Add("q", parameterToString(q, "")) - if localVarOptionals != nil && localVarOptionals.Uid.IsSet() { - localVarQueryParams.Add("uid", parameterToString(localVarOptionals.Uid.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Page.IsSet() { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) - } - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v Object - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} diff --git a/Go/api_storage_integrations.go b/Go/api_storage_integrations.go deleted file mode 100644 index ce252c0..0000000 --- a/Go/api_storage_integrations.go +++ /dev/null @@ -1,339 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" - "github.com/antihax/optional" -) - -// Linger please -var ( - _ context.Context -) - -type StorageIntegrationsApiService service -/* -StorageIntegrationsApiService List contents in the path - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param protocol protocol of the storage integration - * @param bucket name and prefix of the bucket integration - * @param path path of a folder in the repository - * @param optional nil or *StorageIntegrationsApiGetBucketContentOpts - Optional Parameters: - * @param "IncludeSize" (optional.Bool) - - * @param "Limit" (optional.Int32) - Maximum amount of items to return - * @param "FromToken" (optional.String) - Token, from which to continue iteration -@return Files1 -*/ - -type StorageIntegrationsApiGetBucketContentOpts struct { - IncludeSize optional.Bool - Limit optional.Int32 - FromToken optional.String -} - -func (a *StorageIntegrationsApiService) GetBucketContent(ctx context.Context, owner string, repo string, protocol string, bucket string, path string, localVarOptionals *StorageIntegrationsApiGetBucketContentOpts) (Files1, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue Files1 - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"protocol"+"}", fmt.Sprintf("%v", protocol), -1) - localVarPath = strings.Replace(localVarPath, "{"+"bucket"+"}", fmt.Sprintf("%v", bucket), -1) - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", fmt.Sprintf("%v", path), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && localVarOptionals.IncludeSize.IsSet() { - localVarQueryParams.Add("include_size", parameterToString(localVarOptionals.IncludeSize.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) - } - if localVarOptionals != nil && localVarOptionals.FromToken.IsSet() { - localVarQueryParams.Add("from_token", parameterToString(localVarOptionals.FromToken.Value(), "")) - } - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v Files1 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} -/* -StorageIntegrationsApiService Get file in the bucket - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param protocol protocol of the storage integration - * @param bucket name and prefix of the bucket integration - * @param path The content path - -*/ -func (a *StorageIntegrationsApiService) GetBucketFile(ctx context.Context, owner string, repo string, protocol string, bucket string, path string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"protocol"+"}", fmt.Sprintf("%v", protocol), -1) - localVarPath = strings.Replace(localVarPath, "{"+"bucket"+"}", fmt.Sprintf("%v", bucket), -1) - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", fmt.Sprintf("%v", path), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -StorageIntegrationsApiService List integrated storages in the repository - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository -@return []IntegrationInner -*/ -func (a *StorageIntegrationsApiService) GetBuckets(ctx context.Context, owner string, repo string) ([]IntegrationInner, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []IntegrationInner - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/storage" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v []IntegrationInner - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} diff --git a/Go/api_user.go b/Go/api_user.go deleted file mode 100644 index d1e6409..0000000 --- a/Go/api_user.go +++ /dev/null @@ -1,184 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" -) - -// Linger please -var ( - _ context.Context -) - -type UserApiService service -/* -UserApiService Get authenticated user information - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - -*/ -func (a *UserApiService) GetAuthenticatedUser(ctx context.Context) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/user" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -UserApiService Get information about a user - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param username A DagsHub username or organization name - -*/ -func (a *UserApiService) GetUser(ctx context.Context, username string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/users/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", fmt.Sprintf("%v", username), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} diff --git a/Go/api_webhooks.go b/Go/api_webhooks.go deleted file mode 100644 index d23994b..0000000 --- a/Go/api_webhooks.go +++ /dev/null @@ -1,385 +0,0 @@ - -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "fmt" - "github.com/antihax/optional" -) - -// Linger please -var ( - _ context.Context -) - -type WebhooksApiService service -/* -WebhooksApiService Create a hook - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param optional nil or *WebhooksApiCreateHookOpts - Optional Parameters: - * @param "Body" (optional.Interface of RepoHooksBody) - - -*/ - -type WebhooksApiCreateHookOpts struct { - Body optional.Interface -} - -func (a *WebhooksApiService) CreateHook(ctx context.Context, owner string, repo string, localVarOptionals *WebhooksApiCreateHookOpts) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/hooks" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -WebhooksApiService Delete a hook - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param id - -*/ -func (a *WebhooksApiService) DeleteHook(ctx context.Context, owner string, repo string, id int32) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Delete") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/hooks/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -WebhooksApiService Edit a hook - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - * @param id - * @param optional nil or *WebhooksApiEditHookOpts - Optional Parameters: - * @param "Body" (optional.Interface of HooksIdBody) - - -*/ - -type WebhooksApiEditHookOpts struct { - Body optional.Interface -} - -func (a *WebhooksApiService) EditHook(ctx context.Context, owner string, repo string, id int32, localVarOptionals *WebhooksApiEditHookOpts) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Patch") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/hooks/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} -/* -WebhooksApiService List hooks - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param owner owner of the repository - * @param repo name of the repository - -*/ -func (a *WebhooksApiService) ListHooks(ctx context.Context, owner string, repo string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/hooks" - localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) - localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - - localVarQueryParams.Add("token", key) - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} diff --git a/Go/client.go b/Go/client.go deleted file mode 100644 index 1201885..0000000 --- a/Go/client.go +++ /dev/null @@ -1,503 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "mime/multipart" - "net/http" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - "golang.org/x/oauth2" -) - -var ( - jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") - xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") -) - -// APIClient manages communication with the DagsHub API API v1.0.2 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - BranchesApi *BranchesApiService - - CollaboratorsApi *CollaboratorsApiService - - CommitsApi *CommitsApiService - - ContentApi *ContentApiService - - ExperimentsApi *ExperimentsApiService - - IssuesApi *IssuesApiService - - ReleasesApi *ReleasesApiService - - RepositoryApi *RepositoryApiService - - StorageIntegrationsApi *StorageIntegrationsApiService - - UserApi *UserApiService - - WebhooksApi *WebhooksApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.BranchesApi = (*BranchesApiService)(&c.common) - c.CollaboratorsApi = (*CollaboratorsApiService)(&c.common) - c.CommitsApi = (*CommitsApiService)(&c.common) - c.ContentApi = (*ContentApiService)(&c.common) - c.ExperimentsApi = (*ExperimentsApiService)(&c.common) - c.IssuesApi = (*IssuesApiService)(&c.common) - c.ReleasesApi = (*ReleasesApiService)(&c.common) - c.RepositoryApi = (*RepositoryApiService)(&c.common) - c.StorageIntegrationsApi = (*StorageIntegrationsApiService)(&c.common) - c.UserApi = (*UserApiService)(&c.common) - c.WebhooksApi = (*WebhooksApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insenstive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.ToLower(a) == strings.ToLower(needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. -func parameterToString(obj interface{}, collectionFormat string) string { - var delimiter string - - switch collectionFormat { - case "pipes": - delimiter = "|" - case "ssv": - delimiter = " " - case "tsv": - delimiter = "\t" - case "csv": - delimiter = "," - } - - if reflect.TypeOf(obj).Kind() == reflect.Slice { - return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") - } - - return fmt.Sprintf("%v", obj) -} - -// callAPI do the request. -func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - return c.cfg.HTTPClient.Do(request) -} - -// Change base path to allow switching to mocks -func (c *APIClient) ChangeBasePath(path string) { - c.cfg.BasePath = path -} - -// prepareRequest build the request -func (c *APIClient) prepareRequest( - ctx context.Context, - path string, method string, - postBody interface{}, - headerParams map[string]string, - queryParams url.Values, - formParams url.Values, - fileName string, - fileBytes []byte) (localVarRequest *http.Request, err error) { - - var body *bytes.Buffer - - // Detect postBody type and post. - if postBody != nil { - contentType := headerParams["Content-Type"] - if contentType == "" { - contentType = detectContentType(postBody) - headerParams["Content-Type"] = contentType - } - - body, err = setBody(postBody, contentType) - if err != nil { - return nil, err - } - } - - // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - if len(fileBytes) > 0 && fileName != "" { - w.Boundary() - //_, fileNm := filepath.Split(fileName) - part, err := w.CreateFormFile("file", filepath.Base(fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(fileBytes) - if err != nil { - return nil, err - } - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - } - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = query.Encode() - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers.Set(h, v) - } - localVarRequest.Header = headers - } - - // Override request host, if applicable - if c.cfg.Host != "" { - localVarRequest.Host = c.cfg.Host - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - // OAuth2 authentication - if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { - // We were able to grab an oauth2 token from the context - var latestToken *oauth2.Token - if latestToken, err = tok.Token(); err != nil { - return nil, err - } - - latestToken.SetAuthHeader(localVarRequest) - } - - // Basic HTTP Authentication - if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { - localVarRequest.SetBasicAuth(auth.UserName, auth.Password) - } - - // AccessToken Authentication - if auth, ok := ctx.Value(ContextAccessToken).(string); ok { - localVarRequest.Header.Add("Authorization", "Bearer "+auth) - } - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if strings.Contains(contentType, "application/xml") { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } else if strings.Contains(contentType, "application/json") { - if err = json.Unmarshal(b, v); err != nil { - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(path) - if err != nil { - return err - } - defer file.Close() - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("Invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } - expires = now.Add(lifetime) - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericSwaggerError Provides access to the body, error and model on returned errors. -type GenericSwaggerError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericSwaggerError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericSwaggerError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericSwaggerError) Model() interface{} { - return e.model -} diff --git a/Go/configuration.go b/Go/configuration.go deleted file mode 100644 index 948108f..0000000 --- a/Go/configuration.go +++ /dev/null @@ -1,71 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "net/http" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. - ContextOAuth2 = contextKey("token") - - // ContextBasicAuth takes BasicAuth as authentication for the request. - ContextBasicAuth = contextKey("basic") - - // ContextAccessToken takes a string oauth2 access token as authentication for the request. - ContextAccessToken = contextKey("accesstoken") - - // ContextAPIKey takes an APIKey as authentication for the request - ContextAPIKey = contextKey("apikey") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -type Configuration struct { - BasePath string `json:"basePath,omitempty"` - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - HTTPClient *http.Client -} - -func NewConfiguration() *Configuration { - cfg := &Configuration{ - BasePath: "https://dagshub.com/api/v1", - DefaultHeader: make(map[string]string), - UserAgent: "Swagger-Codegen/1.0.3/go", - } - return cfg -} - -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} diff --git a/Go/docs/BranchesApi.md b/Go/docs/BranchesApi.md deleted file mode 100644 index 5b22f1f..0000000 --- a/Go/docs/BranchesApi.md +++ /dev/null @@ -1,64 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetBranch**](BranchesApi.md#GetBranch) | **Get** /repos/{owner}/{repo}/branches/{branch} | Get Branch -[**ListBranches**](BranchesApi.md#ListBranches) | **Get** /repos/{owner}/{repo}/branches | List Branches - -# **GetBranch** -> GetBranch(ctx, owner, repo, branch) -Get Branch - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **branch** | **string**| branch of the repository | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListBranches** -> ListBranches(ctx, owner, repo) -List Branches - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/docs/CollaboratorsApi.md b/Go/docs/CollaboratorsApi.md deleted file mode 100644 index 1828f38..0000000 --- a/Go/docs/CollaboratorsApi.md +++ /dev/null @@ -1,103 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddCollaborator**](CollaboratorsApi.md#AddCollaborator) | **Put** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -[**GetCollaborators**](CollaboratorsApi.md#GetCollaborators) | **Get** /repos/{owner}/{repo}/collaborators | Get collaborators -[**RemoveCollaborator**](CollaboratorsApi.md#RemoveCollaborator) | **Delete** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator - -# **AddCollaborator** -> AddCollaborator(ctx, owner, repo, collaborator, optional) -Add user as a collaborator - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **collaborator** | **string**| collaborator username | - **optional** | ***CollaboratorsApiAddCollaboratorOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a CollaboratorsApiAddCollaboratorOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **body** | [**optional.Interface of CollaboratorsCollaboratorBody**](CollaboratorsCollaboratorBody.md)| | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetCollaborators** -> GetCollaborators(ctx, owner, repo) -Get collaborators - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **RemoveCollaborator** -> RemoveCollaborator(ctx, owner, repo, collaborator) -Delete collaborator - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **collaborator** | **string**| collaborator username | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/docs/CollaboratorsCollaboratorBody.md b/Go/docs/CollaboratorsCollaboratorBody.md deleted file mode 100644 index 46fd775..0000000 --- a/Go/docs/CollaboratorsCollaboratorBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# CollaboratorsCollaboratorBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Permission** | **string** | The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. | [optional] [default to write] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/CommitsApi.md b/Go/docs/CommitsApi.md deleted file mode 100644 index 16b3eed..0000000 --- a/Go/docs/CommitsApi.md +++ /dev/null @@ -1,36 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetCommit**](CommitsApi.md#GetCommit) | **Get** /repos/{owner}/{repo}/commits/{sha} | Get a single commit - -# **GetCommit** -> GetCommit(ctx, owner, repo, sha) -Get a single commit - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **sha** | **string**| a SHA1 of a commit | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/docs/ContentApi.md b/Go/docs/ContentApi.md deleted file mode 100644 index 5962522..0000000 --- a/Go/docs/ContentApi.md +++ /dev/null @@ -1,161 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetArchive**](ContentApi.md#GetArchive) | **Get** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -[**GetContent**](ContentApi.md#GetContent) | **Get** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -[**GetRaw**](ContentApi.md#GetRaw) | **Get** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -[**UploadContent**](ContentApi.md#UploadContent) | **Put** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository - -# **GetArchive** -> GetArchive(ctx, owner, repo, ref, format) -Download archive - -This method returns archive by given format. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **ref** | **string**| The name of the commit/branch/tag | - **format** | **string**| The format of archive, either .zip or .tar.gz | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetContent** -> []*os.File GetContent(ctx, owner, repo, branch, path, optional) -List data in a repository folder - -List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **branch** | **string**| branch of the repository | - **path** | **string**| path of a folder in the repository | - **optional** | ***ContentApiGetContentOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a ContentApiGetContentOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - - **includeSize** | **optional.Bool**| | [default to false] - -### Return type - -[**[]*os.File**](array.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetRaw** -> GetRaw(ctx, owner, repo, ref, path) -Download raw content - -This method returns the raw content of a file. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **ref** | **string**| The name of the commit/branch/tag | - **path** | **string**| The content path | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UploadContent** -> UploadContent(ctx, owner, repo, branch, path, optional) -Upload data to a repository - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **branch** | **string**| branch of the repository | - **path** | **string**| path of a folder in the repository | - **optional** | ***ContentApiUploadContentOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a ContentApiUploadContentOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - - **commitSummary** | **optional.**| | - **commitMessage** | **optional.**| | - **commitChoice** | **optional.**| | - **lastCommit** | **optional.**| | - **newBranchName** | **optional.**| | - **versioning** | **optional.**| | - **files** | **optional.**| | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/docs/CreateRepo.md b/Go/docs/CreateRepo.md deleted file mode 100644 index 62124ef..0000000 --- a/Go/docs/CreateRepo.md +++ /dev/null @@ -1,16 +0,0 @@ -# CreateRepo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | name of the repository | [default to null] -**Description** | **string** | A short description of the repository | [optional] [default to null] -**Private** | **bool** | Either true to create a private repository, or false to create a public one. | [optional] [default to false] -**AutoInit** | **bool** | Pass true to create an initial commit with README, .gitignore and LICENSE. | [optional] [default to false] -**ProjectTemplate** | **string** | Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. | [optional] [default to null] -**Gitignores** | **string** | Desired language .gitignore templates to apply. Use the name of the templates. | [optional] [default to null] -**License** | **string** | Desired LICENSE template to apply. Use the name of the template. | [optional] [default to null] -**Readme** | **string** | Desired README template to apply. Use the name of the template. | [optional] [default to Default] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/EditExperimentPost.md b/Go/docs/EditExperimentPost.md deleted file mode 100644 index 7a06089..0000000 --- a/Go/docs/EditExperimentPost.md +++ /dev/null @@ -1,9 +0,0 @@ -# EditExperimentPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/ExperimentsApi.md b/Go/docs/ExperimentsApi.md deleted file mode 100644 index f5915f9..0000000 --- a/Go/docs/ExperimentsApi.md +++ /dev/null @@ -1,206 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddExperimentLabel**](ExperimentsApi.md#AddExperimentLabel) | **Post** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -[**DeleteExperiment**](ExperimentsApi.md#DeleteExperiment) | **Delete** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -[**DeleteExperimentLabel**](ExperimentsApi.md#DeleteExperimentLabel) | **Delete** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -[**EditExperiment**](ExperimentsApi.md#EditExperiment) | **Post** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -[**GetExperimentMetrics**](ExperimentsApi.md#GetExperimentMetrics) | **Post** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -[**GetExperiments**](ExperimentsApi.md#GetExperiments) | **Get** /repos/{owner}/{repo}/experiments | List Experiments - -# **AddExperimentLabel** -> AddExperimentLabel(ctx, owner, repo, experimentKey, experimentLabel) -Add label to experiment - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **experimentKey** | **string**| a valid experiment key | - **experimentLabel** | **string**| A label for the experiment, max 128 characters. | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **DeleteExperiment** -> DeleteExperiment(ctx, owner, repo, experimentKey) -Delete experiment - -Support both git and MLflow experiments - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **experimentKey** | **string**| a valid experiment key | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **DeleteExperimentLabel** -> DeleteExperimentLabel(ctx, owner, repo, experimentKey, experimentLabel) -Delete experiment label - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **experimentKey** | **string**| a valid experiment key | - **experimentLabel** | **string**| A label for the experiment, max 128 characters. | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **EditExperiment** -> EditExperiment(ctx, owner, repo, experimentKey, optional) -Edit experiment info - -Edit experiment info, currently supports just changing experiment name. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **experimentKey** | **string**| a valid experiment key | - **optional** | ***ExperimentsApiEditExperimentOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a ExperimentsApiEditExperimentOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **body** | [**optional.Interface of EditExperimentPost**](EditExperimentPost.md)| | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetExperimentMetrics** -> GetExperimentMetrics(ctx, owner, repo, optional) -Get experiment metrics for experiment - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **optional** | ***ExperimentsApiGetExperimentMetricsOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a ExperimentsApiGetExperimentMetricsOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **body** | [**optional.Interface of ExperimentKeys**](ExperimentKeys.md)| | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetExperiments** -> GetExperiments(ctx, owner, repo) -List Experiments - -Get a list of experiments in the given repository - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/docs/ExperimentsResponse.md b/Go/docs/ExperimentsResponse.md new file mode 100644 index 0000000..498b59e --- /dev/null +++ b/Go/docs/ExperimentsResponse.md @@ -0,0 +1,11 @@ +# ExperimentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Experiments** | [**map[string]ComponentsschemasExperimentYaml**](./components/schemas/Experiment.yaml.md) | Map of experiment ID to experiment details | [optional] [default to null] +**IsEditor** | **bool** | Whether the authenticated user can edit experiments in this repo | [optional] [default to null] +**NextPageToken** | **string** | Pagination token for the next page of results (empty string when no more pages) | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/Go/docs/File.md b/Go/docs/File.md deleted file mode 100644 index 91a967d..0000000 --- a/Go/docs/File.md +++ /dev/null @@ -1,15 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | | [optional] [default to null] -**Type_** | **string** | | [optional] [default to null] -**Size** | **int64** | | [optional] [default to null] -**Hash** | **string** | | [optional] [default to null] -**Versioning** | **string** | | [optional] [default to null] -**DownloadUrl** | **string** | | [optional] [default to null] -**ContentUrl** | **string** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/Files1.md b/Go/docs/Files1.md index c590dba..ae6032c 100644 --- a/Go/docs/Files1.md +++ b/Go/docs/Files1.md @@ -3,9 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Entries** | [**[]*os.File**](*os.File.md) | | [optional] [default to null] -**Limit** | **int32** | | [optional] [default to null] -**NextToken** | **string** | | [optional] [default to null] +**Entries** | [**[]ComponentsschemasFileYaml**](./components/schemas/File.yaml.md) | | [optional] [default to null] +**NextToken** | **string** | Next token to continue pagination from | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Go/docs/HooksIdBody.md b/Go/docs/HooksIdBody.md deleted file mode 100644 index 438726c..0000000 --- a/Go/docs/HooksIdBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# HooksIdBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***WebhookConfig**](WebhookConfig.md) | | [optional] [default to null] -**Events** | [***[]string**](array.md) | | [optional] [default to null] -**Active** | **bool** | Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/IntegrationInner.md b/Go/docs/IntegrationInner.md deleted file mode 100644 index 6f10637..0000000 --- a/Go/docs/IntegrationInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# IntegrationInner - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name/path of the bucket | [optional] [default to null] -**Protocol** | **string** | Protocol used by the integration | [optional] [default to null] -**ListPath** | **string** | URL to list the root of this bucket | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/Issue.md b/Go/docs/Issue.md index 35ad7ac..a6d2664 100644 --- a/Go/docs/Issue.md +++ b/Go/docs/Issue.md @@ -3,20 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int32** | | [optional] [default to null] -**Number** | **int32** | | [optional] [default to null] -**User** | [***User**](User.md) | | [optional] [default to null] -**Title** | **string** | | [default to null] -**Body** | **string** | | [default to null] -**Labels** | [**[]IssueLabels**](Issue_labels.md) | | [default to null] -**Milestone** | [***IssueMilestone**](Issue_milestone.md) | | [default to null] -**Assignee** | [***IssueAssignee**](Issue_assignee.md) | | [default to null] +**Id** | **int64** | | [optional] [default to null] +**Number** | **int64** | Issue index within the repository | [optional] [default to null] +**User** | [***ComponentsschemasUserYaml**](./components/schemas/User.yaml.md) | | [optional] [default to null] +**Title** | **string** | | [optional] [default to null] +**Body** | **string** | | [optional] [default to null] +**Labels** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**Milestone** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Assignee** | [***ComponentsschemasUserYaml**](./components/schemas/User.yaml.md) | | [optional] [default to null] **State** | **string** | | [optional] [default to null] **Comments** | **int32** | | [optional] [default to null] -**CreatedAt** | **string** | | [optional] [default to null] -**UpdatedAt** | **string** | | [optional] [default to null] -**PullRequest** | [***interface{}**](interface{}.md) | | [optional] [default to null] -**Closed** | **bool** | | [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**PullRequest** | [***interface{}**](interface{}.md) | Present when the issue is associated with a pull request | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Go/docs/IssueAssignee.md b/Go/docs/IssueAssignee.md deleted file mode 100644 index 48641a1..0000000 --- a/Go/docs/IssueAssignee.md +++ /dev/null @@ -1,13 +0,0 @@ -# IssueAssignee - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | | [optional] [default to null] -**Login** | **string** | | [optional] [default to null] -**FullName** | **string** | | [optional] [default to null] -**AvatarUrl** | **string** | | [optional] [default to null] -**Username** | **string** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/IssueLabels.md b/Go/docs/IssueLabels.md deleted file mode 100644 index 1b82bdc..0000000 --- a/Go/docs/IssueLabels.md +++ /dev/null @@ -1,12 +0,0 @@ -# IssueLabels - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | | [optional] [default to null] -**Name** | **string** | | [optional] [default to null] -**Color** | **string** | | [optional] [default to null] -**Url** | **string** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/IssueMilestone.md b/Go/docs/IssueMilestone.md deleted file mode 100644 index f76ef30..0000000 --- a/Go/docs/IssueMilestone.md +++ /dev/null @@ -1,16 +0,0 @@ -# IssueMilestone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | | [optional] [default to null] -**Title** | **string** | | [optional] [default to null] -**Description** | **string** | | [optional] [default to null] -**State** | **string** | | [optional] [default to null] -**OpenIssues** | **int32** | | [optional] [default to null] -**ClosedIssues** | **int32** | | [optional] [default to null] -**ClosedAt** | **string** | | [optional] [default to null] -**DueOn** | **string** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/IssuesApi.md b/Go/docs/IssuesApi.md deleted file mode 100644 index da5c94b..0000000 --- a/Go/docs/IssuesApi.md +++ /dev/null @@ -1,144 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateIssue**](IssuesApi.md#CreateIssue) | **Post** /repos/{owner}/{repo}/issues | Create an issue -[**EditIssue**](IssuesApi.md#EditIssue) | **Patch** /repos/{owner}/{repo}/issues | Edit an issue -[**GetIssue**](IssuesApi.md#GetIssue) | **Get** /repos/{owner}/{repo}/issues/{index} | Get a single issue -[**ListRepoIssues**](IssuesApi.md#ListRepoIssues) | **Get** /repos/{owner}/{repo}/issues | List issues for a repository - -# **CreateIssue** -> Issue CreateIssue(ctx, owner, repo, optional) -Create an issue - -Any user with read access to a repository can create an issue. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **optional** | ***IssuesApiCreateIssueOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a IssuesApiCreateIssueOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **body** | [**optional.Interface of PostIssue**](PostIssue.md)| | - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **EditIssue** -> Issue EditIssue(ctx, owner, repo, optional) -Edit an issue - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **optional** | ***IssuesApiEditIssueOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a IssuesApiEditIssueOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **body** | [**optional.Interface of PatchIssue**](PatchIssue.md)| | - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetIssue** -> Issue GetIssue(ctx, owner, repo, index) -Get a single issue - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **index** | **int32**| the index of an issue or a pull request | - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListRepoIssues** -> []Issue ListRepoIssues(ctx, owner, repo) -List issues for a repository - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - -[**[]Issue**](array.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/docs/MigrateRepo.md b/Go/docs/MigrateRepo.md deleted file mode 100644 index c3ed49a..0000000 --- a/Go/docs/MigrateRepo.md +++ /dev/null @@ -1,16 +0,0 @@ -# MigrateRepo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CloneAddr** | **string** | Remote Git address (HTTP/HTTPS URL or local path) | [default to null] -**AuthUsername** | **string** | Authorization username | [optional] [default to null] -**AuthPassword** | **string** | Authorization password | [optional] [default to null] -**UserId** | **int32** | User ID who takes ownership of this repository | [default to null] -**RepoName** | **string** | Name of the repository | [optional] [default to null] -**Mirror** | **bool** | Repository will be a mirror (connected repository). | [optional] [default to false] -**Visibility** | **string** | Repository will be private or public. | [optional] [default to false] -**Description** | **string** | Description of the repository | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/PatchIssue.md b/Go/docs/PatchIssue.md index bbc39a1..12ddbc1 100644 --- a/Go/docs/PatchIssue.md +++ b/Go/docs/PatchIssue.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Title** | **string** | | [optional] [default to null] -**Body** | **string** | | [optional] [default to null] -**Assignee** | **string** | | [optional] [default to null] -**Milestone** | **int32** | | [optional] [default to null] -**State** | [***State**](State.md) | | [optional] [default to null] +**Title** | [***ComponentsschemasTitleYaml**](./components/schemas/Title.yaml.md) | | [optional] [default to null] +**Body** | [***ComponentsschemasBodyYaml**](./components/schemas/Body.yaml.md) | | [optional] [default to null] +**Assignee** | [***ComponentsschemasAssigneeYaml**](./components/schemas/Assignee.yaml.md) | | [optional] [default to null] +**Milestone** | [***ComponentsschemasMilestoneYaml**](./components/schemas/Milestone.yaml.md) | | [optional] [default to null] +**State** | [***ComponentsschemasStateYaml**](./components/schemas/State.yaml.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Go/docs/PostIssue.md b/Go/docs/PostIssue.md index 84308bf..01ece92 100644 --- a/Go/docs/PostIssue.md +++ b/Go/docs/PostIssue.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Title** | **string** | | [optional] [default to null] -**Body** | **string** | | [optional] [default to null] -**Assignee** | **string** | | [optional] [default to null] -**Milestone** | **int32** | | [optional] [default to null] -**Labels** | [***[]int32**](array.md) | | [optional] [default to null] -**Closed** | **bool** | | [optional] [default to null] +**Title** | [***ComponentsschemasTitleYaml**](./components/schemas/Title.yaml.md) | | [optional] [default to null] +**Body** | [***ComponentsschemasBodyYaml**](./components/schemas/Body.yaml.md) | | [optional] [default to null] +**Assignee** | [***ComponentsschemasAssigneeYaml**](./components/schemas/Assignee.yaml.md) | | [optional] [default to null] +**Milestone** | [***ComponentsschemasMilestoneYaml**](./components/schemas/Milestone.yaml.md) | | [optional] [default to null] +**Labels** | [***ComponentsschemasLabelsYaml**](./components/schemas/Labels.yaml.md) | | [optional] [default to null] +**Closed** | [***ComponentsschemasClosedYaml**](./components/schemas/Closed.yaml.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Go/docs/ReleasesApi.md b/Go/docs/ReleasesApi.md deleted file mode 100644 index fcf0471..0000000 --- a/Go/docs/ReleasesApi.md +++ /dev/null @@ -1,35 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListReleases**](ReleasesApi.md#ListReleases) | **Get** /repos/{owner}/{repo}/releases | List Releases - -# **ListReleases** -> ListReleases(ctx, owner, repo) -List Releases - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/docs/RepoHooksBody.md b/Go/docs/RepoHooksBody.md deleted file mode 100644 index 73327d8..0000000 --- a/Go/docs/RepoHooksBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# RepoHooksBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type_** | **string** | The type of webhook | [default to null] -**Config** | [***WebhookConfig**](WebhookConfig.md) | | [default to null] -**Events** | [***[]string**](array.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/RepositoryApi.md b/Go/docs/RepositoryApi.md deleted file mode 100644 index 7065f98..0000000 --- a/Go/docs/RepositoryApi.md +++ /dev/null @@ -1,262 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateOrgRepo**](RepositoryApi.md#CreateOrgRepo) | **Post** /org/{orgname}/repos | Create in organization -[**CreateRepo**](RepositoryApi.md#CreateRepo) | **Post** /user/repos | Create -[**GetRepo**](RepositoryApi.md#GetRepo) | **Get** /repos/{owner}/{repo} | Get repository information -[**ListMyRepos**](RepositoryApi.md#ListMyRepos) | **Get** /user/repos | List your repositories -[**ListOrgRepos**](RepositoryApi.md#ListOrgRepos) | **Get** /orgs/{orgname}/repos | List organization repositories -[**ListUserRepos**](RepositoryApi.md#ListUserRepos) | **Get** /users/{username}/repos | List user repositories -[**MigrateRepo**](RepositoryApi.md#MigrateRepo) | **Post** /repos/migrate | Migrate repository -[**Search**](RepositoryApi.md#Search) | **Get** /repos/search | Search repositories - -# **CreateOrgRepo** -> CreateOrgRepo(ctx, orgname, optional) -Create in organization - -Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **orgname** | **string**| A DagsHub organization name | - **optional** | ***RepositoryApiCreateOrgRepoOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a RepositoryApiCreateOrgRepoOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **body** | [**optional.Interface of CreateRepo**](CreateRepo.md)| | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **CreateRepo** -> CreateRepo(ctx, optional) -Create - -Create a new repository for the authenticated user. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***RepositoryApiCreateRepoOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a RepositoryApiCreateRepoOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of CreateRepo**](CreateRepo.md)| | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetRepo** -> GetRepo(ctx, owner, repo) -Get repository information - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListMyRepos** -> Object ListMyRepos(ctx, ) -List your repositories - -List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - -### Required Parameters -This endpoint does not need any parameter. - -### Return type - -**Object** - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListOrgRepos** -> ListOrgRepos(ctx, orgname) -List organization repositories - -List repositories that are accessible to the authenticated user. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **orgname** | **string**| A DagsHub organization name | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListUserRepos** -> ListUserRepos(ctx, username) -List user repositories - -List public repositories for the specified user. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **username** | **string**| A DagsHub username or organization name | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **MigrateRepo** -> MigrateRepo(ctx, optional) -Migrate repository - -Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***RepositoryApiMigrateRepoOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a RepositoryApiMigrateRepoOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of MigrateRepo**](MigrateRepo.md)| | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **Search** -> Object Search(ctx, q, optional) -Search repositories - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **q** | **string**| | - **optional** | ***RepositoryApiSearchOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a RepositoryApiSearchOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **uid** | **optional.Int32**| User ID to specify search whose repositories. Default is 0 and search all repositories | [default to 0] - **limit** | **optional.Int32**| Maximum number of repositories in search results. | [default to 10] - **page** | **optional.Int32**| Page number. Default is 1. | [default to 1] - -### Return type - -**Object** - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/docs/StorageIntegrationsApi.md b/Go/docs/StorageIntegrationsApi.md deleted file mode 100644 index 370d5a7..0000000 --- a/Go/docs/StorageIntegrationsApi.md +++ /dev/null @@ -1,111 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetBucketContent**](StorageIntegrationsApi.md#GetBucketContent) | **Get** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -[**GetBucketFile**](StorageIntegrationsApi.md#GetBucketFile) | **Get** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -[**GetBuckets**](StorageIntegrationsApi.md#GetBuckets) | **Get** /repos/{owner}/{repo}/storage | List integrated storages in the repository - -# **GetBucketContent** -> Files1 GetBucketContent(ctx, owner, repo, protocol, bucket, path, optional) -List contents in the path - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **protocol** | **string**| protocol of the storage integration | - **bucket** | **string**| name and prefix of the bucket integration | - **path** | **string**| path of a folder in the repository | - **optional** | ***StorageIntegrationsApiGetBucketContentOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a StorageIntegrationsApiGetBucketContentOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - - - **includeSize** | **optional.Bool**| | [default to false] - **limit** | **optional.Int32**| Maximum amount of items to return | [default to 100] - **fromToken** | **optional.String**| Token, from which to continue iteration | - -### Return type - -[**Files1**](Files_1.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetBucketFile** -> GetBucketFile(ctx, owner, repo, protocol, bucket, path) -Get file in the bucket - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **protocol** | **string**| protocol of the storage integration | - **bucket** | **string**| name and prefix of the bucket integration | - **path** | **string**| The content path | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetBuckets** -> []IntegrationInner GetBuckets(ctx, owner, repo) -List integrated storages in the repository - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - -[**[]IntegrationInner**](array.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/docs/User.md b/Go/docs/User.md index bdf5858..79f534f 100644 --- a/Go/docs/User.md +++ b/Go/docs/User.md @@ -3,11 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int32** | | [optional] [default to null] +**Id** | **int64** | | [optional] [default to null] **Login** | **string** | | [optional] [default to null] +**Username** | **string** | Alias for login (legacy compatibility) | [optional] [default to null] **FullName** | **string** | | [optional] [default to null] **AvatarUrl** | **string** | | [optional] [default to null] -**Username** | **string** | | [optional] [default to null] +**PublicEmail** | **string** | | [optional] [default to null] +**Website** | **string** | | [optional] [default to null] +**Company** | **string** | | [optional] [default to null] +**Description** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Go/docs/UserApi.md b/Go/docs/UserApi.md deleted file mode 100644 index 3defb1c..0000000 --- a/Go/docs/UserApi.md +++ /dev/null @@ -1,57 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAuthenticatedUser**](UserApi.md#GetAuthenticatedUser) | **Get** /user | Get authenticated user information -[**GetUser**](UserApi.md#GetUser) | **Get** /users/{username} | Get information about a user - -# **GetAuthenticatedUser** -> GetAuthenticatedUser(ctx, ) -Get authenticated user information - -### Required Parameters -This endpoint does not need any parameter. - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetUser** -> GetUser(ctx, username) -Get information about a user - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **username** | **string**| A DagsHub username or organization name | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/docs/WebhookConfig.md b/Go/docs/WebhookConfig.md deleted file mode 100644 index ad23a09..0000000 --- a/Go/docs/WebhookConfig.md +++ /dev/null @@ -1,11 +0,0 @@ -# WebhookConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Url** | **string** | A string defining the URL to which the payloads will be delivered. | [default to null] -**ContentType** | **string** | A string defining the media type used to serialize the payloads. | [default to null] -**Secret** | **string** | An optional string that's passed with the HTTP requests body. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Go/docs/WebhooksApi.md b/Go/docs/WebhooksApi.md deleted file mode 100644 index 2fc2191..0000000 --- a/Go/docs/WebhooksApi.md +++ /dev/null @@ -1,140 +0,0 @@ -# {{classname}} - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateHook**](WebhooksApi.md#CreateHook) | **Post** /repos/{owner}/{repo}/hooks | Create a hook -[**DeleteHook**](WebhooksApi.md#DeleteHook) | **Delete** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -[**EditHook**](WebhooksApi.md#EditHook) | **Patch** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -[**ListHooks**](WebhooksApi.md#ListHooks) | **Get** /repos/{owner}/{repo}/hooks | List hooks - -# **CreateHook** -> CreateHook(ctx, owner, repo, optional) -Create a hook - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **optional** | ***WebhooksApiCreateHookOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a WebhooksApiCreateHookOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **body** | [**optional.Interface of RepoHooksBody**](RepoHooksBody.md)| | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **DeleteHook** -> DeleteHook(ctx, owner, repo, id) -Delete a hook - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **id** | **int32**| | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **EditHook** -> EditHook(ctx, owner, repo, id, optional) -Edit a hook - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - **id** | **int32**| | - **optional** | ***WebhooksApiEditHookOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a WebhooksApiEditHookOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **body** | [**optional.Interface of HooksIdBody**](HooksIdBody.md)| | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ListHooks** -> ListHooks(ctx, owner, repo) -List hooks - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **owner** | **string**| owner of the repository | - **repo** | **string**| name of the repository | - -### Return type - - (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Go/git_push.sh b/Go/git_push.sh deleted file mode 100644 index 715c961..0000000 --- a/Go/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="DagsHub" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="api-clients" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/Go/model_collaborators_collaborator_body.go b/Go/model_collaborators_collaborator_body.go deleted file mode 100644 index 1844314..0000000 --- a/Go/model_collaborators_collaborator_body.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type CollaboratorsCollaboratorBody struct { - // The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. - Permission string `json:"permission,omitempty"` -} diff --git a/Go/model_create_repo.go b/Go/model_create_repo.go deleted file mode 100644 index a877c07..0000000 --- a/Go/model_create_repo.go +++ /dev/null @@ -1,28 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type CreateRepo struct { - // name of the repository - Name string `json:"name"` - // A short description of the repository - Description string `json:"description,omitempty"` - // Either true to create a private repository, or false to create a public one. - Private bool `json:"private,omitempty"` - // Pass true to create an initial commit with README, .gitignore and LICENSE. - AutoInit bool `json:"auto_init,omitempty"` - // Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - ProjectTemplate string `json:"project_template,omitempty"` - // Desired language .gitignore templates to apply. Use the name of the templates. - Gitignores string `json:"gitignores,omitempty"` - // Desired LICENSE template to apply. Use the name of the template. - License string `json:"license,omitempty"` - // Desired README template to apply. Use the name of the template. - Readme string `json:"readme,omitempty"` -} diff --git a/Go/model_edit_experiment_post.go b/Go/model_edit_experiment_post.go deleted file mode 100644 index 3ec7a86..0000000 --- a/Go/model_edit_experiment_post.go +++ /dev/null @@ -1,13 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type EditExperimentPost struct { - Name string `json:"name"` -} diff --git a/Go/model_experiment_keys.go b/Go/model_experiment_keys.go index d7c92ff..ebb71d2 100644 --- a/Go/model_experiment_keys.go +++ b/Go/model_experiment_keys.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_experiments_response.go b/Go/model_experiments_response.go new file mode 100644 index 0000000..7f4549f --- /dev/null +++ b/Go/model_experiments_response.go @@ -0,0 +1,18 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * API version: 1.0.3 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package dagshub_api + +type ExperimentsResponse struct { + // Map of experiment ID to experiment details + Experiments map[string]ComponentsschemasExperimentYaml `json:"experiments,omitempty"` + // Whether the authenticated user can edit experiments in this repo + IsEditor bool `json:"isEditor,omitempty"` + // Pagination token for the next page of results (empty string when no more pages) + NextPageToken string `json:"nextPageToken,omitempty"` +} diff --git a/Go/model_file.go b/Go/model_file.go deleted file mode 100644 index f6e83bf..0000000 --- a/Go/model_file.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type File struct { - Path string `json:"path,omitempty"` - Type_ string `json:"type,omitempty"` - Size int64 `json:"size,omitempty"` - Hash string `json:"hash,omitempty"` - Versioning string `json:"versioning,omitempty"` - DownloadUrl string `json:"download_url,omitempty"` - ContentUrl string `json:"content_url,omitempty"` -} diff --git a/Go/model_files_1.go b/Go/model_files_1.go index 598508e..5a82afc 100644 --- a/Go/model_files_1.go +++ b/Go/model_files_1.go @@ -3,13 +3,13 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api type Files1 struct { - Entries []*os.File `json:"entries,omitempty"` - Limit int32 `json:"limit,omitempty"` + Entries []ComponentsschemasFileYaml `json:"entries,omitempty"` + // Next token to continue pagination from NextToken string `json:"next_token,omitempty"` } diff --git a/Go/model_hooks_id_body.go b/Go/model_hooks_id_body.go deleted file mode 100644 index 1c04ff9..0000000 --- a/Go/model_hooks_id_body.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type HooksIdBody struct { - Config *WebhookConfig `json:"config,omitempty"` - Events *[]string `json:"events,omitempty"` - // Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. - Active bool `json:"active,omitempty"` -} diff --git a/Go/model_integration_inner.go b/Go/model_integration_inner.go deleted file mode 100644 index 83d2699..0000000 --- a/Go/model_integration_inner.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type IntegrationInner struct { - // Name/path of the bucket - Name string `json:"name,omitempty"` - // Protocol used by the integration - Protocol string `json:"protocol,omitempty"` - // URL to list the root of this bucket - ListPath string `json:"list_path,omitempty"` -} diff --git a/Go/model_issue.go b/Go/model_issue.go index 4384eda..6441aad 100644 --- a/Go/model_issue.go +++ b/Go/model_issue.go @@ -3,24 +3,28 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api +import ( + "time" +) type Issue struct { - Id int32 `json:"id,omitempty"` - Number int32 `json:"number,omitempty"` - User *User `json:"user,omitempty"` - Title string `json:"title"` - Body string `json:"body"` - Labels []IssueLabels `json:"labels"` - Milestone *IssueMilestone `json:"milestone"` - Assignee *IssueAssignee `json:"assignee"` + Id int64 `json:"id,omitempty"` + // Issue index within the repository + Number int64 `json:"number,omitempty"` + User *ComponentsschemasUserYaml `json:"user,omitempty"` + Title string `json:"title,omitempty"` + Body string `json:"body,omitempty"` + Labels []interface{} `json:"labels,omitempty"` + Milestone *interface{} `json:"milestone,omitempty"` + Assignee *ComponentsschemasUserYaml `json:"assignee,omitempty"` State string `json:"state,omitempty"` Comments int32 `json:"comments,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - UpdatedAt string `json:"updated_at,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` + UpdatedAt time.Time `json:"updated_at,omitempty"` + // Present when the issue is associated with a pull request PullRequest *interface{} `json:"pull_request,omitempty"` - Closed bool `json:"closed"` } diff --git a/Go/model_issue_assignee.go b/Go/model_issue_assignee.go deleted file mode 100644 index 9374305..0000000 --- a/Go/model_issue_assignee.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type IssueAssignee struct { - Id int32 `json:"id,omitempty"` - Login string `json:"login,omitempty"` - FullName string `json:"full_name,omitempty"` - AvatarUrl string `json:"avatar_url,omitempty"` - Username string `json:"username,omitempty"` -} diff --git a/Go/model_issue_labels.go b/Go/model_issue_labels.go deleted file mode 100644 index 62f4311..0000000 --- a/Go/model_issue_labels.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type IssueLabels struct { - Id int32 `json:"id,omitempty"` - Name string `json:"name,omitempty"` - Color string `json:"color,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/Go/model_issue_milestone.go b/Go/model_issue_milestone.go deleted file mode 100644 index fad0165..0000000 --- a/Go/model_issue_milestone.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type IssueMilestone struct { - Id int32 `json:"id,omitempty"` - Title string `json:"title,omitempty"` - Description string `json:"description,omitempty"` - State string `json:"state,omitempty"` - OpenIssues int32 `json:"open_issues,omitempty"` - ClosedIssues int32 `json:"closed_issues,omitempty"` - ClosedAt string `json:"closed_at,omitempty"` - DueOn string `json:"due_on,omitempty"` -} diff --git a/Go/model_migrate_repo.go b/Go/model_migrate_repo.go deleted file mode 100644 index 9afbd78..0000000 --- a/Go/model_migrate_repo.go +++ /dev/null @@ -1,28 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type MigrateRepo struct { - // Remote Git address (HTTP/HTTPS URL or local path) - CloneAddr string `json:"clone_addr"` - // Authorization username - AuthUsername string `json:"auth_username,omitempty"` - // Authorization password - AuthPassword string `json:"auth_password,omitempty"` - // User ID who takes ownership of this repository - UserId int32 `json:"user_id"` - // Name of the repository - RepoName string `json:"repo_name,omitempty"` - // Repository will be a mirror (connected repository). - Mirror bool `json:"mirror,omitempty"` - // Repository will be private or public. - Visibility string `json:"visibility,omitempty"` - // Description of the repository - Description string `json:"description,omitempty"` -} diff --git a/Go/model_patch_issue.go b/Go/model_patch_issue.go index 672d4f9..9a615ed 100644 --- a/Go/model_patch_issue.go +++ b/Go/model_patch_issue.go @@ -3,15 +3,15 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api type PatchIssue struct { - Title string `json:"title,omitempty"` - Body string `json:"body,omitempty"` - Assignee string `json:"assignee,omitempty"` - Milestone int32 `json:"milestone,omitempty"` - State *State `json:"state,omitempty"` + Title *ComponentsschemasTitleYaml `json:"title,omitempty"` + Body *ComponentsschemasBodyYaml `json:"body,omitempty"` + Assignee *ComponentsschemasAssigneeYaml `json:"assignee,omitempty"` + Milestone *ComponentsschemasMilestoneYaml `json:"milestone,omitempty"` + State *ComponentsschemasStateYaml `json:"state,omitempty"` } diff --git a/Go/model_post_issue.go b/Go/model_post_issue.go index 481dfe9..1ee75fe 100644 --- a/Go/model_post_issue.go +++ b/Go/model_post_issue.go @@ -3,16 +3,16 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api type PostIssue struct { - Title string `json:"title,omitempty"` - Body string `json:"body,omitempty"` - Assignee string `json:"assignee,omitempty"` - Milestone int32 `json:"milestone,omitempty"` - Labels *[]int32 `json:"labels,omitempty"` - Closed bool `json:"closed,omitempty"` + Title *ComponentsschemasTitleYaml `json:"title,omitempty"` + Body *ComponentsschemasBodyYaml `json:"body,omitempty"` + Assignee *ComponentsschemasAssigneeYaml `json:"assignee,omitempty"` + Milestone *ComponentsschemasMilestoneYaml `json:"milestone,omitempty"` + Labels *ComponentsschemasLabelsYaml `json:"labels,omitempty"` + Closed *ComponentsschemasClosedYaml `json:"closed,omitempty"` } diff --git a/Go/model_put_file.go b/Go/model_put_file.go index 2706dcd..238bb8c 100644 --- a/Go/model_put_file.go +++ b/Go/model_put_file.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_repo_hooks_body.go b/Go/model_repo_hooks_body.go deleted file mode 100644 index 08b5c81..0000000 --- a/Go/model_repo_hooks_body.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type RepoHooksBody struct { - // The type of webhook - Type_ string `json:"type"` - Config *WebhookConfig `json:"config"` - Events *[]string `json:"events,omitempty"` -} diff --git a/Go/model_state.go b/Go/model_state.go deleted file mode 100644 index 969252f..0000000 --- a/Go/model_state.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -type State string - -// List of State -const ( - OPEN_State State = "open" - CLOSED_State State = "closed" -) diff --git a/Go/model_user.go b/Go/model_user.go index adfdf6a..5965f24 100644 --- a/Go/model_user.go +++ b/Go/model_user.go @@ -3,15 +3,20 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api type User struct { - Id int32 `json:"id,omitempty"` + Id int64 `json:"id,omitempty"` Login string `json:"login,omitempty"` + // Alias for login (legacy compatibility) + Username string `json:"username,omitempty"` FullName string `json:"full_name,omitempty"` AvatarUrl string `json:"avatar_url,omitempty"` - Username string `json:"username,omitempty"` + PublicEmail string `json:"public_email,omitempty"` + Website string `json:"website,omitempty"` + Company string `json:"company,omitempty"` + Description string `json:"description,omitempty"` } diff --git a/Go/model_webhook_config.go b/Go/model_webhook_config.go deleted file mode 100644 index 9509716..0000000 --- a/Go/model_webhook_config.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -// Key/value pairs to provide settings for this hook -type WebhookConfig struct { - // A string defining the URL to which the payloads will be delivered. - Url string `json:"url"` - // A string defining the media type used to serialize the payloads. - ContentType string `json:"content_type"` - // An optional string that's passed with the HTTP requests body. - Secret string `json:"secret,omitempty"` -} diff --git a/Go/response.go b/Go/response.go deleted file mode 100644 index 6a8068b..0000000 --- a/Go/response.go +++ /dev/null @@ -1,42 +0,0 @@ -/* - * DagsHub API - * - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * API version: 1.0.2 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package dagshub_api - -import ( - "net/http" -) - -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the swagger operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/Java/.gitignore b/Java/.gitignore deleted file mode 100644 index a530464..0000000 --- a/Java/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.ear - -# exclude jar for gradle wrapper -!gradle/wrapper/*.jar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -# build files -**/target -target -.gradle -build diff --git a/Java/.swagger-codegen-ignore b/Java/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/Java/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/Java/.swagger-codegen/VERSION b/Java/.swagger-codegen/VERSION deleted file mode 100644 index 053a355..0000000 --- a/Java/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.35 \ No newline at end of file diff --git a/Java/.travis.yml b/Java/.travis.yml deleted file mode 100644 index 70cb81a..0000000 --- a/Java/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -# -language: java -jdk: - - oraclejdk8 - - oraclejdk7 -before_install: - # ensure gradlew has proper permission - - chmod a+x ./gradlew -script: - # test using maven - - mvn test - # uncomment below to test using gradle - # - gradle test - # uncomment below to test using sbt - # - sbt test diff --git a/Java/README.md b/Java/README.md deleted file mode 100644 index 8a49b31..0000000 --- a/Java/README.md +++ /dev/null @@ -1,238 +0,0 @@ -# swagger-java-client - -DagsHub API -- API version: 1.0.2 - - Build date: 2023-05-11T11:41:48.085831Z[Etc/UTC] - -This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - - -*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)* - - -## Requirements - -Building the API client library requires: -1. Java 1.7+ -2. Maven/Gradle - -## Installation - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn clean install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn clean deploy -``` - -Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - io.swagger - swagger-java-client - 1.0.0 - compile - -``` - -### Gradle users - -Add this dependency to your project's build file: - -```groovy -compile "io.swagger:swagger-java-client:1.0.0" -``` - -### Others - -At first generate the JAR by executing: - -```shell -mvn clean package -``` - -Then manually install the following JARs: - -* `target/swagger-java-client-1.0.0.jar` -* `target/lib/*.jar` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following Java code: - -```java -import io.swagger.client.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; -import io.swagger.client.api.BranchesApi; - -import java.io.File; -import java.util.*; - -public class BranchesApiExample { - - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - // Configure HTTP basic authorization: basicAuth - HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); - basicAuth.setUsername("YOUR USERNAME"); - basicAuth.setPassword("YOUR PASSWORD"); - - // Configure API key authorization: tokenAuth - ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); - tokenAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //tokenAuth.setApiKeyPrefix("Token"); - - BranchesApi apiInstance = new BranchesApi(); - String owner = "owner_example"; // String | owner of the repository - String repo = "repo_example"; // String | name of the repository - String branch = "branch_example"; // String | branch of the repository - try { - apiInstance.getBranch(owner, repo, branch); - } catch (ApiException e) { - System.err.println("Exception when calling BranchesApi#getBranch"); - e.printStackTrace(); - } - } -} -import io.swagger.client.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; -import io.swagger.client.api.BranchesApi; - -import java.io.File; -import java.util.*; - -public class BranchesApiExample { - - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - // Configure HTTP basic authorization: basicAuth - HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); - basicAuth.setUsername("YOUR USERNAME"); - basicAuth.setPassword("YOUR PASSWORD"); - - // Configure API key authorization: tokenAuth - ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); - tokenAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //tokenAuth.setApiKeyPrefix("Token"); - - BranchesApi apiInstance = new BranchesApi(); - String owner = "owner_example"; // String | owner of the repository - String repo = "repo_example"; // String | name of the repository - try { - apiInstance.listBranches(owner, repo); - } catch (ApiException e) { - System.err.println("Exception when calling BranchesApi#listBranches"); - e.printStackTrace(); - } - } -} -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://dagshub.com/api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*BranchesApi* | [**getBranch**](docs/BranchesApi.md#getBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -*BranchesApi* | [**listBranches**](docs/BranchesApi.md#listBranches) | **GET** /repos/{owner}/{repo}/branches | List Branches -*CollaboratorsApi* | [**addCollaborator**](docs/CollaboratorsApi.md#addCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -*CollaboratorsApi* | [**getCollaborators**](docs/CollaboratorsApi.md#getCollaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -*CollaboratorsApi* | [**removeCollaborator**](docs/CollaboratorsApi.md#removeCollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator -*CommitsApi* | [**getCommit**](docs/CommitsApi.md#getCommit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit -*ContentApi* | [**getArchive**](docs/ContentApi.md#getArchive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -*ContentApi* | [**getContent**](docs/ContentApi.md#getContent) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -*ContentApi* | [**getRaw**](docs/ContentApi.md#getRaw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -*ContentApi* | [**uploadContent**](docs/ContentApi.md#uploadContent) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository -*ExperimentsApi* | [**addExperimentLabel**](docs/ExperimentsApi.md#addExperimentLabel) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -*ExperimentsApi* | [**deleteExperiment**](docs/ExperimentsApi.md#deleteExperiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -*ExperimentsApi* | [**deleteExperimentLabel**](docs/ExperimentsApi.md#deleteExperimentLabel) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -*ExperimentsApi* | [**editExperiment**](docs/ExperimentsApi.md#editExperiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -*ExperimentsApi* | [**getExperimentMetrics**](docs/ExperimentsApi.md#getExperimentMetrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -*ExperimentsApi* | [**getExperiments**](docs/ExperimentsApi.md#getExperiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments -*IssuesApi* | [**createIssue**](docs/IssuesApi.md#createIssue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -*IssuesApi* | [**editIssue**](docs/IssuesApi.md#editIssue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -*IssuesApi* | [**getIssue**](docs/IssuesApi.md#getIssue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -*IssuesApi* | [**listRepoIssues**](docs/IssuesApi.md#listRepoIssues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository -*ReleasesApi* | [**listReleases**](docs/ReleasesApi.md#listReleases) | **GET** /repos/{owner}/{repo}/releases | List Releases -*RepositoryApi* | [**createOrgRepo**](docs/RepositoryApi.md#createOrgRepo) | **POST** /org/{orgname}/repos | Create in organization -*RepositoryApi* | [**createRepo**](docs/RepositoryApi.md#createRepo) | **POST** /user/repos | Create -*RepositoryApi* | [**getRepo**](docs/RepositoryApi.md#getRepo) | **GET** /repos/{owner}/{repo} | Get repository information -*RepositoryApi* | [**listMyRepos**](docs/RepositoryApi.md#listMyRepos) | **GET** /user/repos | List your repositories -*RepositoryApi* | [**listOrgRepos**](docs/RepositoryApi.md#listOrgRepos) | **GET** /orgs/{orgname}/repos | List organization repositories -*RepositoryApi* | [**listUserRepos**](docs/RepositoryApi.md#listUserRepos) | **GET** /users/{username}/repos | List user repositories -*RepositoryApi* | [**migrateRepo**](docs/RepositoryApi.md#migrateRepo) | **POST** /repos/migrate | Migrate repository -*RepositoryApi* | [**search**](docs/RepositoryApi.md#search) | **GET** /repos/search | Search repositories -*StorageIntegrationsApi* | [**getBucketContent**](docs/StorageIntegrationsApi.md#getBucketContent) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -*StorageIntegrationsApi* | [**getBucketFile**](docs/StorageIntegrationsApi.md#getBucketFile) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -*StorageIntegrationsApi* | [**getBuckets**](docs/StorageIntegrationsApi.md#getBuckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository -*UserApi* | [**getAuthenticatedUser**](docs/UserApi.md#getAuthenticatedUser) | **GET** /user | Get authenticated user information -*UserApi* | [**getUser**](docs/UserApi.md#getUser) | **GET** /users/{username} | Get information about a user -*WebhooksApi* | [**createHook**](docs/WebhooksApi.md#createHook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -*WebhooksApi* | [**deleteHook**](docs/WebhooksApi.md#deleteHook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -*WebhooksApi* | [**editHook**](docs/WebhooksApi.md#editHook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -*WebhooksApi* | [**listHooks**](docs/WebhooksApi.md#listHooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - -## Documentation for Models - - - [CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) - - [CreateRepo](docs/CreateRepo.md) - - [EditExperimentPost](docs/EditExperimentPost.md) - - [ExperimentKeys](docs/ExperimentKeys.md) - - [File](docs/File.md) - - [Files](docs/Files.md) - - [Files1](docs/Files1.md) - - [HooksIdBody](docs/HooksIdBody.md) - - [Integration](docs/Integration.md) - - [IntegrationInner](docs/IntegrationInner.md) - - [Issue](docs/Issue.md) - - [IssueAssignee](docs/IssueAssignee.md) - - [IssueLabels](docs/IssueLabels.md) - - [IssueMilestone](docs/IssueMilestone.md) - - [Issues](docs/Issues.md) - - [Labels](docs/Labels.md) - - [MigrateRepo](docs/MigrateRepo.md) - - [PatchIssue](docs/PatchIssue.md) - - [PostIssue](docs/PostIssue.md) - - [PutFile](docs/PutFile.md) - - [RepoHooksBody](docs/RepoHooksBody.md) - - [State](docs/State.md) - - [User](docs/User.md) - - [WebhookConfig](docs/WebhookConfig.md) - - [WebhookEvents](docs/WebhookEvents.md) - -## Documentation for Authorization - -Authentication schemes defined for the API: -### basicAuth - -- **Type**: HTTP basic authentication - -### tokenAuth - -- **Type**: API key -- **API key parameter name**: token -- **Location**: URL query string - - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Author - - diff --git a/Java/build.gradle b/Java/build.gradle deleted file mode 100644 index 11998c5..0000000 --- a/Java/build.gradle +++ /dev/null @@ -1,104 +0,0 @@ -apply plugin: 'idea' -apply plugin: 'eclipse' - -group = 'io.swagger' -version = '1.0.0' - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - } -} - -repositories { - jcenter() -} - - -if(hasProperty('target') && target == 'android') { - - apply plugin: 'com.android.library' - apply plugin: 'com.github.dcendents.android-maven' - - android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' - defaultConfig { - minSdkVersion 14 - targetSdkVersion 25 - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 - } - - // Rename the aar correctly - libraryVariants.all { variant -> - variant.outputs.each { output -> - def outputFile = output.outputFile - if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${project.name}-${variant.baseName}-${version}.aar" - output.outputFile = new File(outputFile.parent, fileName) - } - } - } - - dependencies { - provided 'javax.annotation:jsr250-api:1.0' - } - } - - afterEvaluate { - android.libraryVariants.all { variant -> - def task = project.tasks.create "jar${variant.name.capitalize()}", Jar - task.description = "Create jar artifact for ${variant.name}" - task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task); - } - } - - task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' - } - - artifacts { - archives sourcesJar - } - -} else { - - apply plugin: 'java' - apply plugin: 'maven' - - sourceCompatibility = JavaVersion.VERSION_1_7 - targetCompatibility = JavaVersion.VERSION_1_7 - - install { - repositories.mavenInstaller { - pom.artifactId = 'swagger-java-client' - } - } - - task execute(type:JavaExec) { - main = System.getProperty('mainClass') - classpath = sourceSets.main.runtimeClasspath - } -} - -dependencies { - compile 'io.swagger.core.v3:swagger-annotations:2.0.0' - compile 'com.squareup.okhttp:okhttp:2.7.5' - compile 'com.squareup.okhttp:logging-interceptor:2.7.5' - compile 'com.google.code.gson:gson:2.8.1' - compile 'io.gsonfire:gson-fire:1.8.3' - compile 'org.threeten:threetenbp:1.3.5' - testCompile 'junit:junit:4.12' -} diff --git a/Java/build.sbt b/Java/build.sbt deleted file mode 100644 index 0a65ca7..0000000 --- a/Java/build.sbt +++ /dev/null @@ -1,21 +0,0 @@ -lazy val root = (project in file(".")). - settings( - organization := "io.swagger", - name := "swagger-java-client", - version := "1.0.0", - scalaVersion := "2.11.4", - scalacOptions ++= Seq("-feature"), - javacOptions in compile ++= Seq("-Xlint:deprecation"), - publishArtifact in (Compile, packageDoc) := false, - resolvers += Resolver.mavenLocal, - libraryDependencies ++= Seq( - "io.swagger.core.v3" % "swagger-annotations" % "2.0.0", - "com.squareup.okhttp" % "okhttp" % "2.7.5", - "com.squareup.okhttp" % "logging-interceptor" % "2.7.5", - "com.google.code.gson" % "gson" % "2.8.1", - "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", - "org.threeten" % "threetenbp" % "1.3.5" % "compile", - "junit" % "junit" % "4.12" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" - ) - ) diff --git a/Java/docs/BranchesApi.md b/Java/docs/BranchesApi.md deleted file mode 100644 index a472862..0000000 --- a/Java/docs/BranchesApi.md +++ /dev/null @@ -1,127 +0,0 @@ -# BranchesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getBranch**](BranchesApi.md#getBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -[**listBranches**](BranchesApi.md#listBranches) | **GET** /repos/{owner}/{repo}/branches | List Branches - - -# **getBranch** -> getBranch(owner, repo, branch) - -Get Branch - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.BranchesApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -BranchesApi apiInstance = new BranchesApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String branch = "branch_example"; // String | branch of the repository -try { - apiInstance.getBranch(owner, repo, branch); -} catch (ApiException e) { - System.err.println("Exception when calling BranchesApi#getBranch"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **branch** | **String**| branch of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **listBranches** -> listBranches(owner, repo) - -List Branches - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.BranchesApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -BranchesApi apiInstance = new BranchesApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -try { - apiInstance.listBranches(owner, repo); -} catch (ApiException e) { - System.err.println("Exception when calling BranchesApi#listBranches"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Java/docs/CollaboratorsApi.md b/Java/docs/CollaboratorsApi.md deleted file mode 100644 index d5c94df..0000000 --- a/Java/docs/CollaboratorsApi.md +++ /dev/null @@ -1,190 +0,0 @@ -# CollaboratorsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addCollaborator**](CollaboratorsApi.md#addCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -[**getCollaborators**](CollaboratorsApi.md#getCollaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -[**removeCollaborator**](CollaboratorsApi.md#removeCollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator - - -# **addCollaborator** -> addCollaborator(owner, repo, collaborator, body) - -Add user as a collaborator - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.CollaboratorsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -CollaboratorsApi apiInstance = new CollaboratorsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String collaborator = "collaborator_example"; // String | collaborator username -CollaboratorsCollaboratorBody body = new CollaboratorsCollaboratorBody(); // CollaboratorsCollaboratorBody | -try { - apiInstance.addCollaborator(owner, repo, collaborator, body); -} catch (ApiException e) { - System.err.println("Exception when calling CollaboratorsApi#addCollaborator"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **collaborator** | **String**| collaborator username | - **body** | [**CollaboratorsCollaboratorBody**](CollaboratorsCollaboratorBody.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **getCollaborators** -> getCollaborators(owner, repo) - -Get collaborators - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.CollaboratorsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -CollaboratorsApi apiInstance = new CollaboratorsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -try { - apiInstance.getCollaborators(owner, repo); -} catch (ApiException e) { - System.err.println("Exception when calling CollaboratorsApi#getCollaborators"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **removeCollaborator** -> removeCollaborator(owner, repo, collaborator) - -Delete collaborator - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.CollaboratorsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -CollaboratorsApi apiInstance = new CollaboratorsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String collaborator = "collaborator_example"; // String | collaborator username -try { - apiInstance.removeCollaborator(owner, repo, collaborator); -} catch (ApiException e) { - System.err.println("Exception when calling CollaboratorsApi#removeCollaborator"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **collaborator** | **String**| collaborator username | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - diff --git a/Java/docs/CollaboratorsCollaboratorBody.md b/Java/docs/CollaboratorsCollaboratorBody.md deleted file mode 100644 index 3e68cd5..0000000 --- a/Java/docs/CollaboratorsCollaboratorBody.md +++ /dev/null @@ -1,6 +0,0 @@ -# CollaboratorsCollaboratorBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**permission** | **String** | The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. | [optional] diff --git a/Java/docs/CommitsApi.md b/Java/docs/CommitsApi.md deleted file mode 100644 index 7c0c181..0000000 --- a/Java/docs/CommitsApi.md +++ /dev/null @@ -1,68 +0,0 @@ -# CommitsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getCommit**](CommitsApi.md#getCommit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit - - -# **getCommit** -> getCommit(owner, repo, sha) - -Get a single commit - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.CommitsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -CommitsApi apiInstance = new CommitsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String sha = "sha_example"; // String | a SHA1 of a commit -try { - apiInstance.getCommit(owner, repo, sha); -} catch (ApiException e) { - System.err.println("Exception when calling CommitsApi#getCommit"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **sha** | **String**| a SHA1 of a commit | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Java/docs/ContentApi.md b/Java/docs/ContentApi.md deleted file mode 100644 index 33b90b2..0000000 --- a/Java/docs/ContentApi.md +++ /dev/null @@ -1,282 +0,0 @@ -# ContentApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getArchive**](ContentApi.md#getArchive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -[**getContent**](ContentApi.md#getContent) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -[**getRaw**](ContentApi.md#getRaw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -[**uploadContent**](ContentApi.md#uploadContent) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository - - -# **getArchive** -> getArchive(owner, repo, ref, format) - -Download archive - -This method returns archive by given format. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ContentApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ContentApi apiInstance = new ContentApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String ref = "ref_example"; // String | The name of the commit/branch/tag -String format = "format_example"; // String | The format of archive, either .zip or .tar.gz -try { - apiInstance.getArchive(owner, repo, ref, format); -} catch (ApiException e) { - System.err.println("Exception when calling ContentApi#getArchive"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **ref** | **String**| The name of the commit/branch/tag | - **format** | **String**| The format of archive, either .zip or .tar.gz | [enum: .zip, .tar.gz] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **getContent** -> Files getContent(owner, repo, branch, path, includeSize) - -List data in a repository folder - -List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ContentApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ContentApi apiInstance = new ContentApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String branch = "branch_example"; // String | branch of the repository -String path = "path_example"; // String | path of a folder in the repository -Boolean includeSize = false; // Boolean | -try { - Files result = apiInstance.getContent(owner, repo, branch, path, includeSize); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling ContentApi#getContent"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **branch** | **String**| branch of the repository | - **path** | **String**| path of a folder in the repository | - **includeSize** | **Boolean**| | [optional] [default to false] - -### Return type - -[**Files**](Files.md) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **getRaw** -> getRaw(owner, repo, ref, path) - -Download raw content - -This method returns the raw content of a file. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ContentApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ContentApi apiInstance = new ContentApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String ref = "ref_example"; // String | The name of the commit/branch/tag -String path = "path_example"; // String | The content path -try { - apiInstance.getRaw(owner, repo, ref, path); -} catch (ApiException e) { - System.err.println("Exception when calling ContentApi#getRaw"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **ref** | **String**| The name of the commit/branch/tag | - **path** | **String**| The content path | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **uploadContent** -> uploadContent(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files) - -Upload data to a repository - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ContentApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ContentApi apiInstance = new ContentApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String branch = "branch_example"; // String | branch of the repository -String path = "path_example"; // String | path of a folder in the repository -String commitSummary = "commitSummary_example"; // String | -String commitMessage = "commitMessage_example"; // String | -String commitChoice = "commitChoice_example"; // String | -String lastCommit = "lastCommit_example"; // String | -String newBranchName = "newBranchName_example"; // String | -String versioning = "versioning_example"; // String | -String files = "files_example"; // String | -try { - apiInstance.uploadContent(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files); -} catch (ApiException e) { - System.err.println("Exception when calling ContentApi#uploadContent"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **branch** | **String**| branch of the repository | - **path** | **String**| path of a folder in the repository | - **commitSummary** | **String**| | [optional] - **commitMessage** | **String**| | [optional] - **commitChoice** | **String**| | [optional] [enum: direct, commit-to-new-branch] - **lastCommit** | **String**| | [optional] - **newBranchName** | **String**| | [optional] - **versioning** | **String**| | [optional] [enum: auto, dvc, git, bucket] - **files** | **String**| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: Not defined - diff --git a/Java/docs/CreateRepo.md b/Java/docs/CreateRepo.md deleted file mode 100644 index 8eeb99b..0000000 --- a/Java/docs/CreateRepo.md +++ /dev/null @@ -1,61 +0,0 @@ -# CreateRepo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | name of the repository | -**description** | **String** | A short description of the repository | [optional] -**_private** | **Boolean** | Either true to create a private repository, or false to create a public one. | [optional] -**autoInit** | **Boolean** | Pass true to create an initial commit with README, .gitignore and LICENSE. | [optional] -**projectTemplate** | [**ProjectTemplateEnum**](#ProjectTemplateEnum) | Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. | [optional] -**gitignores** | **String** | Desired language .gitignore templates to apply. Use the name of the templates. | [optional] -**license** | [**LicenseEnum**](#LicenseEnum) | Desired LICENSE template to apply. Use the name of the template. | [optional] -**readme** | **String** | Desired README template to apply. Use the name of the template. | [optional] - - -## Enum: ProjectTemplateEnum -Name | Value ----- | ----- -COOKIECUTTER_DAGSHUB_DVC | "cookiecutter-dagshub-dvc" -CUSTOM | "custom" -NONE | "none" -NOTEBOOK_TEMPLATE | "notebook-template" - - -## Enum: LicenseEnum -Name | Value ----- | ----- -APACHE_LICENSE_2_0 | "Apache License 2.0" -MIT_LICENSE | "MIT License" -ABSTYLES_LICENSE | "Abstyles License" -ACADEMIC_FREE_LICENSE_V1_1 | "Academic Free License v1.1" -ACADEMIC_FREE_LICENSE_V1_2 | "Academic Free License v1.2" -ACADEMIC_FREE_LICENSE_V2_0 | "Academic Free License v2.0" -ACADEMIC_FREE_LICENSE_V2_1 | "Academic Free License v2.1" -ACADEMIC_FREE_LICENSE_V3_0 | "Academic Free License v3.0" -AFFERO_GENERAL_PUBLIC_LICENSE_V1_0 | "Affero General Public License v1.0" -APACHE_LICENSE_1_0 | "Apache License 1.0" -APACHE_LICENSE_1_1 | "Apache License 1.1" -ARTISTIC_LICENSE_1_0 | "Artistic License 1.0" -ARTISTIC_LICENSE_2_0 | "Artistic License 2.0" -BSD_2_CLAUSE_LICENSE | "BSD 2-clause License" -BSD_3_CLAUSE_LICENSE | "BSD 3-clause License" -BSD_4_CLAUSE_LICENSE | "BSD 4-clause License" -CREATIVE_COMMONS_CC0_1_0_UNIVERSAL | "Creative Commons CC0 1.0 Universal" -ECLIPSE_PUBLIC_LICENSE_1_0 | "Eclipse Public License 1.0" -EDUCATIONAL_COMMUNITY_LICENSE_V1_0 | "Educational Community License v1.0" -EDUCATIONAL_COMMUNITY_LICENSE_V2_0 | "Educational Community License v2.0" -GNU_AFFERO_GENERAL_PUBLIC_LICENSE_V3_0 | "GNU Affero General Public License v3.0" -GNU_FREE_DOCUMENTATION_LICENSE_V1_1 | "GNU Free Documentation License v1.1" -GNU_FREE_DOCUMENTATION_LICENSE_V1_2 | "GNU Free Documentation License v1.2" -GNU_FREE_DOCUMENTATION_LICENSE_V1_3 | "GNU Free Documentation License v1.3" -GNU_GENERAL_PUBLIC_LICENSE_V1_0 | "GNU General Public License v1.0" -GNU_GENERAL_PUBLIC_LICENSE_V2_0 | "GNU General Public License v2.0" -GNU_GENERAL_PUBLIC_LICENSE_V3_0 | "GNU General Public License v3.0" -GNU_LESSER_GENERAL_PUBLIC_LICENSE_V2_1 | "GNU Lesser General Public License v2.1" -GNU_LESSER_GENERAL_PUBLIC_LICENSE_V3_0 | "GNU Lesser General Public License v3.0" -GNU_LIBRARY_GENERAL_PUBLIC_LICENSE_V2_0 | "GNU Library General Public License v2.0" -ISC_LICENSE | "ISC license" -MOZILLA_PUBLIC_LICENSE_1_0 | "Mozilla Public License 1.0" -MOZILLA_PUBLIC_LICENSE_1_1 | "Mozilla Public License 1.1" -MOZILLA_PUBLIC_LICENSE_2_03 | "Mozilla Public License 2.03" diff --git a/Java/docs/EditExperimentPost.md b/Java/docs/EditExperimentPost.md deleted file mode 100644 index d5e7f5d..0000000 --- a/Java/docs/EditExperimentPost.md +++ /dev/null @@ -1,6 +0,0 @@ -# EditExperimentPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | diff --git a/Java/docs/WebhookEvents.md b/Java/docs/ExperimentMetricsResponse.md similarity index 79% rename from Java/docs/WebhookEvents.md rename to Java/docs/ExperimentMetricsResponse.md index d28724b..8c90cd3 100644 --- a/Java/docs/WebhookEvents.md +++ b/Java/docs/ExperimentMetricsResponse.md @@ -1,4 +1,4 @@ -# WebhookEvents +# ExperimentMetricsResponse ## Properties Name | Type | Description | Notes diff --git a/Java/docs/ExperimentsApi.md b/Java/docs/ExperimentsApi.md deleted file mode 100644 index 4ddd91d..0000000 --- a/Java/docs/ExperimentsApi.md +++ /dev/null @@ -1,383 +0,0 @@ -# ExperimentsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addExperimentLabel**](ExperimentsApi.md#addExperimentLabel) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -[**deleteExperiment**](ExperimentsApi.md#deleteExperiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -[**deleteExperimentLabel**](ExperimentsApi.md#deleteExperimentLabel) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -[**editExperiment**](ExperimentsApi.md#editExperiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -[**getExperimentMetrics**](ExperimentsApi.md#getExperimentMetrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -[**getExperiments**](ExperimentsApi.md#getExperiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments - - -# **addExperimentLabel** -> addExperimentLabel(owner, repo, experimentKey, experimentLabel) - -Add label to experiment - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ExperimentsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ExperimentsApi apiInstance = new ExperimentsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String experimentKey = "experimentKey_example"; // String | a valid experiment key -String experimentLabel = "experimentLabel_example"; // String | A label for the experiment, max 128 characters. -try { - apiInstance.addExperimentLabel(owner, repo, experimentKey, experimentLabel); -} catch (ApiException e) { - System.err.println("Exception when calling ExperimentsApi#addExperimentLabel"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **experimentKey** | **String**| a valid experiment key | - **experimentLabel** | **String**| A label for the experiment, max 128 characters. | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **deleteExperiment** -> deleteExperiment(owner, repo, experimentKey) - -Delete experiment - -Support both git and MLflow experiments - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ExperimentsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ExperimentsApi apiInstance = new ExperimentsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String experimentKey = "experimentKey_example"; // String | a valid experiment key -try { - apiInstance.deleteExperiment(owner, repo, experimentKey); -} catch (ApiException e) { - System.err.println("Exception when calling ExperimentsApi#deleteExperiment"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **experimentKey** | **String**| a valid experiment key | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **deleteExperimentLabel** -> deleteExperimentLabel(owner, repo, experimentKey, experimentLabel) - -Delete experiment label - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ExperimentsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ExperimentsApi apiInstance = new ExperimentsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String experimentKey = "experimentKey_example"; // String | a valid experiment key -String experimentLabel = "experimentLabel_example"; // String | A label for the experiment, max 128 characters. -try { - apiInstance.deleteExperimentLabel(owner, repo, experimentKey, experimentLabel); -} catch (ApiException e) { - System.err.println("Exception when calling ExperimentsApi#deleteExperimentLabel"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **experimentKey** | **String**| a valid experiment key | - **experimentLabel** | **String**| A label for the experiment, max 128 characters. | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **editExperiment** -> editExperiment(owner, repo, experimentKey, body) - -Edit experiment info - -Edit experiment info, currently supports just changing experiment name. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ExperimentsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ExperimentsApi apiInstance = new ExperimentsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String experimentKey = "experimentKey_example"; // String | a valid experiment key -EditExperimentPost body = new EditExperimentPost(); // EditExperimentPost | -try { - apiInstance.editExperiment(owner, repo, experimentKey, body); -} catch (ApiException e) { - System.err.println("Exception when calling ExperimentsApi#editExperiment"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **experimentKey** | **String**| a valid experiment key | - **body** | [**EditExperimentPost**](EditExperimentPost.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **getExperimentMetrics** -> getExperimentMetrics(owner, repo, body) - -Get experiment metrics for experiment - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ExperimentsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ExperimentsApi apiInstance = new ExperimentsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -ExperimentKeys body = new ExperimentKeys(); // ExperimentKeys | -try { - apiInstance.getExperimentMetrics(owner, repo, body); -} catch (ApiException e) { - System.err.println("Exception when calling ExperimentsApi#getExperimentMetrics"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **body** | [**ExperimentKeys**](ExperimentKeys.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **getExperiments** -> getExperiments(owner, repo) - -List Experiments - -Get a list of experiments in the given repository - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ExperimentsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ExperimentsApi apiInstance = new ExperimentsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -try { - apiInstance.getExperiments(owner, repo); -} catch (ApiException e) { - System.err.println("Exception when calling ExperimentsApi#getExperiments"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Java/docs/ExperimentsResponse.md b/Java/docs/ExperimentsResponse.md new file mode 100644 index 0000000..22d5e5a --- /dev/null +++ b/Java/docs/ExperimentsResponse.md @@ -0,0 +1,8 @@ +# ExperimentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**experiments** | [**Map<String, ComponentsschemasExperimentYaml>**](ComponentsschemasExperimentYaml.md) | Map of experiment ID to experiment details | [optional] +**isEditor** | **Boolean** | Whether the authenticated user can edit experiments in this repo | [optional] +**nextPageToken** | **String** | Pagination token for the next page of results (empty string when no more pages) | [optional] diff --git a/Java/docs/File.md b/Java/docs/File.md deleted file mode 100644 index 69c69ba..0000000 --- a/Java/docs/File.md +++ /dev/null @@ -1,27 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**path** | **String** | | [optional] -**type** | [**TypeEnum**](#TypeEnum) | | [optional] -**size** | **Long** | | [optional] -**hash** | **String** | | [optional] -**versioning** | [**VersioningEnum**](#VersioningEnum) | | [optional] -**downloadUrl** | **String** | | [optional] -**contentUrl** | **String** | | [optional] - - -## Enum: TypeEnum -Name | Value ----- | ----- -FILE | "file" -DIR | "dir" - - -## Enum: VersioningEnum -Name | Value ----- | ----- -GIT | "git" -DVC | "dvc" -BUCKET | "bucket" diff --git a/Java/docs/Files1.md b/Java/docs/Files1.md index 82b3ff3..e3de0c8 100644 --- a/Java/docs/Files1.md +++ b/Java/docs/Files1.md @@ -3,6 +3,5 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**entries** | [**List<File>**](File.md) | | [optional] -**limit** | **Integer** | | [optional] -**nextToken** | **String** | | [optional] +**entries** | [**List<ComponentsschemasFileYaml>**](ComponentsschemasFileYaml.md) | | [optional] +**nextToken** | **String** | Next token to continue pagination from | [optional] diff --git a/Java/docs/HooksIdBody.md b/Java/docs/HooksIdBody.md deleted file mode 100644 index 6fa1ce0..0000000 --- a/Java/docs/HooksIdBody.md +++ /dev/null @@ -1,8 +0,0 @@ -# HooksIdBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**config** | [**WebhookConfig**](WebhookConfig.md) | | [optional] -**events** | [**WebhookEvents**](WebhookEvents.md) | | [optional] -**active** | **Boolean** | Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. | [optional] diff --git a/Java/docs/IntegrationInner.md b/Java/docs/IntegrationInner.md deleted file mode 100644 index dcf9134..0000000 --- a/Java/docs/IntegrationInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# IntegrationInner - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Name/path of the bucket | [optional] -**protocol** | [**ProtocolEnum**](#ProtocolEnum) | Protocol used by the integration | [optional] -**listPath** | **String** | URL to list the root of this bucket | [optional] - - -## Enum: ProtocolEnum -Name | Value ----- | ----- -S3 | "s3" -GS | "gs" diff --git a/Java/docs/Issue.md b/Java/docs/Issue.md index 7bce6e9..b4ae0f8 100644 --- a/Java/docs/Issue.md +++ b/Java/docs/Issue.md @@ -3,17 +3,23 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **Integer** | | [optional] -**number** | **Integer** | | [optional] -**user** | [**User**](User.md) | | [optional] -**title** | **String** | | -**body** | **String** | | -**labels** | [**List<IssueLabels>**](IssueLabels.md) | | -**milestone** | [**IssueMilestone**](IssueMilestone.md) | | -**assignee** | [**IssueAssignee**](IssueAssignee.md) | | -**state** | **String** | | [optional] +**id** | **Long** | | [optional] +**number** | **Long** | Issue index within the repository | [optional] +**user** | [**ComponentsschemasUserYaml**](ComponentsschemasUserYaml.md) | | [optional] +**title** | **String** | | [optional] +**body** | **String** | | [optional] +**labels** | **List<Object>** | | [optional] +**milestone** | **Object** | | [optional] +**assignee** | [**ComponentsschemasUserYaml**](ComponentsschemasUserYaml.md) | | [optional] +**state** | [**StateEnum**](#StateEnum) | | [optional] **comments** | **Integer** | | [optional] -**createdAt** | **String** | | [optional] -**updatedAt** | **String** | | [optional] -**pullRequest** | **Object** | | [optional] -**closed** | **Boolean** | | +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**updatedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**pullRequest** | **Object** | Present when the issue is associated with a pull request | [optional] + + +## Enum: StateEnum +Name | Value +---- | ----- +OPEN | "open" +CLOSED | "closed" diff --git a/Java/docs/IssueAssignee.md b/Java/docs/IssueAssignee.md deleted file mode 100644 index aa2c3ce..0000000 --- a/Java/docs/IssueAssignee.md +++ /dev/null @@ -1,10 +0,0 @@ -# IssueAssignee - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Integer** | | [optional] -**login** | **String** | | [optional] -**fullName** | **String** | | [optional] -**avatarUrl** | **String** | | [optional] -**username** | **String** | | [optional] diff --git a/Java/docs/IssueLabels.md b/Java/docs/IssueLabels.md deleted file mode 100644 index a6f5719..0000000 --- a/Java/docs/IssueLabels.md +++ /dev/null @@ -1,9 +0,0 @@ -# IssueLabels - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Integer** | | [optional] -**name** | **String** | | [optional] -**color** | **String** | | [optional] -**url** | **String** | | [optional] diff --git a/Java/docs/IssueMilestone.md b/Java/docs/IssueMilestone.md deleted file mode 100644 index 7cb526e..0000000 --- a/Java/docs/IssueMilestone.md +++ /dev/null @@ -1,13 +0,0 @@ -# IssueMilestone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Integer** | | [optional] -**title** | **String** | | [optional] -**description** | **String** | | [optional] -**state** | **String** | | [optional] -**openIssues** | **Integer** | | [optional] -**closedIssues** | **Integer** | | [optional] -**closedAt** | **String** | | [optional] -**dueOn** | **String** | | [optional] diff --git a/Java/docs/IssuesApi.md b/Java/docs/IssuesApi.md deleted file mode 100644 index e2e1ed9..0000000 --- a/Java/docs/IssuesApi.md +++ /dev/null @@ -1,259 +0,0 @@ -# IssuesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createIssue**](IssuesApi.md#createIssue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -[**editIssue**](IssuesApi.md#editIssue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -[**getIssue**](IssuesApi.md#getIssue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -[**listRepoIssues**](IssuesApi.md#listRepoIssues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository - - -# **createIssue** -> Issue createIssue(owner, repo, body) - -Create an issue - -Any user with read access to a repository can create an issue. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.IssuesApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -IssuesApi apiInstance = new IssuesApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -PostIssue body = new PostIssue(); // PostIssue | -try { - Issue result = apiInstance.createIssue(owner, repo, body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling IssuesApi#createIssue"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **body** | [**PostIssue**](PostIssue.md)| | [optional] - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **editIssue** -> Issue editIssue(owner, repo, body) - -Edit an issue - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.IssuesApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -IssuesApi apiInstance = new IssuesApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -PatchIssue body = new PatchIssue(); // PatchIssue | -try { - Issue result = apiInstance.editIssue(owner, repo, body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling IssuesApi#editIssue"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **body** | [**PatchIssue**](PatchIssue.md)| | [optional] - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **getIssue** -> Issue getIssue(owner, repo, index) - -Get a single issue - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.IssuesApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -IssuesApi apiInstance = new IssuesApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -Integer index = 56; // Integer | the index of an issue or a pull request -try { - Issue result = apiInstance.getIssue(owner, repo, index); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling IssuesApi#getIssue"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **index** | **Integer**| the index of an issue or a pull request | - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **listRepoIssues** -> Issues listRepoIssues(owner, repo) - -List issues for a repository - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.IssuesApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -IssuesApi apiInstance = new IssuesApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -try { - Issues result = apiInstance.listRepoIssues(owner, repo); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling IssuesApi#listRepoIssues"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -[**Issues**](Issues.md) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Java/docs/MigrateRepo.md b/Java/docs/MigrateRepo.md deleted file mode 100644 index c677651..0000000 --- a/Java/docs/MigrateRepo.md +++ /dev/null @@ -1,20 +0,0 @@ -# MigrateRepo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cloneAddr** | **String** | Remote Git address (HTTP/HTTPS URL or local path) | -**authUsername** | **String** | Authorization username | [optional] -**authPassword** | **String** | Authorization password | [optional] -**userId** | **Integer** | User ID who takes ownership of this repository | -**repoName** | **String** | Name of the repository | [optional] -**mirror** | **Boolean** | Repository will be a mirror (connected repository). | [optional] -**visibility** | [**VisibilityEnum**](#VisibilityEnum) | Repository will be private or public. | [optional] -**description** | **String** | Description of the repository | [optional] - - -## Enum: VisibilityEnum -Name | Value ----- | ----- -PRIVATE | "private" -PUBLIC | "public" diff --git a/Java/docs/PatchIssue.md b/Java/docs/PatchIssue.md index 8c0aff1..d8671cf 100644 --- a/Java/docs/PatchIssue.md +++ b/Java/docs/PatchIssue.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **String** | | [optional] -**body** | **String** | | [optional] -**assignee** | **String** | | [optional] -**milestone** | **Integer** | | [optional] -**state** | [**State**](State.md) | | [optional] +**title** | [**ComponentsschemasTitleYaml**](ComponentsschemasTitleYaml.md) | | [optional] +**body** | [**ComponentsschemasBodyYaml**](ComponentsschemasBodyYaml.md) | | [optional] +**assignee** | [**ComponentsschemasAssigneeYaml**](ComponentsschemasAssigneeYaml.md) | | [optional] +**milestone** | [**ComponentsschemasMilestoneYaml**](ComponentsschemasMilestoneYaml.md) | | [optional] +**state** | [**ComponentsschemasStateYaml**](ComponentsschemasStateYaml.md) | | [optional] diff --git a/Java/docs/PostIssue.md b/Java/docs/PostIssue.md index 58a4bdc..f880d6f 100644 --- a/Java/docs/PostIssue.md +++ b/Java/docs/PostIssue.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **String** | | [optional] -**body** | **String** | | [optional] -**assignee** | **String** | | [optional] -**milestone** | **Integer** | | [optional] -**labels** | [**Labels**](Labels.md) | | [optional] -**closed** | **Boolean** | | [optional] +**title** | [**ComponentsschemasTitleYaml**](ComponentsschemasTitleYaml.md) | | [optional] +**body** | [**ComponentsschemasBodyYaml**](ComponentsschemasBodyYaml.md) | | [optional] +**assignee** | [**ComponentsschemasAssigneeYaml**](ComponentsschemasAssigneeYaml.md) | | [optional] +**milestone** | [**ComponentsschemasMilestoneYaml**](ComponentsschemasMilestoneYaml.md) | | [optional] +**labels** | [**ComponentsschemasLabelsYaml**](ComponentsschemasLabelsYaml.md) | | [optional] +**closed** | [**ComponentsschemasClosedYaml**](ComponentsschemasClosedYaml.md) | | [optional] diff --git a/Java/docs/ReleasesApi.md b/Java/docs/ReleasesApi.md deleted file mode 100644 index 0337419..0000000 --- a/Java/docs/ReleasesApi.md +++ /dev/null @@ -1,66 +0,0 @@ -# ReleasesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**listReleases**](ReleasesApi.md#listReleases) | **GET** /repos/{owner}/{repo}/releases | List Releases - - -# **listReleases** -> listReleases(owner, repo) - -List Releases - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.ReleasesApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -ReleasesApi apiInstance = new ReleasesApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -try { - apiInstance.listReleases(owner, repo); -} catch (ApiException e) { - System.err.println("Exception when calling ReleasesApi#listReleases"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Java/docs/RepoHooksBody.md b/Java/docs/RepoHooksBody.md deleted file mode 100644 index ecbe1bd..0000000 --- a/Java/docs/RepoHooksBody.md +++ /dev/null @@ -1,17 +0,0 @@ -# RepoHooksBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**TypeEnum**](#TypeEnum) | The type of webhook | -**config** | [**WebhookConfig**](WebhookConfig.md) | | -**events** | [**WebhookEvents**](WebhookEvents.md) | | [optional] - - -## Enum: TypeEnum -Name | Value ----- | ----- -DAGSHUB | "dagshub" -SLACK | "slack" -DISCORD | "discord" -DINGTALK | "dingtalk" diff --git a/Java/docs/RepositoryApi.md b/Java/docs/RepositoryApi.md deleted file mode 100644 index 15bbf7b..0000000 --- a/Java/docs/RepositoryApi.md +++ /dev/null @@ -1,483 +0,0 @@ -# RepositoryApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createOrgRepo**](RepositoryApi.md#createOrgRepo) | **POST** /org/{orgname}/repos | Create in organization -[**createRepo**](RepositoryApi.md#createRepo) | **POST** /user/repos | Create -[**getRepo**](RepositoryApi.md#getRepo) | **GET** /repos/{owner}/{repo} | Get repository information -[**listMyRepos**](RepositoryApi.md#listMyRepos) | **GET** /user/repos | List your repositories -[**listOrgRepos**](RepositoryApi.md#listOrgRepos) | **GET** /orgs/{orgname}/repos | List organization repositories -[**listUserRepos**](RepositoryApi.md#listUserRepos) | **GET** /users/{username}/repos | List user repositories -[**migrateRepo**](RepositoryApi.md#migrateRepo) | **POST** /repos/migrate | Migrate repository -[**search**](RepositoryApi.md#search) | **GET** /repos/search | Search repositories - - -# **createOrgRepo** -> createOrgRepo(orgname, body) - -Create in organization - -Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.RepositoryApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -RepositoryApi apiInstance = new RepositoryApi(); -String orgname = "orgname_example"; // String | A DagsHub organization name -CreateRepo body = new CreateRepo(); // CreateRepo | -try { - apiInstance.createOrgRepo(orgname, body); -} catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#createOrgRepo"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgname** | **String**| A DagsHub organization name | - **body** | [**CreateRepo**](CreateRepo.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **createRepo** -> createRepo(body) - -Create - -Create a new repository for the authenticated user. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.RepositoryApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -RepositoryApi apiInstance = new RepositoryApi(); -CreateRepo body = new CreateRepo(); // CreateRepo | -try { - apiInstance.createRepo(body); -} catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#createRepo"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateRepo**](CreateRepo.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **getRepo** -> getRepo(owner, repo) - -Get repository information - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.RepositoryApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -RepositoryApi apiInstance = new RepositoryApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -try { - apiInstance.getRepo(owner, repo); -} catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#getRepo"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **listMyRepos** -> Object listMyRepos() - -List your repositories - -List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.RepositoryApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -RepositoryApi apiInstance = new RepositoryApi(); -try { - Object result = apiInstance.listMyRepos(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#listMyRepos"); - e.printStackTrace(); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**Object** - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **listOrgRepos** -> listOrgRepos(orgname) - -List organization repositories - -List repositories that are accessible to the authenticated user. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.RepositoryApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -RepositoryApi apiInstance = new RepositoryApi(); -String orgname = "orgname_example"; // String | A DagsHub organization name -try { - apiInstance.listOrgRepos(orgname); -} catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#listOrgRepos"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgname** | **String**| A DagsHub organization name | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **listUserRepos** -> listUserRepos(username) - -List user repositories - -List public repositories for the specified user. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.RepositoryApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -RepositoryApi apiInstance = new RepositoryApi(); -String username = "username_example"; // String | A DagsHub username or organization name -try { - apiInstance.listUserRepos(username); -} catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#listUserRepos"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| A DagsHub username or organization name | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **migrateRepo** -> migrateRepo(body) - -Migrate repository - -Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.RepositoryApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -RepositoryApi apiInstance = new RepositoryApi(); -MigrateRepo body = new MigrateRepo(); // MigrateRepo | -try { - apiInstance.migrateRepo(body); -} catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#migrateRepo"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**MigrateRepo**](MigrateRepo.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **search** -> Object search(q, uid, limit, page) - -Search repositories - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.RepositoryApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -RepositoryApi apiInstance = new RepositoryApi(); -String q = "q_example"; // String | -Integer uid = 0; // Integer | User ID to specify search whose repositories. Default is 0 and search all repositories -Integer limit = 10; // Integer | Maximum number of repositories in search results. -Integer page = 1; // Integer | Page number. Default is 1. -try { - Object result = apiInstance.search(q, uid, limit, page); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#search"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **q** | **String**| | - **uid** | **Integer**| User ID to specify search whose repositories. Default is 0 and search all repositories | [optional] [default to 0] - **limit** | **Integer**| Maximum number of repositories in search results. | [optional] [default to 10] - **page** | **Integer**| Page number. Default is 1. | [optional] [default to 1] - -### Return type - -**Object** - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Java/docs/State.md b/Java/docs/State.md deleted file mode 100644 index cc54f47..0000000 --- a/Java/docs/State.md +++ /dev/null @@ -1,6 +0,0 @@ -# State - -## Enum - -* `OPEN` (value: `"open"`) -* `CLOSED` (value: `"closed"`) diff --git a/Java/docs/StorageIntegrationsApi.md b/Java/docs/StorageIntegrationsApi.md deleted file mode 100644 index a30f866..0000000 --- a/Java/docs/StorageIntegrationsApi.md +++ /dev/null @@ -1,204 +0,0 @@ -# StorageIntegrationsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getBucketContent**](StorageIntegrationsApi.md#getBucketContent) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -[**getBucketFile**](StorageIntegrationsApi.md#getBucketFile) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -[**getBuckets**](StorageIntegrationsApi.md#getBuckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository - - -# **getBucketContent** -> Files1 getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken) - -List contents in the path - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.StorageIntegrationsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -StorageIntegrationsApi apiInstance = new StorageIntegrationsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String protocol = "protocol_example"; // String | protocol of the storage integration -String bucket = "bucket_example"; // String | name and prefix of the bucket integration -String path = "path_example"; // String | path of a folder in the repository -Boolean includeSize = false; // Boolean | -Integer limit = 100; // Integer | Maximum amount of items to return -String fromToken = "fromToken_example"; // String | Token, from which to continue iteration -try { - Files1 result = apiInstance.getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StorageIntegrationsApi#getBucketContent"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **protocol** | **String**| protocol of the storage integration | [enum: gs, s3] - **bucket** | **String**| name and prefix of the bucket integration | - **path** | **String**| path of a folder in the repository | - **includeSize** | **Boolean**| | [optional] [default to false] - **limit** | **Integer**| Maximum amount of items to return | [optional] [default to 100] - **fromToken** | **String**| Token, from which to continue iteration | [optional] - -### Return type - -[**Files1**](Files1.md) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **getBucketFile** -> getBucketFile(owner, repo, protocol, bucket, path) - -Get file in the bucket - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.StorageIntegrationsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -StorageIntegrationsApi apiInstance = new StorageIntegrationsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -String protocol = "protocol_example"; // String | protocol of the storage integration -String bucket = "bucket_example"; // String | name and prefix of the bucket integration -String path = "path_example"; // String | The content path -try { - apiInstance.getBucketFile(owner, repo, protocol, bucket, path); -} catch (ApiException e) { - System.err.println("Exception when calling StorageIntegrationsApi#getBucketFile"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **protocol** | **String**| protocol of the storage integration | [enum: gs, s3] - **bucket** | **String**| name and prefix of the bucket integration | - **path** | **String**| The content path | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **getBuckets** -> Integration getBuckets(owner, repo) - -List integrated storages in the repository - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.StorageIntegrationsApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -StorageIntegrationsApi apiInstance = new StorageIntegrationsApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -try { - Integration result = apiInstance.getBuckets(owner, repo); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling StorageIntegrationsApi#getBuckets"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -[**Integration**](Integration.md) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Java/docs/User.md b/Java/docs/User.md index 6fa953e..b8521c6 100644 --- a/Java/docs/User.md +++ b/Java/docs/User.md @@ -3,8 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **Integer** | | [optional] +**id** | **Long** | | [optional] **login** | **String** | | [optional] +**username** | **String** | Alias for login (legacy compatibility) | [optional] **fullName** | **String** | | [optional] **avatarUrl** | **String** | | [optional] -**username** | **String** | | [optional] +**publicEmail** | **String** | | [optional] +**website** | **String** | | [optional] +**company** | **String** | | [optional] +**description** | **String** | | [optional] diff --git a/Java/docs/UserApi.md b/Java/docs/UserApi.md deleted file mode 100644 index ae30d4c..0000000 --- a/Java/docs/UserApi.md +++ /dev/null @@ -1,117 +0,0 @@ -# UserApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getAuthenticatedUser**](UserApi.md#getAuthenticatedUser) | **GET** /user | Get authenticated user information -[**getUser**](UserApi.md#getUser) | **GET** /users/{username} | Get information about a user - - -# **getAuthenticatedUser** -> getAuthenticatedUser() - -Get authenticated user information - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.UserApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -UserApi apiInstance = new UserApi(); -try { - apiInstance.getAuthenticatedUser(); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getAuthenticatedUser"); - e.printStackTrace(); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **getUser** -> getUser(username) - -Get information about a user - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.UserApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -UserApi apiInstance = new UserApi(); -String username = "username_example"; // String | A DagsHub username or organization name -try { - apiInstance.getUser(username); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUser"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| A DagsHub username or organization name | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Java/docs/WebhookConfig.md b/Java/docs/WebhookConfig.md deleted file mode 100644 index 690fe3d..0000000 --- a/Java/docs/WebhookConfig.md +++ /dev/null @@ -1,15 +0,0 @@ -# WebhookConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **String** | A string defining the URL to which the payloads will be delivered. | -**contentType** | [**ContentTypeEnum**](#ContentTypeEnum) | A string defining the media type used to serialize the payloads. | -**secret** | **String** | An optional string that's passed with the HTTP requests body. | [optional] - - -## Enum: ContentTypeEnum -Name | Value ----- | ----- -JSON | "json" -FORM | "form" diff --git a/Java/docs/WebhooksApi.md b/Java/docs/WebhooksApi.md deleted file mode 100644 index 4df6c71..0000000 --- a/Java/docs/WebhooksApi.md +++ /dev/null @@ -1,251 +0,0 @@ -# WebhooksApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createHook**](WebhooksApi.md#createHook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -[**deleteHook**](WebhooksApi.md#deleteHook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -[**editHook**](WebhooksApi.md#editHook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -[**listHooks**](WebhooksApi.md#listHooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - - -# **createHook** -> createHook(owner, repo, body) - -Create a hook - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.WebhooksApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -WebhooksApi apiInstance = new WebhooksApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -RepoHooksBody body = new RepoHooksBody(); // RepoHooksBody | -try { - apiInstance.createHook(owner, repo, body); -} catch (ApiException e) { - System.err.println("Exception when calling WebhooksApi#createHook"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **body** | [**RepoHooksBody**](RepoHooksBody.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **deleteHook** -> deleteHook(owner, repo, id) - -Delete a hook - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.WebhooksApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -WebhooksApi apiInstance = new WebhooksApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -Integer id = 56; // Integer | -try { - apiInstance.deleteHook(owner, repo, id); -} catch (ApiException e) { - System.err.println("Exception when calling WebhooksApi#deleteHook"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **id** | **Integer**| | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **editHook** -> editHook(owner, repo, id, body) - -Edit a hook - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.WebhooksApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -WebhooksApi apiInstance = new WebhooksApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -Integer id = 56; // Integer | -HooksIdBody body = new HooksIdBody(); // HooksIdBody | -try { - apiInstance.editHook(owner, repo, id, body); -} catch (ApiException e) { - System.err.println("Exception when calling WebhooksApi#editHook"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **id** | **Integer**| | - **body** | [**HooksIdBody**](HooksIdBody.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **listHooks** -> listHooks(owner, repo) - -List hooks - -### Example -```java -// Import classes: -//import io.swagger.client.ApiClient; -//import io.swagger.client.ApiException; -//import io.swagger.client.Configuration; -//import io.swagger.client.auth.*; -//import io.swagger.client.api.WebhooksApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); -// Configure HTTP basic authorization: basicAuth -HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); -basicAuth.setUsername("YOUR USERNAME"); -basicAuth.setPassword("YOUR PASSWORD"); - -// Configure API key authorization: tokenAuth -ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); -tokenAuth.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.setApiKeyPrefix("Token"); - -WebhooksApi apiInstance = new WebhooksApi(); -String owner = "owner_example"; // String | owner of the repository -String repo = "repo_example"; // String | name of the repository -try { - apiInstance.listHooks(owner, repo); -} catch (ApiException e) { - System.err.println("Exception when calling WebhooksApi#listHooks"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Java/git_push.sh b/Java/git_push.sh deleted file mode 100644 index 7a8742a..0000000 --- a/Java/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="DagsHub" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="api-clients" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/Java/gradle.properties b/Java/gradle.properties deleted file mode 100644 index 05644f0..0000000 --- a/Java/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -# Uncomment to build for Android -#target = android \ No newline at end of file diff --git a/Java/gradle/wrapper/gradle-wrapper.jar b/Java/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 2c6137b..0000000 Binary files a/Java/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/Java/gradle/wrapper/gradle-wrapper.properties b/Java/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index b7a3647..0000000 --- a/Java/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue May 17 23:08:05 CST 2016 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip diff --git a/Java/gradlew b/Java/gradlew deleted file mode 100644 index 9d82f78..0000000 --- a/Java/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/Java/gradlew.bat b/Java/gradlew.bat deleted file mode 100644 index 5f19212..0000000 --- a/Java/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/Java/pom.xml b/Java/pom.xml deleted file mode 100644 index c53d771..0000000 --- a/Java/pom.xml +++ /dev/null @@ -1,223 +0,0 @@ - - 4.0.0 - io.swagger - swagger-java-client - jar - swagger-java-client - 1.0.0 - https://github.com/swagger-api/swagger-codegen - Swagger Java - - scm:git:git@github.com:swagger-api/swagger-codegen.git - scm:git:git@github.com:swagger-api/swagger-codegen.git - https://github.com/swagger-api/swagger-codegen - - - 2.2.0 - - - - - Unlicense - http://unlicense.org - repo - - - - - - Swagger - apiteam@swagger.io - Swagger - http://swagger.io - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.2.0 - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - - - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} - - - com.squareup.okhttp - okhttp - ${okhttp-version} - - - com.squareup.okhttp - logging-interceptor - ${okhttp-version} - - - com.google.code.gson - gson - ${gson-version} - - - io.gsonfire - gson-fire - ${gson-fire-version} - - - org.threeten - threetenbp - ${threetenbp-version} - - - - junit - junit - ${junit-version} - test - - - - 1.7 - ${java.version} - ${java.version} - 2.0.0 - 2.7.5 - 2.8.1 - 1.8.3 - 1.3.5 - 1.0.0 - 4.13.1 - UTF-8 - - diff --git a/Java/settings.gradle b/Java/settings.gradle deleted file mode 100644 index 55640f7..0000000 --- a/Java/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "swagger-java-client" \ No newline at end of file diff --git a/Java/src/main/AndroidManifest.xml b/Java/src/main/AndroidManifest.xml deleted file mode 100644 index 465dcb5..0000000 --- a/Java/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Java/src/main/java/io/swagger/client/ApiCallback.java b/Java/src/main/java/io/swagger/client/ApiCallback.java deleted file mode 100644 index 03ad833..0000000 --- a/Java/src/main/java/io/swagger/client/ApiCallback.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -import java.io.IOException; - -import java.util.Map; -import java.util.List; - -/** - * Callback for asynchronous API call. - * - * @param The return type - */ -public interface ApiCallback { - /** - * This is called when the API call fails. - * - * @param e The exception causing the failure - * @param statusCode Status code of the response if available, otherwise it would be 0 - * @param responseHeaders Headers of the response if available, otherwise it would be null - */ - void onFailure(ApiException e, int statusCode, Map> responseHeaders); - - /** - * This is called when the API call succeeded. - * - * @param result The result deserialized from response - * @param statusCode Status code of the response - * @param responseHeaders Headers of the response - */ - void onSuccess(T result, int statusCode, Map> responseHeaders); - - /** - * This is called when the API upload processing. - * - * @param bytesWritten bytes Written - * @param contentLength content length of request body - * @param done write end - */ - void onUploadProgress(long bytesWritten, long contentLength, boolean done); - - /** - * This is called when the API downlond processing. - * - * @param bytesRead bytes Read - * @param contentLength content lenngth of the response - * @param done Read end - */ - void onDownloadProgress(long bytesRead, long contentLength, boolean done); -} diff --git a/Java/src/main/java/io/swagger/client/ApiClient.java b/Java/src/main/java/io/swagger/client/ApiClient.java deleted file mode 100644 index d15f06f..0000000 --- a/Java/src/main/java/io/swagger/client/ApiClient.java +++ /dev/null @@ -1,1207 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -import com.squareup.okhttp.*; -import com.squareup.okhttp.internal.http.HttpMethod; -import com.squareup.okhttp.logging.HttpLoggingInterceptor; -import com.squareup.okhttp.logging.HttpLoggingInterceptor.Level; -import okio.BufferedSink; -import okio.Okio; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.format.DateTimeFormatter; - -import javax.net.ssl.*; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.lang.reflect.Type; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.text.DateFormat; -import java.util.*; -import java.util.Map.Entry; -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import io.swagger.client.auth.Authentication; -import io.swagger.client.auth.HttpBasicAuth; -import io.swagger.client.auth.ApiKeyAuth; -import io.swagger.client.auth.OAuth; - -public class ApiClient { - - private String basePath = "https://dagshub.com/api/v1"; - private boolean debugging = false; - private Map defaultHeaderMap = new HashMap(); - private String tempFolderPath = null; - - private Map authentications; - - private DateFormat dateFormat; - private DateFormat datetimeFormat; - private boolean lenientDatetimeFormat; - private int dateLength; - - private InputStream sslCaCert; - private boolean verifyingSsl; - private KeyManager[] keyManagers; - - private OkHttpClient httpClient; - private JSON json; - - private HttpLoggingInterceptor loggingInterceptor; - - /* - * Constructor for ApiClient - */ - public ApiClient() { - httpClient = new OkHttpClient(); - - - verifyingSsl = true; - - json = new JSON(); - - // Set default User-Agent. - setUserAgent("Swagger-Codegen/1.0.0/java"); - - // Setup authentications (key: authentication name, value: authentication). - authentications = new HashMap(); - authentications.put("basicAuth", new HttpBasicAuth()); - authentications.put("tokenAuth", new ApiKeyAuth("query", "token")); - // Prevent the authentications from being modified. - authentications = Collections.unmodifiableMap(authentications); - } - - /** - * Get base path - * - * @return Baes path - */ - public String getBasePath() { - return basePath; - } - - /** - * Set base path - * - * @param basePath Base path of the URL (e.g https://dagshub.com/api/v1 - * @return An instance of OkHttpClient - */ - public ApiClient setBasePath(String basePath) { - this.basePath = basePath; - return this; - } - - /** - * Get HTTP client - * - * @return An instance of OkHttpClient - */ - public OkHttpClient getHttpClient() { - return httpClient; - } - - /** - * Set HTTP client - * - * @param httpClient An instance of OkHttpClient - * @return Api Client - */ - public ApiClient setHttpClient(OkHttpClient httpClient) { - this.httpClient = httpClient; - return this; - } - - /** - * Get JSON - * - * @return JSON object - */ - public JSON getJSON() { - return json; - } - - /** - * Set JSON - * - * @param json JSON object - * @return Api client - */ - public ApiClient setJSON(JSON json) { - this.json = json; - return this; - } - - /** - * True if isVerifyingSsl flag is on - * - * @return True if isVerifySsl flag is on - */ - public boolean isVerifyingSsl() { - return verifyingSsl; - } - - /** - * Configure whether to verify certificate and hostname when making https requests. - * Default to true. - * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. - * - * @param verifyingSsl True to verify TLS/SSL connection - * @return ApiClient - */ - public ApiClient setVerifyingSsl(boolean verifyingSsl) { - this.verifyingSsl = verifyingSsl; - applySslSettings(); - return this; - } - - /** - * Get SSL CA cert. - * - * @return Input stream to the SSL CA cert - */ - public InputStream getSslCaCert() { - return sslCaCert; - } - - /** - * Configure the CA certificate to be trusted when making https requests. - * Use null to reset to default. - * - * @param sslCaCert input stream for SSL CA cert - * @return ApiClient - */ - public ApiClient setSslCaCert(InputStream sslCaCert) { - this.sslCaCert = sslCaCert; - applySslSettings(); - return this; - } - - public KeyManager[] getKeyManagers() { - return keyManagers; - } - - /** - * Configure client keys to use for authorization in an SSL session. - * Use null to reset to default. - * - * @param managers The KeyManagers to use - * @return ApiClient - */ - public ApiClient setKeyManagers(KeyManager[] managers) { - this.keyManagers = managers; - applySslSettings(); - return this; - } - - public DateFormat getDateFormat() { - return dateFormat; - } - - public ApiClient setDateFormat(DateFormat dateFormat) { - this.json.setDateFormat(dateFormat); - return this; - } - - public ApiClient setSqlDateFormat(DateFormat dateFormat) { - this.json.setSqlDateFormat(dateFormat); - return this; - } - - public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - this.json.setOffsetDateTimeFormat(dateFormat); - return this; - } - - public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { - this.json.setLocalDateFormat(dateFormat); - return this; - } - - public ApiClient setLenientOnJson(boolean lenientOnJson) { - this.json.setLenientOnJson(lenientOnJson); - return this; - } - - /** - * Get authentications (key: authentication name, value: authentication). - * - * @return Map of authentication objects - */ - public Map getAuthentications() { - return authentications; - } - - /** - * Get authentication for the given name. - * - * @param authName The authentication name - * @return The authentication, null if not found - */ - public Authentication getAuthentication(String authName) { - return authentications.get(authName); - } - - /** - * Helper method to set username for the first HTTP basic authentication. - * - * @param username Username - */ - public void setUsername(String username) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setUsername(username); - return; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set password for the first HTTP basic authentication. - * - * @param password Password - */ - public void setPassword(String password) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setPassword(password); - return; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set API key value for the first API key authentication. - * - * @param apiKey API key - */ - public void setApiKey(String apiKey) { - for (Authentication auth : authentications.values()) { - if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKey(apiKey); - return; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set API key prefix for the first API key authentication. - * - * @param apiKeyPrefix API key prefix - */ - public void setApiKeyPrefix(String apiKeyPrefix) { - for (Authentication auth : authentications.values()) { - if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); - return; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set access token for the first OAuth2 authentication. - * - * @param accessToken Access token - */ - public void setAccessToken(String accessToken) { - for (Authentication auth : authentications.values()) { - if (auth instanceof OAuth) { - ((OAuth) auth).setAccessToken(accessToken); - return; - } - } - throw new RuntimeException("No OAuth2 authentication configured!"); - } - - /** - * Set the User-Agent header's value (by adding to the default header map). - * - * @param userAgent HTTP request's user agent - * @return ApiClient - */ - public ApiClient setUserAgent(String userAgent) { - addDefaultHeader("User-Agent", userAgent); - return this; - } - - /** - * Add a default header. - * - * @param key The header's key - * @param value The header's value - * @return ApiClient - */ - public ApiClient addDefaultHeader(String key, String value) { - defaultHeaderMap.put(key, value); - return this; - } - - /** - * Check that whether debugging is enabled for this API client. - * - * @return True if debugging is enabled, false otherwise. - */ - public boolean isDebugging() { - return debugging; - } - - /** - * Enable/disable debugging for this API client. - * - * @param debugging To enable (true) or disable (false) debugging - * @return ApiClient - */ - public ApiClient setDebugging(boolean debugging) { - if (debugging != this.debugging) { - if (debugging) { - loggingInterceptor = new HttpLoggingInterceptor(); - loggingInterceptor.setLevel(Level.BODY); - httpClient.interceptors().add(loggingInterceptor); - } else { - httpClient.interceptors().remove(loggingInterceptor); - loggingInterceptor = null; - } - } - this.debugging = debugging; - return this; - } - - /** - * The path of temporary folder used to store downloaded files from endpoints - * with file response. The default value is null, i.e. using - * the system's default tempopary folder. - * - * @see createTempFile - * @return Temporary folder path - */ - public String getTempFolderPath() { - return tempFolderPath; - } - - /** - * Set the temporary folder path (for downloading files) - * - * @param tempFolderPath Temporary folder path - * @return ApiClient - */ - public ApiClient setTempFolderPath(String tempFolderPath) { - this.tempFolderPath = tempFolderPath; - return this; - } - - /** - * Get connection timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getConnectTimeout() { - return httpClient.getConnectTimeout(); - } - - /** - * Sets the connect timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * - * @param connectionTimeout connection timeout in milliseconds - * @return Api client - */ - public ApiClient setConnectTimeout(int connectionTimeout) { - httpClient.setConnectTimeout(connectionTimeout, TimeUnit.MILLISECONDS); - return this; - } - - /** - * Get read timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getReadTimeout() { - return httpClient.getReadTimeout(); - } - - /** - * Sets the read timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link Integer#MAX_VALUE}. - * - * @param readTimeout read timeout in milliseconds - * @return Api client - */ - public ApiClient setReadTimeout(int readTimeout) { - httpClient.setReadTimeout(readTimeout, TimeUnit.MILLISECONDS); - return this; - } - - /** - * Get write timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getWriteTimeout() { - return httpClient.getWriteTimeout(); - } - - /** - * Sets the write timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link Integer#MAX_VALUE}. - * - * @param writeTimeout connection timeout in milliseconds - * @return Api client - */ - public ApiClient setWriteTimeout(int writeTimeout) { - httpClient.setWriteTimeout(writeTimeout, TimeUnit.MILLISECONDS); - return this; - } - - /** - * Format the given parameter object into string. - * - * @param param Parameter - * @return String representation of the parameter - */ - public String parameterToString(Object param) { - if (param == null) { - return ""; - } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { - //Serialize to json string and remove the " enclosing characters - String jsonStr = json.serialize(param); - return jsonStr.substring(1, jsonStr.length() - 1); - } else if (param instanceof Collection) { - StringBuilder b = new StringBuilder(); - for (Object o : (Collection)param) { - if (b.length() > 0) { - b.append(","); - } - b.append(String.valueOf(o)); - } - return b.toString(); - } else { - return String.valueOf(param); - } - } - - /** - * Formats the specified query parameter to a list containing a single {@code Pair} object. - * - * Note that {@code value} must not be a collection. - * - * @param name The name of the parameter. - * @param value The value of the parameter. - * @return A list containing a single {@code Pair} object. - */ - public List parameterToPair(String name, Object value) { - List params = new ArrayList(); - - // preconditions - if (name == null || name.isEmpty() || value == null || value instanceof Collection) return params; - - params.add(new Pair(name, parameterToString(value))); - return params; - } - - /** - * Formats the specified collection query parameters to a list of {@code Pair} objects. - * - * Note that the values of each of the returned Pair objects are percent-encoded. - * - * @param collectionFormat The collection format of the parameter. - * @param name The name of the parameter. - * @param value The value of the parameter. - * @return A list of {@code Pair} objects. - */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { - List params = new ArrayList(); - - // preconditions - if (name == null || name.isEmpty() || value == null || value.isEmpty()) { - return params; - } - - // create the params based on the collection format - if ("multi".equals(collectionFormat)) { - for (Object item : value) { - params.add(new Pair(name, escapeString(parameterToString(item)))); - } - return params; - } - - // collectionFormat is assumed to be "csv" by default - String delimiter = ","; - - // escape all delimiters except commas, which are URI reserved - // characters - if ("ssv".equals(collectionFormat)) { - delimiter = escapeString(" "); - } else if ("tsv".equals(collectionFormat)) { - delimiter = escapeString("\t"); - } else if ("pipes".equals(collectionFormat)) { - delimiter = escapeString("|"); - } - - StringBuilder sb = new StringBuilder() ; - for (Object item : value) { - sb.append(delimiter); - sb.append(escapeString(parameterToString(item))); - } - - params.add(new Pair(name, sb.substring(delimiter.length()))); - - return params; - } - - /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif - * - * @param filename The filename to be sanitized - * @return The sanitized filename - */ - public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * "* / *" is also default to JSON - * @param mime MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public boolean isJsonMime(String mime) { - String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; - return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); - } - - /** - * Select the Accept header's value from the given accepts array: - * if JSON exists in the given array, use it; - * otherwise use all of them (joining into a string) - * - * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, - * null will be returned (not to set the Accept header explicitly). - */ - public String selectHeaderAccept(String[] accepts) { - if (accepts.length == 0) { - return null; - } - for (String accept : accepts) { - if (isJsonMime(accept)) { - return accept; - } - } - return StringUtil.join(accepts, ","); - } - - /** - * Select the Content-Type header's value from the given array: - * if JSON exists in the given array, use it; - * otherwise use the first one of the array. - * - * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, - * or matches "any", JSON will be used. - */ - public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { - return "application/json"; - } - for (String contentType : contentTypes) { - if (isJsonMime(contentType)) { - return contentType; - } - } - return contentTypes[0]; - } - - /** - * Escape the given string to be used as URL query value. - * - * @param str String to be escaped - * @return Escaped string - */ - public String escapeString(String str) { - try { - return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); - } catch (UnsupportedEncodingException e) { - return str; - } - } - - /** - * Deserialize response body to Java object, according to the return type and - * the Content-Type response header. - * - * @param Type - * @param response HTTP response - * @param returnType The type of the Java object - * @return The deserialized Java object - * @throws ApiException If fail to deserialize response body, i.e. cannot read response body - * or the Content-Type of the response is not supported. - */ - @SuppressWarnings("unchecked") - public T deserialize(Response response, Type returnType) throws ApiException { - if (response == null || returnType == null) { - return null; - } - - if ("byte[]".equals(returnType.toString())) { - // Handle binary response (byte array). - try { - return (T) response.body().bytes(); - } catch (IOException e) { - throw new ApiException(e); - } - } else if (returnType.equals(File.class)) { - // Handle file downloading. - return (T) downloadFileFromResponse(response); - } - - String respBody; - try { - if (response.body() != null) - respBody = response.body().string(); - else - respBody = null; - } catch (IOException e) { - throw new ApiException(e); - } - - if (respBody == null || "".equals(respBody)) { - return null; - } - - String contentType = response.headers().get("Content-Type"); - if (contentType == null) { - // ensuring a default content type - contentType = "application/json"; - } - if (isJsonMime(contentType)) { - return json.deserialize(respBody, returnType); - } else if (returnType.equals(String.class)) { - // Expecting string, return the raw response body. - return (T) respBody; - } else { - throw new ApiException( - "Content type \"" + contentType + "\" is not supported for type: " + returnType, - response.code(), - response.headers().toMultimap(), - respBody); - } - } - - /** - * Serialize the given Java object into request body according to the object's - * class and the request Content-Type. - * - * @param obj The Java object - * @param contentType The request Content-Type - * @return The serialized request body - * @throws ApiException If fail to serialize the given object - */ - public RequestBody serialize(Object obj, String contentType) throws ApiException { - if (obj instanceof byte[]) { - // Binary (byte array) body parameter support. - return RequestBody.create(MediaType.parse(contentType), (byte[]) obj); - } else if (obj instanceof File) { - // File body parameter support. - return RequestBody.create(MediaType.parse(contentType), (File) obj); - } else if (isJsonMime(contentType)) { - String content; - if (obj != null) { - content = json.serialize(obj); - } else { - content = null; - } - return RequestBody.create(MediaType.parse(contentType), content); - } else { - throw new ApiException("Content type \"" + contentType + "\" is not supported"); - } - } - - /** - * Download file from the given response. - * - * @param response An instance of the Response object - * @throws ApiException If fail to read file content from response and write to disk - * @return Downloaded file - */ - public File downloadFileFromResponse(Response response) throws ApiException { - try { - File file = prepareDownloadFile(response); - BufferedSink sink = Okio.buffer(Okio.sink(file)); - sink.writeAll(response.body().source()); - sink.close(); - return file; - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * Prepare file for download - * - * @param response An instance of the Response object - * @throws IOException If fail to prepare file for download - * @return Prepared file for the download - */ - public File prepareDownloadFile(Response response) throws IOException { - String filename = null; - String contentDisposition = response.header("Content-Disposition"); - if (contentDisposition != null && !"".equals(contentDisposition)) { - // Get filename from the Content-Disposition header. - Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); - Matcher matcher = pattern.matcher(contentDisposition); - if (matcher.find()) { - filename = sanitizeFilename(matcher.group(1)); - } - } - - String prefix = null; - String suffix = null; - if (filename == null) { - prefix = "download-"; - suffix = ""; - } else { - int pos = filename.lastIndexOf("."); - if (pos == -1) { - prefix = filename + "-"; - } else { - prefix = filename.substring(0, pos) + "-"; - suffix = filename.substring(pos); - } - // File.createTempFile requires the prefix to be at least three characters long - if (prefix.length() < 3) - prefix = "download-"; - } - - if (tempFolderPath == null) - return Files.createTempFile(prefix, suffix).toFile(); - else - return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); - } - - /** - * {@link #execute(Call, Type)} - * - * @param Type - * @param call An instance of the Call object - * @throws ApiException If fail to execute the call - * @return ApiResponse<T> - */ - public ApiResponse execute(Call call) throws ApiException { - return execute(call, null); - } - - /** - * Execute HTTP call and deserialize the HTTP response body into the given return type. - * - * @param returnType The return type used to deserialize HTTP response body - * @param The return type corresponding to (same with) returnType - * @param call Call - * @return ApiResponse object containing response status, headers and - * data, which is a Java object deserialized from response body and would be null - * when returnType is null. - * @throws ApiException If fail to execute the call - */ - public ApiResponse execute(Call call, Type returnType) throws ApiException { - try { - Response response = call.execute(); - T data = handleResponse(response, returnType); - return new ApiResponse(response.code(), response.headers().toMultimap(), data); - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * {@link #executeAsync(Call, Type, ApiCallback)} - * - * @param Type - * @param call An instance of the Call object - * @param callback ApiCallback<T> - */ - public void executeAsync(Call call, ApiCallback callback) { - executeAsync(call, null, callback); - } - - /** - * Execute HTTP call asynchronously. - * - * @see #execute(Call, Type) - * @param Type - * @param call The callback to be executed when the API call finishes - * @param returnType Return type - * @param callback ApiCallback - */ - @SuppressWarnings("unchecked") - public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { - call.enqueue(new Callback() { - @Override - public void onFailure(Request request, IOException e) { - callback.onFailure(new ApiException(e), 0, null); - } - - @Override - public void onResponse(Response response) throws IOException { - T result; - try { - result = (T) handleResponse(response, returnType); - } catch (ApiException e) { - callback.onFailure(e, response.code(), response.headers().toMultimap()); - return; - } - callback.onSuccess(result, response.code(), response.headers().toMultimap()); - } - }); - } - - /** - * Handle the given response, return the deserialized object when the response is successful. - * - * @param Type - * @param response Response - * @param returnType Return type - * @throws ApiException If the response has a unsuccessful status code or - * fail to deserialize the response body - * @return Type - */ - public T handleResponse(Response response, Type returnType) throws ApiException { - if (response.isSuccessful()) { - if (returnType == null || response.code() == 204) { - // returning null if the returnType is not defined, - // or the status code is 204 (No Content) - if (response.body() != null) { - try { - response.body().close(); - } catch (IOException e) { - throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); - } - } - return null; - } else { - return deserialize(response, returnType); - } - } else { - String respBody = null; - if (response.body() != null) { - try { - respBody = response.body().string(); - } catch (IOException e) { - throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); - } - } - throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); - } - } - - /** - * Build HTTP call with the given options. - * - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param formParams The form parameters - * @param authNames The authentications to apply - * @param progressRequestListener Progress request listener - * @return The HTTP call - * @throws ApiException If fail to serialize the request body object - */ - public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, progressRequestListener); - - return httpClient.newCall(request); - } - - /** - * Build an HTTP request with the given options. - * - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param formParams The form parameters - * @param authNames The authentications to apply - * @param progressRequestListener Progress request listener - * @return The HTTP request - * @throws ApiException If fail to serialize the request body object - */ - public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams); - - final String url = buildUrl(path, queryParams, collectionQueryParams); - final Request.Builder reqBuilder = new Request.Builder().url(url); - processHeaderParams(headerParams, reqBuilder); - - String contentType = (String) headerParams.get("Content-Type"); - // ensuring a default content type - if (contentType == null) { - contentType = "application/json"; - } - - RequestBody reqBody; - if (!HttpMethod.permitsRequestBody(method)) { - reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentType)) { - reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentType)) { - reqBody = buildRequestBodyMultipart(formParams); - } else if (body == null) { - if ("DELETE".equals(method)) { - // allow calling DELETE without sending a request body - reqBody = null; - } else { - // use an empty request body (for POST, PUT and PATCH) - reqBody = RequestBody.create(MediaType.parse(contentType), ""); - } - } else { - reqBody = serialize(body, contentType); - } - - Request request = null; - - if(progressRequestListener != null && reqBody != null) { - ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, progressRequestListener); - request = reqBuilder.method(method, progressRequestBody).build(); - } else { - request = reqBuilder.method(method, reqBody).build(); - } - - return request; - } - - /** - * Build full URL by concatenating base path, the given sub path and query parameters. - * - * @param path The sub path - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @return The full URL - */ - public String buildUrl(String path, List queryParams, List collectionQueryParams) { - final StringBuilder url = new StringBuilder(); - url.append(basePath).append(path); - - if (queryParams != null && !queryParams.isEmpty()) { - // support (constant) query string in `path`, e.g. "/posts?draft=1" - String prefix = path.contains("?") ? "&" : "?"; - for (Pair param : queryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - url.append(escapeString(param.getName())).append("=").append(escapeString(value)); - } - } - } - - if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { - String prefix = url.toString().contains("?") ? "&" : "?"; - for (Pair param : collectionQueryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - // collection query parameter value already escaped as part of parameterToPairs - url.append(escapeString(param.getName())).append("=").append(value); - } - } - } - - return url.toString(); - } - - /** - * Set header parameters to the request builder, including default headers. - * - * @param headerParams Header parameters in the ofrm of Map - * @param reqBuilder Reqeust.Builder - */ - public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { - for (Entry param : headerParams.entrySet()) { - reqBuilder.header(param.getKey(), parameterToString(param.getValue())); - } - for (Entry header : defaultHeaderMap.entrySet()) { - if (!headerParams.containsKey(header.getKey())) { - reqBuilder.header(header.getKey(), parameterToString(header.getValue())); - } - } - } - - /** - * Update query and header parameters based on authentication settings. - * - * @param authNames The authentications to apply - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { - for (String authName : authNames) { - Authentication auth = authentications.get(authName); - if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); - } - } - - /** - * Build a form-encoding request body with the given form parameters. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyFormEncoding(Map formParams) { - FormEncodingBuilder formBuilder = new FormEncodingBuilder(); - for (Entry param : formParams.entrySet()) { - formBuilder.add(param.getKey(), parameterToString(param.getValue())); - } - return formBuilder.build(); - } - - /** - * Build a multipart (file uploading) request body with the given form parameters, - * which could contain text fields and file fields. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyMultipart(Map formParams) { - MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM); - for (Entry param : formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\""); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(mediaType, file)); - } else { - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); - mpBuilder.addPart(partHeaders, RequestBody.create(null, parameterToString(param.getValue()))); - } - } - return mpBuilder.build(); - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - public String guessContentTypeFromFile(File file) { - String contentType = URLConnection.guessContentTypeFromName(file.getName()); - if (contentType == null) { - return "application/octet-stream"; - } else { - return contentType; - } - } - - /** - * Apply SSL related settings to httpClient according to the current values of - * verifyingSsl and sslCaCert. - */ - private void applySslSettings() { - try { - TrustManager[] trustManagers = null; - HostnameVerifier hostnameVerifier = null; - if (!verifyingSsl) { - TrustManager trustAll = new X509TrustManager() { - @Override - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {} - @Override - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {} - @Override - public X509Certificate[] getAcceptedIssuers() { return null; } - }; - SSLContext sslContext = SSLContext.getInstance("TLS"); - trustManagers = new TrustManager[]{ trustAll }; - hostnameVerifier = new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { return true; } - }; - } else if (sslCaCert != null) { - char[] password = null; // Any password will work. - CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = certificateFactory.generateCertificates(sslCaCert); - if (certificates.isEmpty()) { - throw new IllegalArgumentException("expected non-empty set of trusted certificates"); - } - KeyStore caKeyStore = newEmptyKeyStore(password); - int index = 0; - for (Certificate certificate : certificates) { - String certificateAlias = "ca" + Integer.toString(index++); - caKeyStore.setCertificateEntry(certificateAlias, certificate); - } - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - trustManagerFactory.init(caKeyStore); - trustManagers = trustManagerFactory.getTrustManagers(); - } - - if (keyManagers != null || trustManagers != null) { - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient.setSslSocketFactory(sslContext.getSocketFactory()); - } else { - httpClient.setSslSocketFactory(null); - } - httpClient.setHostnameVerifier(hostnameVerifier); - } catch (GeneralSecurityException e) { - throw new RuntimeException(e); - } - } - - private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { - try { - KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - keyStore.load(null, password); - return keyStore; - } catch (IOException e) { - throw new AssertionError(e); - } - } -} diff --git a/Java/src/main/java/io/swagger/client/ApiException.java b/Java/src/main/java/io/swagger/client/ApiException.java deleted file mode 100644 index cc9a223..0000000 --- a/Java/src/main/java/io/swagger/client/ApiException.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class ApiException extends Exception { - private int code = 0; - private Map> responseHeaders = null; - private String responseBody = null; - - public ApiException() {} - - public ApiException(Throwable throwable) { - super(throwable); - } - - public ApiException(String message) { - super(message); - } - - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { - super(message, throwable); - this.code = code; - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - public ApiException(String message, int code, Map> responseHeaders, String responseBody) { - this(message, (Throwable) null, code, responseHeaders, responseBody); - } - - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { - this(message, throwable, code, responseHeaders, null); - } - - public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); - } - - public ApiException(int code, String message) { - super(message); - this.code = code; - } - - public ApiException(int code, String message, Map> responseHeaders, String responseBody) { - this(code, message); - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - * Get the HTTP status code. - * - * @return HTTP status code - */ - public int getCode() { - return code; - } - - /** - * Get the HTTP response headers. - * - * @return A map of list of string - */ - public Map> getResponseHeaders() { - return responseHeaders; - } - - /** - * Get the HTTP response body. - * - * @return Response body in the form of string - */ - public String getResponseBody() { - return responseBody; - } -} diff --git a/Java/src/main/java/io/swagger/client/ApiResponse.java b/Java/src/main/java/io/swagger/client/ApiResponse.java deleted file mode 100644 index 5f226e0..0000000 --- a/Java/src/main/java/io/swagger/client/ApiResponse.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -import java.util.List; -import java.util.Map; - -/** - * API response returned by API call. - * - * @param The type of data that is deserialized from response body - */ -public class ApiResponse { - final private int statusCode; - final private Map> headers; - final private T data; - - /** - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - */ - public ApiResponse(int statusCode, Map> headers) { - this(statusCode, headers, null); - } - - /** - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - * @param data The object deserialized from response bod - */ - public ApiResponse(int statusCode, Map> headers, T data) { - this.statusCode = statusCode; - this.headers = headers; - this.data = data; - } - - public int getStatusCode() { - return statusCode; - } - - public Map> getHeaders() { - return headers; - } - - public T getData() { - return data; - } -} diff --git a/Java/src/main/java/io/swagger/client/Configuration.java b/Java/src/main/java/io/swagger/client/Configuration.java deleted file mode 100644 index dc464fa..0000000 --- a/Java/src/main/java/io/swagger/client/Configuration.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class Configuration { - private static ApiClient defaultApiClient = new ApiClient(); - - /** - * Get the default API client, which would be used when creating API - * instances without providing an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - return defaultApiClient; - } - - /** - * Set the default API client, which would be used when creating API - * instances without providing an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient = apiClient; - } -} diff --git a/Java/src/main/java/io/swagger/client/GzipRequestInterceptor.java b/Java/src/main/java/io/swagger/client/GzipRequestInterceptor.java deleted file mode 100644 index 6f6e1b9..0000000 --- a/Java/src/main/java/io/swagger/client/GzipRequestInterceptor.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -import com.squareup.okhttp.*; -import okio.Buffer; -import okio.BufferedSink; -import okio.GzipSink; -import okio.Okio; - -import java.io.IOException; - -/** - * Encodes request bodies using gzip. - * - * Taken from https://github.com/square/okhttp/issues/350 - */ -class GzipRequestInterceptor implements Interceptor { - @Override public Response intercept(Chain chain) throws IOException { - Request originalRequest = chain.request(); - if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { - return chain.proceed(originalRequest); - } - - Request compressedRequest = originalRequest.newBuilder() - .header("Content-Encoding", "gzip") - .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) - .build(); - return chain.proceed(compressedRequest); - } - - private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return new RequestBody() { - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() { - return buffer.size(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - sink.write(buffer.snapshot()); - } - }; - } - - private RequestBody gzip(final RequestBody body) { - return new RequestBody() { - @Override public MediaType contentType() { - return body.contentType(); - } - - @Override public long contentLength() { - return -1; // We don't know the compressed length in advance! - } - - @Override public void writeTo(BufferedSink sink) throws IOException { - BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); - body.writeTo(gzipSink); - gzipSink.close(); - } - }; - } -} \ No newline at end of file diff --git a/Java/src/main/java/io/swagger/client/JSON.java b/Java/src/main/java/io/swagger/client/JSON.java deleted file mode 100644 index 8b1f872..0000000 --- a/Java/src/main/java/io/swagger/client/JSON.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import io.gsonfire.GsonFireBuilder; -import io.gsonfire.PostProcessor; -import io.gsonfire.TypeSelector; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.format.DateTimeFormatter; - -import io.swagger.client.model.*; - -import java.io.IOException; -import java.io.StringReader; -import java.lang.reflect.Type; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.ParsePosition; -import java.util.Date; -import java.util.Map; -import java.util.HashMap; - -public class JSON { - private Gson gson; - private boolean isLenientOnJson = false; - private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder() - ; - return fireBuilder.createGsonBuilder(); - } - - private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if(null == element) { - throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); - } - return element.getAsString(); - } - - private static Class getClassByDiscriminator(Map> classByDiscriminatorValue, String discriminatorValue) { - Class clazz = classByDiscriminatorValue.get(discriminatorValue.toUpperCase()); - if(null == clazz) { - throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); - } - return clazz; - } - - public JSON() { - gson = createGson() - .registerTypeAdapter(Date.class, dateTypeAdapter) - .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) - .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) - .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) - .create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - * @return JSON - */ - public JSON setGson(Gson gson) { - this.gson = gson; - return this; - } - - public JSON setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - return this; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. - * - * @param Type - * @param body The JSON string - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public T deserialize(String body, Type returnType) { - try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(body, returnType); - } - } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) - return (T) body; - else throw (e); - } - } - - /** - * Gson TypeAdapter for JSR310 OffsetDateTime type - */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); - } - - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length()-5) + "Z"; - } - return OffsetDateTime.parse(date, formatter); - } - } - } - - /** - * Gson TypeAdapter for JSR310 LocalDate type - */ - public class LocalDateTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); - } - - public LocalDateTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } - } - } - - public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - return this; - } - - public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - return this; - } - - /** - * Gson TypeAdapter for java.sql.Date type - * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used - * (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public SqlDateTypeAdapter() { - } - - public SqlDateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); - } - } - - @Override - public java.sql.Date read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); - } - return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } - } - - /** - * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. - */ - public static class DateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public DateTypeAdapter() { - } - - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = ISO8601Utils.format(date, true); - } - out.value(value); - } - } - - @Override - public Date read(JsonReader in) throws IOException { - try { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return ISO8601Utils.parse(date, new ParsePosition(0)); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } catch (IllegalArgumentException e) { - throw new JsonParseException(e); - } - } - } - - public JSON setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - return this; - } - - public JSON setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - return this; - } - -} diff --git a/Java/src/main/java/io/swagger/client/Pair.java b/Java/src/main/java/io/swagger/client/Pair.java deleted file mode 100644 index 2ae6d79..0000000 --- a/Java/src/main/java/io/swagger/client/Pair.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class Pair { - private String name = ""; - private String value = ""; - - public Pair (String name, String value) { - setName(name); - setValue(value); - } - - private void setName(String name) { - if (!isValidString(name)) return; - - this.name = name; - } - - private void setValue(String value) { - if (!isValidString(value)) return; - - this.value = value; - } - - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) return false; - if (arg.trim().isEmpty()) return false; - - return true; - } -} diff --git a/Java/src/main/java/io/swagger/client/ProgressRequestBody.java b/Java/src/main/java/io/swagger/client/ProgressRequestBody.java deleted file mode 100644 index b56a001..0000000 --- a/Java/src/main/java/io/swagger/client/ProgressRequestBody.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -import com.squareup.okhttp.MediaType; -import com.squareup.okhttp.RequestBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSink; -import okio.ForwardingSink; -import okio.Okio; -import okio.Sink; - -public class ProgressRequestBody extends RequestBody { - - public interface ProgressRequestListener { - void onRequestProgress(long bytesWritten, long contentLength, boolean done); - } - - private final RequestBody requestBody; - - private final ProgressRequestListener progressListener; - - public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) { - this.requestBody = requestBody; - this.progressListener = progressListener; - } - - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() throws IOException { - return requestBody.contentLength(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink bufferedSink = Okio.buffer(sink(sink)); - requestBody.writeTo(bufferedSink); - bufferedSink.flush(); - } - - private Sink sink(Sink sink) { - return new ForwardingSink(sink) { - - long bytesWritten = 0L; - long contentLength = 0L; - - @Override - public void write(Buffer source, long byteCount) throws IOException { - super.write(source, byteCount); - if (contentLength == 0) { - contentLength = contentLength(); - } - - bytesWritten += byteCount; - progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength); - } - }; - } -} diff --git a/Java/src/main/java/io/swagger/client/ProgressResponseBody.java b/Java/src/main/java/io/swagger/client/ProgressResponseBody.java deleted file mode 100644 index d0162c2..0000000 --- a/Java/src/main/java/io/swagger/client/ProgressResponseBody.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -import com.squareup.okhttp.MediaType; -import com.squareup.okhttp.ResponseBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSource; -import okio.ForwardingSource; -import okio.Okio; -import okio.Source; - -public class ProgressResponseBody extends ResponseBody { - - public interface ProgressListener { - void update(long bytesRead, long contentLength, boolean done); - } - - private final ResponseBody responseBody; - private final ProgressListener progressListener; - private BufferedSource bufferedSource; - - public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) { - this.responseBody = responseBody; - this.progressListener = progressListener; - } - - @Override - public MediaType contentType() { - return responseBody.contentType(); - } - - @Override - public long contentLength() throws IOException { - return responseBody.contentLength(); - } - - @Override - public BufferedSource source() throws IOException { - if (bufferedSource == null) { - bufferedSource = Okio.buffer(source(responseBody.source())); - } - return bufferedSource; - } - - private Source source(Source source) { - return new ForwardingSource(source) { - long totalBytesRead = 0L; - - @Override - public long read(Buffer sink, long byteCount) throws IOException { - long bytesRead = super.read(sink, byteCount); - // read() returns the number of bytes read, or -1 if this source is exhausted. - totalBytesRead += bytesRead != -1 ? bytesRead : 0; - progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1); - return bytesRead; - } - }; - } -} - - diff --git a/Java/src/main/java/io/swagger/client/StringUtil.java b/Java/src/main/java/io/swagger/client/StringUtil.java deleted file mode 100644 index f19a626..0000000 --- a/Java/src/main/java/io/swagger/client/StringUtil.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client; - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) return true; - if (value != null && value.equalsIgnoreCase(str)) return true; - } - return false; - } - - /** - * Join an array of strings with the given separator. - *

- * Note: This might be replaced by utility method from commons-lang or guava someday - * if one of those libraries is added as dependency. - *

- * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) return ""; - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } -} diff --git a/Java/src/main/java/io/swagger/client/api/BranchesApi.java b/Java/src/main/java/io/swagger/client/api/BranchesApi.java deleted file mode 100644 index e0eaa8f..0000000 --- a/Java/src/main/java/io/swagger/client/api/BranchesApi.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class BranchesApi { - private ApiClient apiClient; - - public BranchesApi() { - this(Configuration.getDefaultApiClient()); - } - - public BranchesApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for getBranch - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getBranchCall(String owner, String repo, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/branches/{branch}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "branch" + "\\}", apiClient.escapeString(branch.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getBranchValidateBeforeCall(String owner, String repo, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getBranch(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getBranch(Async)"); - } - // verify the required parameter 'branch' is set - if (branch == null) { - throw new ApiException("Missing the required parameter 'branch' when calling getBranch(Async)"); - } - - com.squareup.okhttp.Call call = getBranchCall(owner, repo, branch, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Get Branch - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getBranch(String owner, String repo, String branch) throws ApiException { - getBranchWithHttpInfo(owner, repo, branch); - } - - /** - * Get Branch - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getBranchWithHttpInfo(String owner, String repo, String branch) throws ApiException { - com.squareup.okhttp.Call call = getBranchValidateBeforeCall(owner, repo, branch, null, null); - return apiClient.execute(call); - } - - /** - * Get Branch (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getBranchAsync(String owner, String repo, String branch, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getBranchValidateBeforeCall(owner, repo, branch, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for listBranches - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call listBranchesCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/branches" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call listBranchesValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling listBranches(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling listBranches(Async)"); - } - - com.squareup.okhttp.Call call = listBranchesCall(owner, repo, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List Branches - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void listBranches(String owner, String repo) throws ApiException { - listBranchesWithHttpInfo(owner, repo); - } - - /** - * List Branches - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse listBranchesWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = listBranchesValidateBeforeCall(owner, repo, null, null); - return apiClient.execute(call); - } - - /** - * List Branches (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call listBranchesAsync(String owner, String repo, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = listBranchesValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/api/CollaboratorsApi.java b/Java/src/main/java/io/swagger/client/api/CollaboratorsApi.java deleted file mode 100644 index 392a632..0000000 --- a/Java/src/main/java/io/swagger/client/api/CollaboratorsApi.java +++ /dev/null @@ -1,468 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import io.swagger.client.model.CollaboratorsCollaboratorBody; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CollaboratorsApi { - private ApiClient apiClient; - - public CollaboratorsApi() { - this(Configuration.getDefaultApiClient()); - } - - public CollaboratorsApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for addCollaborator - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param collaborator collaborator username (required) - * @param body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call addCollaboratorCall(String owner, String repo, String collaborator, CollaboratorsCollaboratorBody body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "collaborator" + "\\}", apiClient.escapeString(collaborator.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call addCollaboratorValidateBeforeCall(String owner, String repo, String collaborator, CollaboratorsCollaboratorBody body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling addCollaborator(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling addCollaborator(Async)"); - } - // verify the required parameter 'collaborator' is set - if (collaborator == null) { - throw new ApiException("Missing the required parameter 'collaborator' when calling addCollaborator(Async)"); - } - - com.squareup.okhttp.Call call = addCollaboratorCall(owner, repo, collaborator, body, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Add user as a collaborator - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param collaborator collaborator username (required) - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void addCollaborator(String owner, String repo, String collaborator, CollaboratorsCollaboratorBody body) throws ApiException { - addCollaboratorWithHttpInfo(owner, repo, collaborator, body); - } - - /** - * Add user as a collaborator - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param collaborator collaborator username (required) - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse addCollaboratorWithHttpInfo(String owner, String repo, String collaborator, CollaboratorsCollaboratorBody body) throws ApiException { - com.squareup.okhttp.Call call = addCollaboratorValidateBeforeCall(owner, repo, collaborator, body, null, null); - return apiClient.execute(call); - } - - /** - * Add user as a collaborator (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param collaborator collaborator username (required) - * @param body (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call addCollaboratorAsync(String owner, String repo, String collaborator, CollaboratorsCollaboratorBody body, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = addCollaboratorValidateBeforeCall(owner, repo, collaborator, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for getCollaborators - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getCollaboratorsCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/collaborators" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getCollaboratorsValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getCollaborators(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getCollaborators(Async)"); - } - - com.squareup.okhttp.Call call = getCollaboratorsCall(owner, repo, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Get collaborators - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getCollaborators(String owner, String repo) throws ApiException { - getCollaboratorsWithHttpInfo(owner, repo); - } - - /** - * Get collaborators - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getCollaboratorsWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = getCollaboratorsValidateBeforeCall(owner, repo, null, null); - return apiClient.execute(call); - } - - /** - * Get collaborators (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getCollaboratorsAsync(String owner, String repo, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getCollaboratorsValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for removeCollaborator - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param collaborator collaborator username (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call removeCollaboratorCall(String owner, String repo, String collaborator, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "collaborator" + "\\}", apiClient.escapeString(collaborator.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call removeCollaboratorValidateBeforeCall(String owner, String repo, String collaborator, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling removeCollaborator(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling removeCollaborator(Async)"); - } - // verify the required parameter 'collaborator' is set - if (collaborator == null) { - throw new ApiException("Missing the required parameter 'collaborator' when calling removeCollaborator(Async)"); - } - - com.squareup.okhttp.Call call = removeCollaboratorCall(owner, repo, collaborator, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Delete collaborator - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param collaborator collaborator username (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void removeCollaborator(String owner, String repo, String collaborator) throws ApiException { - removeCollaboratorWithHttpInfo(owner, repo, collaborator); - } - - /** - * Delete collaborator - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param collaborator collaborator username (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse removeCollaboratorWithHttpInfo(String owner, String repo, String collaborator) throws ApiException { - com.squareup.okhttp.Call call = removeCollaboratorValidateBeforeCall(owner, repo, collaborator, null, null); - return apiClient.execute(call); - } - - /** - * Delete collaborator (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param collaborator collaborator username (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call removeCollaboratorAsync(String owner, String repo, String collaborator, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = removeCollaboratorValidateBeforeCall(owner, repo, collaborator, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/api/CommitsApi.java b/Java/src/main/java/io/swagger/client/api/CommitsApi.java deleted file mode 100644 index 6d5eb49..0000000 --- a/Java/src/main/java/io/swagger/client/api/CommitsApi.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CommitsApi { - private ApiClient apiClient; - - public CommitsApi() { - this(Configuration.getDefaultApiClient()); - } - - public CommitsApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for getCommit - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param sha a SHA1 of a commit (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getCommitCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/commits/{sha}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "sha" + "\\}", apiClient.escapeString(sha.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getCommitValidateBeforeCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getCommit(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getCommit(Async)"); - } - // verify the required parameter 'sha' is set - if (sha == null) { - throw new ApiException("Missing the required parameter 'sha' when calling getCommit(Async)"); - } - - com.squareup.okhttp.Call call = getCommitCall(owner, repo, sha, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Get a single commit - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param sha a SHA1 of a commit (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getCommit(String owner, String repo, String sha) throws ApiException { - getCommitWithHttpInfo(owner, repo, sha); - } - - /** - * Get a single commit - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param sha a SHA1 of a commit (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getCommitWithHttpInfo(String owner, String repo, String sha) throws ApiException { - com.squareup.okhttp.Call call = getCommitValidateBeforeCall(owner, repo, sha, null, null); - return apiClient.execute(call); - } - - /** - * Get a single commit (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param sha a SHA1 of a commit (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getCommitAsync(String owner, String repo, String sha, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getCommitValidateBeforeCall(owner, repo, sha, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/api/ContentApi.java b/Java/src/main/java/io/swagger/client/api/ContentApi.java deleted file mode 100644 index 08721d4..0000000 --- a/Java/src/main/java/io/swagger/client/api/ContentApi.java +++ /dev/null @@ -1,700 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import io.swagger.client.model.Files; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ContentApi { - private ApiClient apiClient; - - public ContentApi() { - this(Configuration.getDefaultApiClient()); - } - - public ContentApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for getArchive - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param ref The name of the commit/branch/tag (required) - * @param format The format of archive, either .zip or .tar.gz (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getArchiveCall(String owner, String repo, String ref, String format, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/archive/{ref}{format}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "ref" + "\\}", apiClient.escapeString(ref.toString())) - .replaceAll("\\{" + "format" + "\\}", apiClient.escapeString(format.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getArchiveValidateBeforeCall(String owner, String repo, String ref, String format, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getArchive(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getArchive(Async)"); - } - // verify the required parameter 'ref' is set - if (ref == null) { - throw new ApiException("Missing the required parameter 'ref' when calling getArchive(Async)"); - } - // verify the required parameter 'format' is set - if (format == null) { - throw new ApiException("Missing the required parameter 'format' when calling getArchive(Async)"); - } - - com.squareup.okhttp.Call call = getArchiveCall(owner, repo, ref, format, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Download archive - * This method returns archive by given format. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param ref The name of the commit/branch/tag (required) - * @param format The format of archive, either .zip or .tar.gz (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getArchive(String owner, String repo, String ref, String format) throws ApiException { - getArchiveWithHttpInfo(owner, repo, ref, format); - } - - /** - * Download archive - * This method returns archive by given format. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param ref The name of the commit/branch/tag (required) - * @param format The format of archive, either .zip or .tar.gz (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getArchiveWithHttpInfo(String owner, String repo, String ref, String format) throws ApiException { - com.squareup.okhttp.Call call = getArchiveValidateBeforeCall(owner, repo, ref, format, null, null); - return apiClient.execute(call); - } - - /** - * Download archive (asynchronously) - * This method returns archive by given format. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param ref The name of the commit/branch/tag (required) - * @param format The format of archive, either .zip or .tar.gz (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getArchiveAsync(String owner, String repo, String ref, String format, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getArchiveValidateBeforeCall(owner, repo, ref, format, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for getContent - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @param path path of a folder in the repository (required) - * @param includeSize (optional, default to false) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getContentCall(String owner, String repo, String branch, String path, Boolean includeSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/content/{branch}/{path}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "branch" + "\\}", apiClient.escapeString(branch.toString())) - .replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - if (includeSize != null) - localVarQueryParams.addAll(apiClient.parameterToPair("include_size", includeSize)); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getContentValidateBeforeCall(String owner, String repo, String branch, String path, Boolean includeSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getContent(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getContent(Async)"); - } - // verify the required parameter 'branch' is set - if (branch == null) { - throw new ApiException("Missing the required parameter 'branch' when calling getContent(Async)"); - } - // verify the required parameter 'path' is set - if (path == null) { - throw new ApiException("Missing the required parameter 'path' when calling getContent(Async)"); - } - - com.squareup.okhttp.Call call = getContentCall(owner, repo, branch, path, includeSize, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List data in a repository folder - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @param path path of a folder in the repository (required) - * @param includeSize (optional, default to false) - * @return Files - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public Files getContent(String owner, String repo, String branch, String path, Boolean includeSize) throws ApiException { - ApiResponse resp = getContentWithHttpInfo(owner, repo, branch, path, includeSize); - return resp.getData(); - } - - /** - * List data in a repository folder - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @param path path of a folder in the repository (required) - * @param includeSize (optional, default to false) - * @return ApiResponse<Files> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getContentWithHttpInfo(String owner, String repo, String branch, String path, Boolean includeSize) throws ApiException { - com.squareup.okhttp.Call call = getContentValidateBeforeCall(owner, repo, branch, path, includeSize, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * List data in a repository folder (asynchronously) - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @param path path of a folder in the repository (required) - * @param includeSize (optional, default to false) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getContentAsync(String owner, String repo, String branch, String path, Boolean includeSize, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getContentValidateBeforeCall(owner, repo, branch, path, includeSize, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /** - * Build call for getRaw - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param ref The name of the commit/branch/tag (required) - * @param path The content path (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getRawCall(String owner, String repo, String ref, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/raw/{ref}/{path}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "ref" + "\\}", apiClient.escapeString(ref.toString())) - .replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getRawValidateBeforeCall(String owner, String repo, String ref, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getRaw(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getRaw(Async)"); - } - // verify the required parameter 'ref' is set - if (ref == null) { - throw new ApiException("Missing the required parameter 'ref' when calling getRaw(Async)"); - } - // verify the required parameter 'path' is set - if (path == null) { - throw new ApiException("Missing the required parameter 'path' when calling getRaw(Async)"); - } - - com.squareup.okhttp.Call call = getRawCall(owner, repo, ref, path, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Download raw content - * This method returns the raw content of a file. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param ref The name of the commit/branch/tag (required) - * @param path The content path (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getRaw(String owner, String repo, String ref, String path) throws ApiException { - getRawWithHttpInfo(owner, repo, ref, path); - } - - /** - * Download raw content - * This method returns the raw content of a file. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param ref The name of the commit/branch/tag (required) - * @param path The content path (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getRawWithHttpInfo(String owner, String repo, String ref, String path) throws ApiException { - com.squareup.okhttp.Call call = getRawValidateBeforeCall(owner, repo, ref, path, null, null); - return apiClient.execute(call); - } - - /** - * Download raw content (asynchronously) - * This method returns the raw content of a file. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param ref The name of the commit/branch/tag (required) - * @param path The content path (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getRawAsync(String owner, String repo, String ref, String path, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getRawValidateBeforeCall(owner, repo, ref, path, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for uploadContent - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @param path path of a folder in the repository (required) - * @param commitSummary (optional) - * @param commitMessage (optional) - * @param commitChoice (optional) - * @param lastCommit (optional) - * @param newBranchName (optional) - * @param versioning (optional) - * @param files (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call uploadContentCall(String owner, String repo, String branch, String path, String commitSummary, String commitMessage, String commitChoice, String lastCommit, String newBranchName, String versioning, String files, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/content/{branch}/{path}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "branch" + "\\}", apiClient.escapeString(branch.toString())) - .replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - if (commitSummary != null) - localVarFormParams.put("commit_summary", commitSummary); - if (commitMessage != null) - localVarFormParams.put("commit_message", commitMessage); - if (commitChoice != null) - localVarFormParams.put("commit_choice", commitChoice); - if (lastCommit != null) - localVarFormParams.put("last_commit", lastCommit); - if (newBranchName != null) - localVarFormParams.put("new_branch_name", newBranchName); - if (versioning != null) - localVarFormParams.put("versioning", versioning); - if (files != null) - localVarFormParams.put("files", files); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call uploadContentValidateBeforeCall(String owner, String repo, String branch, String path, String commitSummary, String commitMessage, String commitChoice, String lastCommit, String newBranchName, String versioning, String files, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling uploadContent(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling uploadContent(Async)"); - } - // verify the required parameter 'branch' is set - if (branch == null) { - throw new ApiException("Missing the required parameter 'branch' when calling uploadContent(Async)"); - } - // verify the required parameter 'path' is set - if (path == null) { - throw new ApiException("Missing the required parameter 'path' when calling uploadContent(Async)"); - } - - com.squareup.okhttp.Call call = uploadContentCall(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Upload data to a repository - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @param path path of a folder in the repository (required) - * @param commitSummary (optional) - * @param commitMessage (optional) - * @param commitChoice (optional) - * @param lastCommit (optional) - * @param newBranchName (optional) - * @param versioning (optional) - * @param files (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void uploadContent(String owner, String repo, String branch, String path, String commitSummary, String commitMessage, String commitChoice, String lastCommit, String newBranchName, String versioning, String files) throws ApiException { - uploadContentWithHttpInfo(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files); - } - - /** - * Upload data to a repository - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @param path path of a folder in the repository (required) - * @param commitSummary (optional) - * @param commitMessage (optional) - * @param commitChoice (optional) - * @param lastCommit (optional) - * @param newBranchName (optional) - * @param versioning (optional) - * @param files (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse uploadContentWithHttpInfo(String owner, String repo, String branch, String path, String commitSummary, String commitMessage, String commitChoice, String lastCommit, String newBranchName, String versioning, String files) throws ApiException { - com.squareup.okhttp.Call call = uploadContentValidateBeforeCall(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files, null, null); - return apiClient.execute(call); - } - - /** - * Upload data to a repository (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param branch branch of the repository (required) - * @param path path of a folder in the repository (required) - * @param commitSummary (optional) - * @param commitMessage (optional) - * @param commitChoice (optional) - * @param lastCommit (optional) - * @param newBranchName (optional) - * @param versioning (optional) - * @param files (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call uploadContentAsync(String owner, String repo, String branch, String path, String commitSummary, String commitMessage, String commitChoice, String lastCommit, String newBranchName, String versioning, String files, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = uploadContentValidateBeforeCall(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/api/ExperimentsApi.java b/Java/src/main/java/io/swagger/client/api/ExperimentsApi.java deleted file mode 100644 index a449751..0000000 --- a/Java/src/main/java/io/swagger/client/api/ExperimentsApi.java +++ /dev/null @@ -1,899 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import io.swagger.client.model.EditExperimentPost; -import io.swagger.client.model.ExperimentKeys; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ExperimentsApi { - private ApiClient apiClient; - - public ExperimentsApi() { - this(Configuration.getDefaultApiClient()); - } - - public ExperimentsApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for addExperimentLabel - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param experimentLabel A label for the experiment, max 128 characters. (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call addExperimentLabelCall(String owner, String repo, String experimentKey, String experimentLabel, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "experimentKey" + "\\}", apiClient.escapeString(experimentKey.toString())) - .replaceAll("\\{" + "experimentLabel" + "\\}", apiClient.escapeString(experimentLabel.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call addExperimentLabelValidateBeforeCall(String owner, String repo, String experimentKey, String experimentLabel, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling addExperimentLabel(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling addExperimentLabel(Async)"); - } - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) { - throw new ApiException("Missing the required parameter 'experimentKey' when calling addExperimentLabel(Async)"); - } - // verify the required parameter 'experimentLabel' is set - if (experimentLabel == null) { - throw new ApiException("Missing the required parameter 'experimentLabel' when calling addExperimentLabel(Async)"); - } - - com.squareup.okhttp.Call call = addExperimentLabelCall(owner, repo, experimentKey, experimentLabel, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Add label to experiment - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param experimentLabel A label for the experiment, max 128 characters. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void addExperimentLabel(String owner, String repo, String experimentKey, String experimentLabel) throws ApiException { - addExperimentLabelWithHttpInfo(owner, repo, experimentKey, experimentLabel); - } - - /** - * Add label to experiment - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param experimentLabel A label for the experiment, max 128 characters. (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse addExperimentLabelWithHttpInfo(String owner, String repo, String experimentKey, String experimentLabel) throws ApiException { - com.squareup.okhttp.Call call = addExperimentLabelValidateBeforeCall(owner, repo, experimentKey, experimentLabel, null, null); - return apiClient.execute(call); - } - - /** - * Add label to experiment (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param experimentLabel A label for the experiment, max 128 characters. (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call addExperimentLabelAsync(String owner, String repo, String experimentKey, String experimentLabel, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = addExperimentLabelValidateBeforeCall(owner, repo, experimentKey, experimentLabel, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for deleteExperiment - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call deleteExperimentCall(String owner, String repo, String experimentKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "experimentKey" + "\\}", apiClient.escapeString(experimentKey.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call deleteExperimentValidateBeforeCall(String owner, String repo, String experimentKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling deleteExperiment(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling deleteExperiment(Async)"); - } - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) { - throw new ApiException("Missing the required parameter 'experimentKey' when calling deleteExperiment(Async)"); - } - - com.squareup.okhttp.Call call = deleteExperimentCall(owner, repo, experimentKey, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Delete experiment - * Support both git and MLflow experiments - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void deleteExperiment(String owner, String repo, String experimentKey) throws ApiException { - deleteExperimentWithHttpInfo(owner, repo, experimentKey); - } - - /** - * Delete experiment - * Support both git and MLflow experiments - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse deleteExperimentWithHttpInfo(String owner, String repo, String experimentKey) throws ApiException { - com.squareup.okhttp.Call call = deleteExperimentValidateBeforeCall(owner, repo, experimentKey, null, null); - return apiClient.execute(call); - } - - /** - * Delete experiment (asynchronously) - * Support both git and MLflow experiments - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call deleteExperimentAsync(String owner, String repo, String experimentKey, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = deleteExperimentValidateBeforeCall(owner, repo, experimentKey, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for deleteExperimentLabel - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param experimentLabel A label for the experiment, max 128 characters. (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call deleteExperimentLabelCall(String owner, String repo, String experimentKey, String experimentLabel, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "experimentKey" + "\\}", apiClient.escapeString(experimentKey.toString())) - .replaceAll("\\{" + "experimentLabel" + "\\}", apiClient.escapeString(experimentLabel.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call deleteExperimentLabelValidateBeforeCall(String owner, String repo, String experimentKey, String experimentLabel, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling deleteExperimentLabel(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling deleteExperimentLabel(Async)"); - } - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) { - throw new ApiException("Missing the required parameter 'experimentKey' when calling deleteExperimentLabel(Async)"); - } - // verify the required parameter 'experimentLabel' is set - if (experimentLabel == null) { - throw new ApiException("Missing the required parameter 'experimentLabel' when calling deleteExperimentLabel(Async)"); - } - - com.squareup.okhttp.Call call = deleteExperimentLabelCall(owner, repo, experimentKey, experimentLabel, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Delete experiment label - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param experimentLabel A label for the experiment, max 128 characters. (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void deleteExperimentLabel(String owner, String repo, String experimentKey, String experimentLabel) throws ApiException { - deleteExperimentLabelWithHttpInfo(owner, repo, experimentKey, experimentLabel); - } - - /** - * Delete experiment label - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param experimentLabel A label for the experiment, max 128 characters. (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse deleteExperimentLabelWithHttpInfo(String owner, String repo, String experimentKey, String experimentLabel) throws ApiException { - com.squareup.okhttp.Call call = deleteExperimentLabelValidateBeforeCall(owner, repo, experimentKey, experimentLabel, null, null); - return apiClient.execute(call); - } - - /** - * Delete experiment label (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param experimentLabel A label for the experiment, max 128 characters. (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call deleteExperimentLabelAsync(String owner, String repo, String experimentKey, String experimentLabel, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = deleteExperimentLabelValidateBeforeCall(owner, repo, experimentKey, experimentLabel, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for editExperiment - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call editExperimentCall(String owner, String repo, String experimentKey, EditExperimentPost body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "experimentKey" + "\\}", apiClient.escapeString(experimentKey.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call editExperimentValidateBeforeCall(String owner, String repo, String experimentKey, EditExperimentPost body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling editExperiment(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling editExperiment(Async)"); - } - // verify the required parameter 'experimentKey' is set - if (experimentKey == null) { - throw new ApiException("Missing the required parameter 'experimentKey' when calling editExperiment(Async)"); - } - - com.squareup.okhttp.Call call = editExperimentCall(owner, repo, experimentKey, body, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Edit experiment info - * Edit experiment info, currently supports just changing experiment name. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void editExperiment(String owner, String repo, String experimentKey, EditExperimentPost body) throws ApiException { - editExperimentWithHttpInfo(owner, repo, experimentKey, body); - } - - /** - * Edit experiment info - * Edit experiment info, currently supports just changing experiment name. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse editExperimentWithHttpInfo(String owner, String repo, String experimentKey, EditExperimentPost body) throws ApiException { - com.squareup.okhttp.Call call = editExperimentValidateBeforeCall(owner, repo, experimentKey, body, null, null); - return apiClient.execute(call); - } - - /** - * Edit experiment info (asynchronously) - * Edit experiment info, currently supports just changing experiment name. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param experimentKey a valid experiment key (required) - * @param body (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call editExperimentAsync(String owner, String repo, String experimentKey, EditExperimentPost body, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = editExperimentValidateBeforeCall(owner, repo, experimentKey, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for getExperimentMetrics - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getExperimentMetricsCall(String owner, String repo, ExperimentKeys body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/experiments/metricsForExperiments" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getExperimentMetricsValidateBeforeCall(String owner, String repo, ExperimentKeys body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getExperimentMetrics(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getExperimentMetrics(Async)"); - } - - com.squareup.okhttp.Call call = getExperimentMetricsCall(owner, repo, body, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Get experiment metrics for experiment - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getExperimentMetrics(String owner, String repo, ExperimentKeys body) throws ApiException { - getExperimentMetricsWithHttpInfo(owner, repo, body); - } - - /** - * Get experiment metrics for experiment - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getExperimentMetricsWithHttpInfo(String owner, String repo, ExperimentKeys body) throws ApiException { - com.squareup.okhttp.Call call = getExperimentMetricsValidateBeforeCall(owner, repo, body, null, null); - return apiClient.execute(call); - } - - /** - * Get experiment metrics for experiment (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getExperimentMetricsAsync(String owner, String repo, ExperimentKeys body, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getExperimentMetricsValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for getExperiments - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getExperimentsCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/experiments" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getExperimentsValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getExperiments(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getExperiments(Async)"); - } - - com.squareup.okhttp.Call call = getExperimentsCall(owner, repo, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List Experiments - * Get a list of experiments in the given repository - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getExperiments(String owner, String repo) throws ApiException { - getExperimentsWithHttpInfo(owner, repo); - } - - /** - * List Experiments - * Get a list of experiments in the given repository - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getExperimentsWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = getExperimentsValidateBeforeCall(owner, repo, null, null); - return apiClient.execute(call); - } - - /** - * List Experiments (asynchronously) - * Get a list of experiments in the given repository - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getExperimentsAsync(String owner, String repo, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getExperimentsValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/api/IssuesApi.java b/Java/src/main/java/io/swagger/client/api/IssuesApi.java deleted file mode 100644 index 6efad3d..0000000 --- a/Java/src/main/java/io/swagger/client/api/IssuesApi.java +++ /dev/null @@ -1,612 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import io.swagger.client.model.Issue; -import io.swagger.client.model.Issues; -import io.swagger.client.model.PatchIssue; -import io.swagger.client.model.PostIssue; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class IssuesApi { - private ApiClient apiClient; - - public IssuesApi() { - this(Configuration.getDefaultApiClient()); - } - - public IssuesApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for createIssue - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call createIssueCall(String owner, String repo, PostIssue body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/issues" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call createIssueValidateBeforeCall(String owner, String repo, PostIssue body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling createIssue(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling createIssue(Async)"); - } - - com.squareup.okhttp.Call call = createIssueCall(owner, repo, body, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Create an issue - * Any user with read access to a repository can create an issue. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @return Issue - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public Issue createIssue(String owner, String repo, PostIssue body) throws ApiException { - ApiResponse resp = createIssueWithHttpInfo(owner, repo, body); - return resp.getData(); - } - - /** - * Create an issue - * Any user with read access to a repository can create an issue. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @return ApiResponse<Issue> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse createIssueWithHttpInfo(String owner, String repo, PostIssue body) throws ApiException { - com.squareup.okhttp.Call call = createIssueValidateBeforeCall(owner, repo, body, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Create an issue (asynchronously) - * Any user with read access to a repository can create an issue. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call createIssueAsync(String owner, String repo, PostIssue body, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = createIssueValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /** - * Build call for editIssue - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call editIssueCall(String owner, String repo, PatchIssue body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/issues" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call editIssueValidateBeforeCall(String owner, String repo, PatchIssue body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling editIssue(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling editIssue(Async)"); - } - - com.squareup.okhttp.Call call = editIssueCall(owner, repo, body, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Edit an issue - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @return Issue - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public Issue editIssue(String owner, String repo, PatchIssue body) throws ApiException { - ApiResponse resp = editIssueWithHttpInfo(owner, repo, body); - return resp.getData(); - } - - /** - * Edit an issue - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @return ApiResponse<Issue> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse editIssueWithHttpInfo(String owner, String repo, PatchIssue body) throws ApiException { - com.squareup.okhttp.Call call = editIssueValidateBeforeCall(owner, repo, body, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Edit an issue (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call editIssueAsync(String owner, String repo, PatchIssue body, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = editIssueValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /** - * Build call for getIssue - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param index the index of an issue or a pull request (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getIssueCall(String owner, String repo, Integer index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/issues/{index}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getIssueValidateBeforeCall(String owner, String repo, Integer index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getIssue(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getIssue(Async)"); - } - // verify the required parameter 'index' is set - if (index == null) { - throw new ApiException("Missing the required parameter 'index' when calling getIssue(Async)"); - } - - com.squareup.okhttp.Call call = getIssueCall(owner, repo, index, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Get a single issue - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param index the index of an issue or a pull request (required) - * @return Issue - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public Issue getIssue(String owner, String repo, Integer index) throws ApiException { - ApiResponse resp = getIssueWithHttpInfo(owner, repo, index); - return resp.getData(); - } - - /** - * Get a single issue - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param index the index of an issue or a pull request (required) - * @return ApiResponse<Issue> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getIssueWithHttpInfo(String owner, String repo, Integer index) throws ApiException { - com.squareup.okhttp.Call call = getIssueValidateBeforeCall(owner, repo, index, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Get a single issue (asynchronously) - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param index the index of an issue or a pull request (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getIssueAsync(String owner, String repo, Integer index, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getIssueValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /** - * Build call for listRepoIssues - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call listRepoIssuesCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/issues" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call listRepoIssuesValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling listRepoIssues(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling listRepoIssues(Async)"); - } - - com.squareup.okhttp.Call call = listRepoIssuesCall(owner, repo, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List issues for a repository - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @return Issues - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public Issues listRepoIssues(String owner, String repo) throws ApiException { - ApiResponse resp = listRepoIssuesWithHttpInfo(owner, repo); - return resp.getData(); - } - - /** - * List issues for a repository - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @return ApiResponse<Issues> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse listRepoIssuesWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = listRepoIssuesValidateBeforeCall(owner, repo, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * List issues for a repository (asynchronously) - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call listRepoIssuesAsync(String owner, String repo, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = listRepoIssuesValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/api/ReleasesApi.java b/Java/src/main/java/io/swagger/client/api/ReleasesApi.java deleted file mode 100644 index d8c1cd8..0000000 --- a/Java/src/main/java/io/swagger/client/api/ReleasesApi.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ReleasesApi { - private ApiClient apiClient; - - public ReleasesApi() { - this(Configuration.getDefaultApiClient()); - } - - public ReleasesApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for listReleases - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call listReleasesCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/releases" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call listReleasesValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling listReleases(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling listReleases(Async)"); - } - - com.squareup.okhttp.Call call = listReleasesCall(owner, repo, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List Releases - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void listReleases(String owner, String repo) throws ApiException { - listReleasesWithHttpInfo(owner, repo); - } - - /** - * List Releases - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse listReleasesWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = listReleasesValidateBeforeCall(owner, repo, null, null); - return apiClient.execute(call); - } - - /** - * List Releases (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call listReleasesAsync(String owner, String repo, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = listReleasesValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/api/RepositoryApi.java b/Java/src/main/java/io/swagger/client/api/RepositoryApi.java deleted file mode 100644 index 648949d..0000000 --- a/Java/src/main/java/io/swagger/client/api/RepositoryApi.java +++ /dev/null @@ -1,1046 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import io.swagger.client.model.CreateRepo; -import io.swagger.client.model.MigrateRepo; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class RepositoryApi { - private ApiClient apiClient; - - public RepositoryApi() { - this(Configuration.getDefaultApiClient()); - } - - public RepositoryApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for createOrgRepo - * @param orgname A DagsHub organization name (required) - * @param body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call createOrgRepoCall(String orgname, CreateRepo body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/org/{orgname}/repos" - .replaceAll("\\{" + "orgname" + "\\}", apiClient.escapeString(orgname.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call createOrgRepoValidateBeforeCall(String orgname, CreateRepo body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'orgname' is set - if (orgname == null) { - throw new ApiException("Missing the required parameter 'orgname' when calling createOrgRepo(Async)"); - } - - com.squareup.okhttp.Call call = createOrgRepoCall(orgname, body, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Create in organization - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * @param orgname A DagsHub organization name (required) - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void createOrgRepo(String orgname, CreateRepo body) throws ApiException { - createOrgRepoWithHttpInfo(orgname, body); - } - - /** - * Create in organization - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * @param orgname A DagsHub organization name (required) - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse createOrgRepoWithHttpInfo(String orgname, CreateRepo body) throws ApiException { - com.squareup.okhttp.Call call = createOrgRepoValidateBeforeCall(orgname, body, null, null); - return apiClient.execute(call); - } - - /** - * Create in organization (asynchronously) - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * @param orgname A DagsHub organization name (required) - * @param body (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call createOrgRepoAsync(String orgname, CreateRepo body, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = createOrgRepoValidateBeforeCall(orgname, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for createRepo - * @param body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call createRepoCall(CreateRepo body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/user/repos"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call createRepoValidateBeforeCall(CreateRepo body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - - com.squareup.okhttp.Call call = createRepoCall(body, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Create - * Create a new repository for the authenticated user. - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void createRepo(CreateRepo body) throws ApiException { - createRepoWithHttpInfo(body); - } - - /** - * Create - * Create a new repository for the authenticated user. - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse createRepoWithHttpInfo(CreateRepo body) throws ApiException { - com.squareup.okhttp.Call call = createRepoValidateBeforeCall(body, null, null); - return apiClient.execute(call); - } - - /** - * Create (asynchronously) - * Create a new repository for the authenticated user. - * @param body (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call createRepoAsync(CreateRepo body, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = createRepoValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for getRepo - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getRepoCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getRepoValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getRepo(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getRepo(Async)"); - } - - com.squareup.okhttp.Call call = getRepoCall(owner, repo, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Get repository information - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getRepo(String owner, String repo) throws ApiException { - getRepoWithHttpInfo(owner, repo); - } - - /** - * Get repository information - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getRepoWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = getRepoValidateBeforeCall(owner, repo, null, null); - return apiClient.execute(call); - } - - /** - * Get repository information (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getRepoAsync(String owner, String repo, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getRepoValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for listMyRepos - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call listMyReposCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/repos"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call listMyReposValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - - com.squareup.okhttp.Call call = listMyReposCall(progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List your repositories - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public Object listMyRepos() throws ApiException { - ApiResponse resp = listMyReposWithHttpInfo(); - return resp.getData(); - } - - /** - * List your repositories - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse listMyReposWithHttpInfo() throws ApiException { - com.squareup.okhttp.Call call = listMyReposValidateBeforeCall(null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * List your repositories (asynchronously) - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call listMyReposAsync(final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = listMyReposValidateBeforeCall(progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /** - * Build call for listOrgRepos - * @param orgname A DagsHub organization name (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call listOrgReposCall(String orgname, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/orgs/{orgname}/repos" - .replaceAll("\\{" + "orgname" + "\\}", apiClient.escapeString(orgname.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call listOrgReposValidateBeforeCall(String orgname, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'orgname' is set - if (orgname == null) { - throw new ApiException("Missing the required parameter 'orgname' when calling listOrgRepos(Async)"); - } - - com.squareup.okhttp.Call call = listOrgReposCall(orgname, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List organization repositories - * List repositories that are accessible to the authenticated user. - * @param orgname A DagsHub organization name (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void listOrgRepos(String orgname) throws ApiException { - listOrgReposWithHttpInfo(orgname); - } - - /** - * List organization repositories - * List repositories that are accessible to the authenticated user. - * @param orgname A DagsHub organization name (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse listOrgReposWithHttpInfo(String orgname) throws ApiException { - com.squareup.okhttp.Call call = listOrgReposValidateBeforeCall(orgname, null, null); - return apiClient.execute(call); - } - - /** - * List organization repositories (asynchronously) - * List repositories that are accessible to the authenticated user. - * @param orgname A DagsHub organization name (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call listOrgReposAsync(String orgname, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = listOrgReposValidateBeforeCall(orgname, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for listUserRepos - * @param username A DagsHub username or organization name (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call listUserReposCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/users/{username}/repos" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call listUserReposValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException("Missing the required parameter 'username' when calling listUserRepos(Async)"); - } - - com.squareup.okhttp.Call call = listUserReposCall(username, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List user repositories - * List public repositories for the specified user. - * @param username A DagsHub username or organization name (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void listUserRepos(String username) throws ApiException { - listUserReposWithHttpInfo(username); - } - - /** - * List user repositories - * List public repositories for the specified user. - * @param username A DagsHub username or organization name (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse listUserReposWithHttpInfo(String username) throws ApiException { - com.squareup.okhttp.Call call = listUserReposValidateBeforeCall(username, null, null); - return apiClient.execute(call); - } - - /** - * List user repositories (asynchronously) - * List public repositories for the specified user. - * @param username A DagsHub username or organization name (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call listUserReposAsync(String username, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = listUserReposValidateBeforeCall(username, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for migrateRepo - * @param body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call migrateRepoCall(MigrateRepo body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/repos/migrate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call migrateRepoValidateBeforeCall(MigrateRepo body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - - com.squareup.okhttp.Call call = migrateRepoCall(body, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Migrate repository - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void migrateRepo(MigrateRepo body) throws ApiException { - migrateRepoWithHttpInfo(body); - } - - /** - * Migrate repository - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse migrateRepoWithHttpInfo(MigrateRepo body) throws ApiException { - com.squareup.okhttp.Call call = migrateRepoValidateBeforeCall(body, null, null); - return apiClient.execute(call); - } - - /** - * Migrate repository (asynchronously) - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * @param body (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call migrateRepoAsync(MigrateRepo body, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = migrateRepoValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for search - * @param q (required) - * @param uid User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - * @param limit Maximum number of repositories in search results. (optional, default to 10) - * @param page Page number. Default is 1. (optional, default to 1) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call searchCall(String q, Integer uid, Integer limit, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/search"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - if (q != null) - localVarQueryParams.addAll(apiClient.parameterToPair("q", q)); - if (uid != null) - localVarQueryParams.addAll(apiClient.parameterToPair("uid", uid)); - if (limit != null) - localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); - if (page != null) - localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call searchValidateBeforeCall(String q, Integer uid, Integer limit, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'q' is set - if (q == null) { - throw new ApiException("Missing the required parameter 'q' when calling search(Async)"); - } - - com.squareup.okhttp.Call call = searchCall(q, uid, limit, page, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Search repositories - * - * @param q (required) - * @param uid User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - * @param limit Maximum number of repositories in search results. (optional, default to 10) - * @param page Page number. Default is 1. (optional, default to 1) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public Object search(String q, Integer uid, Integer limit, Integer page) throws ApiException { - ApiResponse resp = searchWithHttpInfo(q, uid, limit, page); - return resp.getData(); - } - - /** - * Search repositories - * - * @param q (required) - * @param uid User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - * @param limit Maximum number of repositories in search results. (optional, default to 10) - * @param page Page number. Default is 1. (optional, default to 1) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse searchWithHttpInfo(String q, Integer uid, Integer limit, Integer page) throws ApiException { - com.squareup.okhttp.Call call = searchValidateBeforeCall(q, uid, limit, page, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Search repositories (asynchronously) - * - * @param q (required) - * @param uid User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - * @param limit Maximum number of repositories in search results. (optional, default to 10) - * @param page Page number. Default is 1. (optional, default to 1) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call searchAsync(String q, Integer uid, Integer limit, Integer page, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = searchValidateBeforeCall(q, uid, limit, page, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/api/StorageIntegrationsApi.java b/Java/src/main/java/io/swagger/client/api/StorageIntegrationsApi.java deleted file mode 100644 index 4a743a7..0000000 --- a/Java/src/main/java/io/swagger/client/api/StorageIntegrationsApi.java +++ /dev/null @@ -1,527 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import io.swagger.client.model.Files1; -import io.swagger.client.model.Integration; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class StorageIntegrationsApi { - private ApiClient apiClient; - - public StorageIntegrationsApi() { - this(Configuration.getDefaultApiClient()); - } - - public StorageIntegrationsApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for getBucketContent - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param protocol protocol of the storage integration (required) - * @param bucket name and prefix of the bucket integration (required) - * @param path path of a folder in the repository (required) - * @param includeSize (optional, default to false) - * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getBucketContentCall(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, String fromToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "protocol" + "\\}", apiClient.escapeString(protocol.toString())) - .replaceAll("\\{" + "bucket" + "\\}", apiClient.escapeString(bucket.toString())) - .replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - if (includeSize != null) - localVarQueryParams.addAll(apiClient.parameterToPair("include_size", includeSize)); - if (limit != null) - localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); - if (fromToken != null) - localVarQueryParams.addAll(apiClient.parameterToPair("from_token", fromToken)); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getBucketContentValidateBeforeCall(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, String fromToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getBucketContent(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getBucketContent(Async)"); - } - // verify the required parameter 'protocol' is set - if (protocol == null) { - throw new ApiException("Missing the required parameter 'protocol' when calling getBucketContent(Async)"); - } - // verify the required parameter 'bucket' is set - if (bucket == null) { - throw new ApiException("Missing the required parameter 'bucket' when calling getBucketContent(Async)"); - } - // verify the required parameter 'path' is set - if (path == null) { - throw new ApiException("Missing the required parameter 'path' when calling getBucketContent(Async)"); - } - - com.squareup.okhttp.Call call = getBucketContentCall(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List contents in the path - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param protocol protocol of the storage integration (required) - * @param bucket name and prefix of the bucket integration (required) - * @param path path of a folder in the repository (required) - * @param includeSize (optional, default to false) - * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) - * @return Files1 - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public Files1 getBucketContent(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, String fromToken) throws ApiException { - ApiResponse resp = getBucketContentWithHttpInfo(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); - return resp.getData(); - } - - /** - * List contents in the path - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param protocol protocol of the storage integration (required) - * @param bucket name and prefix of the bucket integration (required) - * @param path path of a folder in the repository (required) - * @param includeSize (optional, default to false) - * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) - * @return ApiResponse<Files1> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getBucketContentWithHttpInfo(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, String fromToken) throws ApiException { - com.squareup.okhttp.Call call = getBucketContentValidateBeforeCall(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * List contents in the path (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param protocol protocol of the storage integration (required) - * @param bucket name and prefix of the bucket integration (required) - * @param path path of a folder in the repository (required) - * @param includeSize (optional, default to false) - * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getBucketContentAsync(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, String fromToken, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getBucketContentValidateBeforeCall(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /** - * Build call for getBucketFile - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param protocol protocol of the storage integration (required) - * @param bucket name and prefix of the bucket integration (required) - * @param path The content path (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getBucketFileCall(String owner, String repo, String protocol, String bucket, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "protocol" + "\\}", apiClient.escapeString(protocol.toString())) - .replaceAll("\\{" + "bucket" + "\\}", apiClient.escapeString(bucket.toString())) - .replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getBucketFileValidateBeforeCall(String owner, String repo, String protocol, String bucket, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getBucketFile(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getBucketFile(Async)"); - } - // verify the required parameter 'protocol' is set - if (protocol == null) { - throw new ApiException("Missing the required parameter 'protocol' when calling getBucketFile(Async)"); - } - // verify the required parameter 'bucket' is set - if (bucket == null) { - throw new ApiException("Missing the required parameter 'bucket' when calling getBucketFile(Async)"); - } - // verify the required parameter 'path' is set - if (path == null) { - throw new ApiException("Missing the required parameter 'path' when calling getBucketFile(Async)"); - } - - com.squareup.okhttp.Call call = getBucketFileCall(owner, repo, protocol, bucket, path, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Get file in the bucket - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param protocol protocol of the storage integration (required) - * @param bucket name and prefix of the bucket integration (required) - * @param path The content path (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getBucketFile(String owner, String repo, String protocol, String bucket, String path) throws ApiException { - getBucketFileWithHttpInfo(owner, repo, protocol, bucket, path); - } - - /** - * Get file in the bucket - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param protocol protocol of the storage integration (required) - * @param bucket name and prefix of the bucket integration (required) - * @param path The content path (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getBucketFileWithHttpInfo(String owner, String repo, String protocol, String bucket, String path) throws ApiException { - com.squareup.okhttp.Call call = getBucketFileValidateBeforeCall(owner, repo, protocol, bucket, path, null, null); - return apiClient.execute(call); - } - - /** - * Get file in the bucket (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param protocol protocol of the storage integration (required) - * @param bucket name and prefix of the bucket integration (required) - * @param path The content path (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getBucketFileAsync(String owner, String repo, String protocol, String bucket, String path, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getBucketFileValidateBeforeCall(owner, repo, protocol, bucket, path, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for getBuckets - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getBucketsCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/storage" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getBucketsValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling getBuckets(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling getBuckets(Async)"); - } - - com.squareup.okhttp.Call call = getBucketsCall(owner, repo, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List integrated storages in the repository - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @return Integration - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public Integration getBuckets(String owner, String repo) throws ApiException { - ApiResponse resp = getBucketsWithHttpInfo(owner, repo); - return resp.getData(); - } - - /** - * List integrated storages in the repository - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @return ApiResponse<Integration> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getBucketsWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = getBucketsValidateBeforeCall(owner, repo, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * List integrated storages in the repository (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getBucketsAsync(String owner, String repo, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getBucketsValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/api/UserApi.java b/Java/src/main/java/io/swagger/client/api/UserApi.java deleted file mode 100644 index 133e6a1..0000000 --- a/Java/src/main/java/io/swagger/client/api/UserApi.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UserApi { - private ApiClient apiClient; - - public UserApi() { - this(Configuration.getDefaultApiClient()); - } - - public UserApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for getAuthenticatedUser - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getAuthenticatedUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getAuthenticatedUserValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - - com.squareup.okhttp.Call call = getAuthenticatedUserCall(progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Get authenticated user information - * - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getAuthenticatedUser() throws ApiException { - getAuthenticatedUserWithHttpInfo(); - } - - /** - * Get authenticated user information - * - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getAuthenticatedUserWithHttpInfo() throws ApiException { - com.squareup.okhttp.Call call = getAuthenticatedUserValidateBeforeCall(null, null); - return apiClient.execute(call); - } - - /** - * Get authenticated user information (asynchronously) - * - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getAuthenticatedUserAsync(final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getAuthenticatedUserValidateBeforeCall(progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for getUser - * @param username A DagsHub username or organization name (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call getUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/users/{username}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getUserValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException("Missing the required parameter 'username' when calling getUser(Async)"); - } - - com.squareup.okhttp.Call call = getUserCall(username, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Get information about a user - * - * @param username A DagsHub username or organization name (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void getUser(String username) throws ApiException { - getUserWithHttpInfo(username); - } - - /** - * Get information about a user - * - * @param username A DagsHub username or organization name (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getUserWithHttpInfo(String username) throws ApiException { - com.squareup.okhttp.Call call = getUserValidateBeforeCall(username, null, null); - return apiClient.execute(call); - } - - /** - * Get information about a user (asynchronously) - * - * @param username A DagsHub username or organization name (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getUserAsync(String username, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getUserValidateBeforeCall(username, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/api/WebhooksApi.java b/Java/src/main/java/io/swagger/client/api/WebhooksApi.java deleted file mode 100644 index 8fd055c..0000000 --- a/Java/src/main/java/io/swagger/client/api/WebhooksApi.java +++ /dev/null @@ -1,603 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.ApiCallback; -import io.swagger.client.ApiClient; -import io.swagger.client.ApiException; -import io.swagger.client.ApiResponse; -import io.swagger.client.Configuration; -import io.swagger.client.Pair; -import io.swagger.client.ProgressRequestBody; -import io.swagger.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import io.swagger.client.model.HooksIdBody; -import io.swagger.client.model.RepoHooksBody; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class WebhooksApi { - private ApiClient apiClient; - - public WebhooksApi() { - this(Configuration.getDefaultApiClient()); - } - - public WebhooksApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for createHook - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call createHookCall(String owner, String repo, RepoHooksBody body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/hooks" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call createHookValidateBeforeCall(String owner, String repo, RepoHooksBody body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling createHook(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling createHook(Async)"); - } - - com.squareup.okhttp.Call call = createHookCall(owner, repo, body, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Create a hook - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void createHook(String owner, String repo, RepoHooksBody body) throws ApiException { - createHookWithHttpInfo(owner, repo, body); - } - - /** - * Create a hook - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse createHookWithHttpInfo(String owner, String repo, RepoHooksBody body) throws ApiException { - com.squareup.okhttp.Call call = createHookValidateBeforeCall(owner, repo, body, null, null); - return apiClient.execute(call); - } - - /** - * Create a hook (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param body (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call createHookAsync(String owner, String repo, RepoHooksBody body, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = createHookValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for deleteHook - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param id (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call deleteHookCall(String owner, String repo, Integer id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/hooks/{id}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call deleteHookValidateBeforeCall(String owner, String repo, Integer id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling deleteHook(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling deleteHook(Async)"); - } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteHook(Async)"); - } - - com.squareup.okhttp.Call call = deleteHookCall(owner, repo, id, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Delete a hook - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param id (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void deleteHook(String owner, String repo, Integer id) throws ApiException { - deleteHookWithHttpInfo(owner, repo, id); - } - - /** - * Delete a hook - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param id (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse deleteHookWithHttpInfo(String owner, String repo, Integer id) throws ApiException { - com.squareup.okhttp.Call call = deleteHookValidateBeforeCall(owner, repo, id, null, null); - return apiClient.execute(call); - } - - /** - * Delete a hook (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param id (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call deleteHookAsync(String owner, String repo, Integer id, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = deleteHookValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for editHook - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param id (required) - * @param body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call editHookCall(String owner, String repo, Integer id, HooksIdBody body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/hooks/{id}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call editHookValidateBeforeCall(String owner, String repo, Integer id, HooksIdBody body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling editHook(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling editHook(Async)"); - } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling editHook(Async)"); - } - - com.squareup.okhttp.Call call = editHookCall(owner, repo, id, body, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * Edit a hook - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param id (required) - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void editHook(String owner, String repo, Integer id, HooksIdBody body) throws ApiException { - editHookWithHttpInfo(owner, repo, id, body); - } - - /** - * Edit a hook - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param id (required) - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse editHookWithHttpInfo(String owner, String repo, Integer id, HooksIdBody body) throws ApiException { - com.squareup.okhttp.Call call = editHookValidateBeforeCall(owner, repo, id, body, null, null); - return apiClient.execute(call); - } - - /** - * Edit a hook (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param id (required) - * @param body (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call editHookAsync(String owner, String repo, Integer id, HooksIdBody body, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = editHookValidateBeforeCall(owner, repo, id, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } - /** - * Build call for listHooks - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - public com.squareup.okhttp.Call listHooksCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/hooks" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call listHooksValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'owner' is set - if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling listHooks(Async)"); - } - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling listHooks(Async)"); - } - - com.squareup.okhttp.Call call = listHooksCall(owner, repo, progressListener, progressRequestListener); - return call; - - - - - - } - - /** - * List hooks - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public void listHooks(String owner, String repo) throws ApiException { - listHooksWithHttpInfo(owner, repo); - } - - /** - * List hooks - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse listHooksWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = listHooksValidateBeforeCall(owner, repo, null, null); - return apiClient.execute(call); - } - - /** - * List hooks (asynchronously) - * - * @param owner owner of the repository (required) - * @param repo name of the repository (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call listHooksAsync(String owner, String repo, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = listHooksValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; - } -} diff --git a/Java/src/main/java/io/swagger/client/auth/ApiKeyAuth.java b/Java/src/main/java/io/swagger/client/auth/ApiKeyAuth.java deleted file mode 100644 index 1c8e0e2..0000000 --- a/Java/src/main/java/io/swagger/client/auth/ApiKeyAuth.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.auth; - -import io.swagger.client.Pair; - -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class ApiKeyAuth implements Authentication { - private final String location; - private final String paramName; - - private String apiKey; - private String apiKeyPrefix; - - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } - - public String getLocation() { - return location; - } - - public String getParamName() { - return paramName; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - public String getApiKeyPrefix() { - return apiKeyPrefix; - } - - public void setApiKeyPrefix(String apiKeyPrefix) { - this.apiKeyPrefix = apiKeyPrefix; - } - - @Override - public void applyToParams(List queryParams, Map headerParams) { - if (apiKey == null) { - return; - } - String value; - if (apiKeyPrefix != null) { - value = apiKeyPrefix + " " + apiKey; - } else { - value = apiKey; - } - if ("query".equals(location)) { - queryParams.add(new Pair(paramName, value)); - } else if ("header".equals(location)) { - headerParams.put(paramName, value); - } - } -} diff --git a/Java/src/main/java/io/swagger/client/auth/Authentication.java b/Java/src/main/java/io/swagger/client/auth/Authentication.java deleted file mode 100644 index 639b572..0000000 --- a/Java/src/main/java/io/swagger/client/auth/Authentication.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.auth; - -import io.swagger.client.Pair; - -import java.util.Map; -import java.util.List; - -public interface Authentication { - /** - * Apply authentication settings to header and query params. - * - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - */ - void applyToParams(List queryParams, Map headerParams); -} diff --git a/Java/src/main/java/io/swagger/client/auth/HttpBasicAuth.java b/Java/src/main/java/io/swagger/client/auth/HttpBasicAuth.java deleted file mode 100644 index 0e40b98..0000000 --- a/Java/src/main/java/io/swagger/client/auth/HttpBasicAuth.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.auth; - -import io.swagger.client.Pair; - -import com.squareup.okhttp.Credentials; - -import java.util.Map; -import java.util.List; - -import java.io.UnsupportedEncodingException; - -public class HttpBasicAuth implements Authentication { - private String username; - private String password; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public void applyToParams(List queryParams, Map headerParams) { - if (username == null && password == null) { - return; - } - headerParams.put("Authorization", Credentials.basic( - username == null ? "" : username, - password == null ? "" : password)); - } -} diff --git a/Java/src/main/java/io/swagger/client/auth/OAuth.java b/Java/src/main/java/io/swagger/client/auth/OAuth.java deleted file mode 100644 index 1a3faee..0000000 --- a/Java/src/main/java/io/swagger/client/auth/OAuth.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.auth; - -import io.swagger.client.Pair; - -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class OAuth implements Authentication { - private String accessToken; - - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - @Override - public void applyToParams(List queryParams, Map headerParams) { - if (accessToken != null) { - headerParams.put("Authorization", "Bearer " + accessToken); - } - } -} diff --git a/Java/src/main/java/io/swagger/client/auth/OAuthFlow.java b/Java/src/main/java/io/swagger/client/auth/OAuthFlow.java deleted file mode 100644 index 54dfa8b..0000000 --- a/Java/src/main/java/io/swagger/client/auth/OAuthFlow.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.auth; - -public enum OAuthFlow { - accessCode, implicit, password, application -} diff --git a/Java/src/main/java/io/swagger/client/model/CollaboratorsCollaboratorBody.java b/Java/src/main/java/io/swagger/client/model/CollaboratorsCollaboratorBody.java deleted file mode 100644 index f8d1748..0000000 --- a/Java/src/main/java/io/swagger/client/model/CollaboratorsCollaboratorBody.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * CollaboratorsCollaboratorBody - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class CollaboratorsCollaboratorBody { - @SerializedName("permission") - private String permission = "write"; - - public CollaboratorsCollaboratorBody permission(String permission) { - this.permission = permission; - return this; - } - - /** - * The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. - * @return permission - **/ - @Schema(description = "The permission to grant the collaborator. Can be one of **read**, **write** and **admin**.") - public String getPermission() { - return permission; - } - - public void setPermission(String permission) { - this.permission = permission; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CollaboratorsCollaboratorBody collaboratorsCollaboratorBody = (CollaboratorsCollaboratorBody) o; - return Objects.equals(this.permission, collaboratorsCollaboratorBody.permission); - } - - @Override - public int hashCode() { - return Objects.hash(permission); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CollaboratorsCollaboratorBody {\n"); - - sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/CreateRepo.java b/Java/src/main/java/io/swagger/client/model/CreateRepo.java deleted file mode 100644 index a46a535..0000000 --- a/Java/src/main/java/io/swagger/client/model/CreateRepo.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * CreateRepo - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class CreateRepo { - @SerializedName("name") - private String name = null; - - @SerializedName("description") - private String description = null; - - @SerializedName("private") - private Boolean _private = false; - - @SerializedName("auto_init") - private Boolean autoInit = false; - - /** - * Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - */ - @JsonAdapter(ProjectTemplateEnum.Adapter.class) - public enum ProjectTemplateEnum { - COOKIECUTTER_DAGSHUB_DVC("cookiecutter-dagshub-dvc"), - CUSTOM("custom"), - NONE("none"), - NOTEBOOK_TEMPLATE("notebook-template"); - - private String value; - - ProjectTemplateEnum(String value) { - this.value = value; - } - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - public static ProjectTemplateEnum fromValue(String input) { - for (ProjectTemplateEnum b : ProjectTemplateEnum.values()) { - if (b.value.equals(input)) { - return b; - } - } - return null; - } - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ProjectTemplateEnum enumeration) throws IOException { - jsonWriter.value(String.valueOf(enumeration.getValue())); - } - - @Override - public ProjectTemplateEnum read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextString(); - return ProjectTemplateEnum.fromValue((String)(value)); - } - } - } @SerializedName("project_template") - private ProjectTemplateEnum projectTemplate = null; - - @SerializedName("gitignores") - private String gitignores = null; - - /** - * Desired LICENSE template to apply. Use the name of the template. - */ - @JsonAdapter(LicenseEnum.Adapter.class) - public enum LicenseEnum { - APACHE_LICENSE_2_0("Apache License 2.0"), - MIT_LICENSE("MIT License"), - ABSTYLES_LICENSE("Abstyles License"), - ACADEMIC_FREE_LICENSE_V1_1("Academic Free License v1.1"), - ACADEMIC_FREE_LICENSE_V1_2("Academic Free License v1.2"), - ACADEMIC_FREE_LICENSE_V2_0("Academic Free License v2.0"), - ACADEMIC_FREE_LICENSE_V2_1("Academic Free License v2.1"), - ACADEMIC_FREE_LICENSE_V3_0("Academic Free License v3.0"), - AFFERO_GENERAL_PUBLIC_LICENSE_V1_0("Affero General Public License v1.0"), - APACHE_LICENSE_1_0("Apache License 1.0"), - APACHE_LICENSE_1_1("Apache License 1.1"), - ARTISTIC_LICENSE_1_0("Artistic License 1.0"), - ARTISTIC_LICENSE_2_0("Artistic License 2.0"), - BSD_2_CLAUSE_LICENSE("BSD 2-clause License"), - BSD_3_CLAUSE_LICENSE("BSD 3-clause License"), - BSD_4_CLAUSE_LICENSE("BSD 4-clause License"), - CREATIVE_COMMONS_CC0_1_0_UNIVERSAL("Creative Commons CC0 1.0 Universal"), - ECLIPSE_PUBLIC_LICENSE_1_0("Eclipse Public License 1.0"), - EDUCATIONAL_COMMUNITY_LICENSE_V1_0("Educational Community License v1.0"), - EDUCATIONAL_COMMUNITY_LICENSE_V2_0("Educational Community License v2.0"), - GNU_AFFERO_GENERAL_PUBLIC_LICENSE_V3_0("GNU Affero General Public License v3.0"), - GNU_FREE_DOCUMENTATION_LICENSE_V1_1("GNU Free Documentation License v1.1"), - GNU_FREE_DOCUMENTATION_LICENSE_V1_2("GNU Free Documentation License v1.2"), - GNU_FREE_DOCUMENTATION_LICENSE_V1_3("GNU Free Documentation License v1.3"), - GNU_GENERAL_PUBLIC_LICENSE_V1_0("GNU General Public License v1.0"), - GNU_GENERAL_PUBLIC_LICENSE_V2_0("GNU General Public License v2.0"), - GNU_GENERAL_PUBLIC_LICENSE_V3_0("GNU General Public License v3.0"), - GNU_LESSER_GENERAL_PUBLIC_LICENSE_V2_1("GNU Lesser General Public License v2.1"), - GNU_LESSER_GENERAL_PUBLIC_LICENSE_V3_0("GNU Lesser General Public License v3.0"), - GNU_LIBRARY_GENERAL_PUBLIC_LICENSE_V2_0("GNU Library General Public License v2.0"), - ISC_LICENSE("ISC license"), - MOZILLA_PUBLIC_LICENSE_1_0("Mozilla Public License 1.0"), - MOZILLA_PUBLIC_LICENSE_1_1("Mozilla Public License 1.1"), - MOZILLA_PUBLIC_LICENSE_2_03("Mozilla Public License 2.03"); - - private String value; - - LicenseEnum(String value) { - this.value = value; - } - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - public static LicenseEnum fromValue(String input) { - for (LicenseEnum b : LicenseEnum.values()) { - if (b.value.equals(input)) { - return b; - } - } - return null; - } - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final LicenseEnum enumeration) throws IOException { - jsonWriter.value(String.valueOf(enumeration.getValue())); - } - - @Override - public LicenseEnum read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextString(); - return LicenseEnum.fromValue((String)(value)); - } - } - } @SerializedName("license") - private LicenseEnum license = null; - - @SerializedName("readme") - private String readme = "Default"; - - public CreateRepo name(String name) { - this.name = name; - return this; - } - - /** - * name of the repository - * @return name - **/ - @Schema(example = "repo-name", required = true, description = "name of the repository") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public CreateRepo description(String description) { - this.description = description; - return this; - } - - /** - * A short description of the repository - * @return description - **/ - @Schema(description = "A short description of the repository") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public CreateRepo _private(Boolean _private) { - this._private = _private; - return this; - } - - /** - * Either true to create a private repository, or false to create a public one. - * @return _private - **/ - @Schema(description = "Either true to create a private repository, or false to create a public one.") - public Boolean isPrivate() { - return _private; - } - - public void setPrivate(Boolean _private) { - this._private = _private; - } - - public CreateRepo autoInit(Boolean autoInit) { - this.autoInit = autoInit; - return this; - } - - /** - * Pass true to create an initial commit with README, .gitignore and LICENSE. - * @return autoInit - **/ - @Schema(description = "Pass true to create an initial commit with README, .gitignore and LICENSE.") - public Boolean isAutoInit() { - return autoInit; - } - - public void setAutoInit(Boolean autoInit) { - this.autoInit = autoInit; - } - - public CreateRepo projectTemplate(ProjectTemplateEnum projectTemplate) { - this.projectTemplate = projectTemplate; - return this; - } - - /** - * Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - * @return projectTemplate - **/ - @Schema(description = "Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. ") - public ProjectTemplateEnum getProjectTemplate() { - return projectTemplate; - } - - public void setProjectTemplate(ProjectTemplateEnum projectTemplate) { - this.projectTemplate = projectTemplate; - } - - public CreateRepo gitignores(String gitignores) { - this.gitignores = gitignores; - return this; - } - - /** - * Desired language .gitignore templates to apply. Use the name of the templates. - * @return gitignores - **/ - @Schema(example = "Go, Sublime Text", description = "Desired language .gitignore templates to apply. Use the name of the templates.") - public String getGitignores() { - return gitignores; - } - - public void setGitignores(String gitignores) { - this.gitignores = gitignores; - } - - public CreateRepo license(LicenseEnum license) { - this.license = license; - return this; - } - - /** - * Desired LICENSE template to apply. Use the name of the template. - * @return license - **/ - @Schema(example = "MIT License", description = "Desired LICENSE template to apply. Use the name of the template.") - public LicenseEnum getLicense() { - return license; - } - - public void setLicense(LicenseEnum license) { - this.license = license; - } - - public CreateRepo readme(String readme) { - this.readme = readme; - return this; - } - - /** - * Desired README template to apply. Use the name of the template. - * @return readme - **/ - @Schema(description = "Desired README template to apply. Use the name of the template.") - public String getReadme() { - return readme; - } - - public void setReadme(String readme) { - this.readme = readme; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateRepo createRepo = (CreateRepo) o; - return Objects.equals(this.name, createRepo.name) && - Objects.equals(this.description, createRepo.description) && - Objects.equals(this._private, createRepo._private) && - Objects.equals(this.autoInit, createRepo.autoInit) && - Objects.equals(this.projectTemplate, createRepo.projectTemplate) && - Objects.equals(this.gitignores, createRepo.gitignores) && - Objects.equals(this.license, createRepo.license) && - Objects.equals(this.readme, createRepo.readme); - } - - @Override - public int hashCode() { - return Objects.hash(name, description, _private, autoInit, projectTemplate, gitignores, license, readme); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateRepo {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" _private: ").append(toIndentedString(_private)).append("\n"); - sb.append(" autoInit: ").append(toIndentedString(autoInit)).append("\n"); - sb.append(" projectTemplate: ").append(toIndentedString(projectTemplate)).append("\n"); - sb.append(" gitignores: ").append(toIndentedString(gitignores)).append("\n"); - sb.append(" license: ").append(toIndentedString(license)).append("\n"); - sb.append(" readme: ").append(toIndentedString(readme)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/EditExperimentPost.java b/Java/src/main/java/io/swagger/client/model/EditExperimentPost.java deleted file mode 100644 index 085bf94..0000000 --- a/Java/src/main/java/io/swagger/client/model/EditExperimentPost.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * EditExperimentPost - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class EditExperimentPost { - @SerializedName("name") - private String name = null; - - public EditExperimentPost name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @Schema(example = "Awesome Experiment", required = true, description = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EditExperimentPost editExperimentPost = (EditExperimentPost) o; - return Objects.equals(this.name, editExperimentPost.name); - } - - @Override - public int hashCode() { - return Objects.hash(name); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EditExperimentPost {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/ExperimentKeys.java b/Java/src/main/java/io/swagger/client/model/ExperimentKeys.java index e5c04a0..bc4dc14 100644 --- a/Java/src/main/java/io/swagger/client/model/ExperimentKeys.java +++ b/Java/src/main/java/io/swagger/client/model/ExperimentKeys.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,7 +27,7 @@ * ExperimentKeys */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") public class ExperimentKeys { @SerializedName("experiment_keys") private List experimentKeys = new ArrayList(); diff --git a/Java/src/main/java/io/swagger/client/model/WebhookEvents.java b/Java/src/main/java/io/swagger/client/model/ExperimentMetricsResponse.java similarity index 78% rename from Java/src/main/java/io/swagger/client/model/WebhookEvents.java rename to Java/src/main/java/io/swagger/client/model/ExperimentMetricsResponse.java index a05aaa0..ece12a2 100644 --- a/Java/src/main/java/io/swagger/client/model/WebhookEvents.java +++ b/Java/src/main/java/io/swagger/client/model/ExperimentMetricsResponse.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -15,14 +15,14 @@ import java.util.Objects; import java.util.Arrays; import io.swagger.v3.oas.annotations.media.Schema; -import java.util.ArrayList; -import java.util.List; +import java.util.HashMap; +import java.util.Map; /** - * Determines what events the hook is triggered format. + * Map of experiment IDs to their metrics by path */ -@Schema(description = "Determines what events the hook is triggered format.") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class WebhookEvents extends ArrayList { +@Schema(description = "Map of experiment IDs to their metrics by path") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") +public class ExperimentMetricsResponse extends HashMap { @Override public boolean equals(java.lang.Object o) { @@ -44,7 +44,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class WebhookEvents {\n"); + sb.append("class ExperimentMetricsResponse {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); diff --git a/Java/src/main/java/io/swagger/client/model/ExperimentsResponse.java b/Java/src/main/java/io/swagger/client/model/ExperimentsResponse.java new file mode 100644 index 0000000..e401a28 --- /dev/null +++ b/Java/src/main/java/io/swagger/client/model/ExperimentsResponse.java @@ -0,0 +1,149 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.client.model.ComponentsschemasExperimentYaml; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +/** + * ExperimentsResponse + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") +public class ExperimentsResponse { + @SerializedName("experiments") + private Map experiments = null; + + @SerializedName("isEditor") + private Boolean isEditor = null; + + @SerializedName("nextPageToken") + private String nextPageToken = null; + + public ExperimentsResponse experiments(Map experiments) { + this.experiments = experiments; + return this; + } + + public ExperimentsResponse putExperimentsItem(String key, ComponentsschemasExperimentYaml experimentsItem) { + if (this.experiments == null) { + this.experiments = new HashMap(); + } + this.experiments.put(key, experimentsItem); + return this; + } + + /** + * Map of experiment ID to experiment details + * @return experiments + **/ + @Schema(description = "Map of experiment ID to experiment details") + public Map getExperiments() { + return experiments; + } + + public void setExperiments(Map experiments) { + this.experiments = experiments; + } + + public ExperimentsResponse isEditor(Boolean isEditor) { + this.isEditor = isEditor; + return this; + } + + /** + * Whether the authenticated user can edit experiments in this repo + * @return isEditor + **/ + @Schema(description = "Whether the authenticated user can edit experiments in this repo") + public Boolean isIsEditor() { + return isEditor; + } + + public void setIsEditor(Boolean isEditor) { + this.isEditor = isEditor; + } + + public ExperimentsResponse nextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + /** + * Pagination token for the next page of results (empty string when no more pages) + * @return nextPageToken + **/ + @Schema(description = "Pagination token for the next page of results (empty string when no more pages)") + public String getNextPageToken() { + return nextPageToken; + } + + public void setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentsResponse experimentsResponse = (ExperimentsResponse) o; + return Objects.equals(this.experiments, experimentsResponse.experiments) && + Objects.equals(this.isEditor, experimentsResponse.isEditor) && + Objects.equals(this.nextPageToken, experimentsResponse.nextPageToken); + } + + @Override + public int hashCode() { + return Objects.hash(experiments, isEditor, nextPageToken); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentsResponse {\n"); + + sb.append(" experiments: ").append(toIndentedString(experiments)).append("\n"); + sb.append(" isEditor: ").append(toIndentedString(isEditor)).append("\n"); + sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/Java/src/main/java/io/swagger/client/model/File.java b/Java/src/main/java/io/swagger/client/model/File.java deleted file mode 100644 index 6dedeaf..0000000 --- a/Java/src/main/java/io/swagger/client/model/File.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * File - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class File { - @SerializedName("path") - private String path = null; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - FILE("file"), - DIR("dir"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - public static TypeEnum fromValue(String input) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(input)) { - return b; - } - } - return null; - } - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(String.valueOf(enumeration.getValue())); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextString(); - return TypeEnum.fromValue((String)(value)); - } - } - } @SerializedName("type") - private TypeEnum type = null; - - @SerializedName("size") - private Long size = null; - - @SerializedName("hash") - private String hash = null; - - /** - * Gets or Sets versioning - */ - @JsonAdapter(VersioningEnum.Adapter.class) - public enum VersioningEnum { - GIT("git"), - DVC("dvc"), - BUCKET("bucket"); - - private String value; - - VersioningEnum(String value) { - this.value = value; - } - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - public static VersioningEnum fromValue(String input) { - for (VersioningEnum b : VersioningEnum.values()) { - if (b.value.equals(input)) { - return b; - } - } - return null; - } - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VersioningEnum enumeration) throws IOException { - jsonWriter.value(String.valueOf(enumeration.getValue())); - } - - @Override - public VersioningEnum read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextString(); - return VersioningEnum.fromValue((String)(value)); - } - } - } @SerializedName("versioning") - private VersioningEnum versioning = null; - - @SerializedName("download_url") - private String downloadUrl = null; - - @SerializedName("content_url") - private String contentUrl = null; - - public File path(String path) { - this.path = path; - return this; - } - - /** - * Get path - * @return path - **/ - @Schema(example = "images/000.png", description = "") - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public File type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @Schema(example = "[file]", description = "") - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - public File size(Long size) { - this.size = size; - return this; - } - - /** - * Get size - * @return size - **/ - @Schema(example = "421", description = "") - public Long getSize() { - return size; - } - - public void setSize(Long size) { - this.size = size; - } - - public File hash(String hash) { - this.hash = hash; - return this; - } - - /** - * Get hash - * @return hash - **/ - @Schema(example = "79fb7f8632d7e15b3b46a7411d08bcdd", description = "") - public String getHash() { - return hash; - } - - public void setHash(String hash) { - this.hash = hash; - } - - public File versioning(VersioningEnum versioning) { - this.versioning = versioning; - return this; - } - - /** - * Get versioning - * @return versioning - **/ - @Schema(example = "dvc", description = "") - public VersioningEnum getVersioning() { - return versioning; - } - - public void setVersioning(VersioningEnum versioning) { - this.versioning = versioning; - } - - public File downloadUrl(String downloadUrl) { - this.downloadUrl = downloadUrl; - return this; - } - - /** - * Get downloadUrl - * @return downloadUrl - **/ - @Schema(example = "https://dagshub.com/Simon/baby-yoda-segmentation-dataset/raw/master/images/000.png", description = "") - public String getDownloadUrl() { - return downloadUrl; - } - - public void setDownloadUrl(String downloadUrl) { - this.downloadUrl = downloadUrl; - } - - public File contentUrl(String contentUrl) { - this.contentUrl = contentUrl; - return this; - } - - /** - * Get contentUrl - * @return contentUrl - **/ - @Schema(example = "https://dagshub.com/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png", description = "") - public String getContentUrl() { - return contentUrl; - } - - public void setContentUrl(String contentUrl) { - this.contentUrl = contentUrl; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - File file = (File) o; - return Objects.equals(this.path, file.path) && - Objects.equals(this.type, file.type) && - Objects.equals(this.size, file.size) && - Objects.equals(this.hash, file.hash) && - Objects.equals(this.versioning, file.versioning) && - Objects.equals(this.downloadUrl, file.downloadUrl) && - Objects.equals(this.contentUrl, file.contentUrl); - } - - @Override - public int hashCode() { - return Objects.hash(path, type, size, hash, versioning, downloadUrl, contentUrl); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class File {\n"); - - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); - sb.append(" versioning: ").append(toIndentedString(versioning)).append("\n"); - sb.append(" downloadUrl: ").append(toIndentedString(downloadUrl)).append("\n"); - sb.append(" contentUrl: ").append(toIndentedString(contentUrl)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/Files.java b/Java/src/main/java/io/swagger/client/model/Files.java index e484d5f..61f113c 100644 --- a/Java/src/main/java/io/swagger/client/model/Files.java +++ b/Java/src/main/java/io/swagger/client/model/Files.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -14,15 +14,15 @@ import java.util.Objects; import java.util.Arrays; -import java.io.File; +import io.swagger.client.model.ComponentsschemasFileYaml; import java.util.ArrayList; import java.util.List; /** * Files */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class Files extends ArrayList { +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") +public class Files extends ArrayList { @Override public boolean equals(java.lang.Object o) { diff --git a/Java/src/main/java/io/swagger/client/model/Files1.java b/Java/src/main/java/io/swagger/client/model/Files1.java index 510960e..3b5af68 100644 --- a/Java/src/main/java/io/swagger/client/model/Files1.java +++ b/Java/src/main/java/io/swagger/client/model/Files1.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -19,8 +19,8 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import io.swagger.client.model.ComponentsschemasFileYaml; import io.swagger.v3.oas.annotations.media.Schema; -import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -28,25 +28,22 @@ * Files1 */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") public class Files1 { @SerializedName("entries") - private List entries = null; - - @SerializedName("limit") - private Integer limit = null; + private List entries = null; @SerializedName("next_token") private String nextToken = null; - public Files1 entries(List entries) { + public Files1 entries(List entries) { this.entries = entries; return this; } - public Files1 addEntriesItem(File entriesItem) { + public Files1 addEntriesItem(ComponentsschemasFileYaml entriesItem) { if (this.entries == null) { - this.entries = new ArrayList(); + this.entries = new ArrayList(); } this.entries.add(entriesItem); return this; @@ -57,42 +54,24 @@ public Files1 addEntriesItem(File entriesItem) { * @return entries **/ @Schema(description = "") - public List getEntries() { + public List getEntries() { return entries; } - public void setEntries(List entries) { + public void setEntries(List entries) { this.entries = entries; } - public Files1 limit(Integer limit) { - this.limit = limit; - return this; - } - - /** - * Get limit - * @return limit - **/ - @Schema(description = "") - public Integer getLimit() { - return limit; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - public Files1 nextToken(String nextToken) { this.nextToken = nextToken; return this; } /** - * Get nextToken + * Next token to continue pagination from * @return nextToken **/ - @Schema(description = "") + @Schema(description = "Next token to continue pagination from") public String getNextToken() { return nextToken; } @@ -112,13 +91,12 @@ public boolean equals(java.lang.Object o) { } Files1 files1 = (Files1) o; return Objects.equals(this.entries, files1.entries) && - Objects.equals(this.limit, files1.limit) && Objects.equals(this.nextToken, files1.nextToken); } @Override public int hashCode() { - return Objects.hash(entries, limit, nextToken); + return Objects.hash(entries, nextToken); } @@ -128,7 +106,6 @@ public String toString() { sb.append("class Files1 {\n"); sb.append(" entries: ").append(toIndentedString(entries)).append("\n"); - sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" nextToken: ").append(toIndentedString(nextToken)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/Java/src/main/java/io/swagger/client/model/HooksIdBody.java b/Java/src/main/java/io/swagger/client/model/HooksIdBody.java deleted file mode 100644 index ad9fd52..0000000 --- a/Java/src/main/java/io/swagger/client/model/HooksIdBody.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.client.model.WebhookConfig; -import io.swagger.client.model.WebhookEvents; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * HooksIdBody - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class HooksIdBody { - @SerializedName("config") - private WebhookConfig config = null; - - @SerializedName("events") - private WebhookEvents events = null; - - @SerializedName("active") - private Boolean active = null; - - public HooksIdBody config(WebhookConfig config) { - this.config = config; - return this; - } - - /** - * Get config - * @return config - **/ - @Schema(description = "") - public WebhookConfig getConfig() { - return config; - } - - public void setConfig(WebhookConfig config) { - this.config = config; - } - - public HooksIdBody events(WebhookEvents events) { - this.events = events; - return this; - } - - /** - * Get events - * @return events - **/ - @Schema(description = "") - public WebhookEvents getEvents() { - return events; - } - - public void setEvents(WebhookEvents events) { - this.events = events; - } - - public HooksIdBody active(Boolean active) { - this.active = active; - return this; - } - - /** - * Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. - * @return active - **/ - @Schema(description = "Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged.") - public Boolean isActive() { - return active; - } - - public void setActive(Boolean active) { - this.active = active; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HooksIdBody hooksIdBody = (HooksIdBody) o; - return Objects.equals(this.config, hooksIdBody.config) && - Objects.equals(this.events, hooksIdBody.events) && - Objects.equals(this.active, hooksIdBody.active); - } - - @Override - public int hashCode() { - return Objects.hash(config, events, active); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HooksIdBody {\n"); - - sb.append(" config: ").append(toIndentedString(config)).append("\n"); - sb.append(" events: ").append(toIndentedString(events)).append("\n"); - sb.append(" active: ").append(toIndentedString(active)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/Integration.java b/Java/src/main/java/io/swagger/client/model/Integration.java index 00b61d4..9ff798d 100644 --- a/Java/src/main/java/io/swagger/client/model/Integration.java +++ b/Java/src/main/java/io/swagger/client/model/Integration.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -14,15 +14,14 @@ import java.util.Objects; import java.util.Arrays; -import io.swagger.client.model.IntegrationInner; import java.util.ArrayList; import java.util.List; /** * Integration */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class Integration extends ArrayList { +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") +public class Integration extends ArrayList { @Override public boolean equals(java.lang.Object o) { diff --git a/Java/src/main/java/io/swagger/client/model/IntegrationInner.java b/Java/src/main/java/io/swagger/client/model/IntegrationInner.java deleted file mode 100644 index c099e13..0000000 --- a/Java/src/main/java/io/swagger/client/model/IntegrationInner.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * IntegrationInner - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class IntegrationInner { - @SerializedName("name") - private String name = null; - - /** - * Protocol used by the integration - */ - @JsonAdapter(ProtocolEnum.Adapter.class) - public enum ProtocolEnum { - S3("s3"), - GS("gs"); - - private String value; - - ProtocolEnum(String value) { - this.value = value; - } - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - public static ProtocolEnum fromValue(String input) { - for (ProtocolEnum b : ProtocolEnum.values()) { - if (b.value.equals(input)) { - return b; - } - } - return null; - } - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ProtocolEnum enumeration) throws IOException { - jsonWriter.value(String.valueOf(enumeration.getValue())); - } - - @Override - public ProtocolEnum read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextString(); - return ProtocolEnum.fromValue((String)(value)); - } - } - } @SerializedName("protocol") - private ProtocolEnum protocol = null; - - @SerializedName("list_path") - private String listPath = null; - - public IntegrationInner name(String name) { - this.name = name; - return this; - } - - /** - * Name/path of the bucket - * @return name - **/ - @Schema(description = "Name/path of the bucket") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public IntegrationInner protocol(ProtocolEnum protocol) { - this.protocol = protocol; - return this; - } - - /** - * Protocol used by the integration - * @return protocol - **/ - @Schema(description = "Protocol used by the integration") - public ProtocolEnum getProtocol() { - return protocol; - } - - public void setProtocol(ProtocolEnum protocol) { - this.protocol = protocol; - } - - public IntegrationInner listPath(String listPath) { - this.listPath = listPath; - return this; - } - - /** - * URL to list the root of this bucket - * @return listPath - **/ - @Schema(description = "URL to list the root of this bucket") - public String getListPath() { - return listPath; - } - - public void setListPath(String listPath) { - this.listPath = listPath; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IntegrationInner integrationInner = (IntegrationInner) o; - return Objects.equals(this.name, integrationInner.name) && - Objects.equals(this.protocol, integrationInner.protocol) && - Objects.equals(this.listPath, integrationInner.listPath); - } - - @Override - public int hashCode() { - return Objects.hash(name, protocol, listPath); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IntegrationInner {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" protocol: ").append(toIndentedString(protocol)).append("\n"); - sb.append(" listPath: ").append(toIndentedString(listPath)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/Issue.java b/Java/src/main/java/io/swagger/client/model/Issue.java index f6d0ff2..1a078fd 100644 --- a/Java/src/main/java/io/swagger/client/model/Issue.java +++ b/Java/src/main/java/io/swagger/client/model/Issue.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -19,28 +19,26 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.client.model.IssueAssignee; -import io.swagger.client.model.IssueLabels; -import io.swagger.client.model.IssueMilestone; -import io.swagger.client.model.User; +import io.swagger.client.model.ComponentsschemasUserYaml; import io.swagger.v3.oas.annotations.media.Schema; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import org.threeten.bp.OffsetDateTime; /** * Issue */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") public class Issue { @SerializedName("id") - private Integer id = null; + private Long id = null; @SerializedName("number") - private Integer number = null; + private Long number = null; @SerializedName("user") - private User user = null; + private ComponentsschemasUserYaml user = null; @SerializedName("title") private String title = null; @@ -49,33 +47,71 @@ public class Issue { private String body = null; @SerializedName("labels") - private List labels = new ArrayList(); + private List labels = null; @SerializedName("milestone") - private IssueMilestone milestone = null; + private Object milestone = null; @SerializedName("assignee") - private IssueAssignee assignee = null; + private ComponentsschemasUserYaml assignee = null; - @SerializedName("state") - private String state = null; + /** + * Gets or Sets state + */ + @JsonAdapter(StateEnum.Adapter.class) + public enum StateEnum { + OPEN("open"), + CLOSED("closed"); + + private String value; + + StateEnum(String value) { + this.value = value; + } + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + public static StateEnum fromValue(String input) { + for (StateEnum b : StateEnum.values()) { + if (b.value.equals(input)) { + return b; + } + } + return null; + } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { + jsonWriter.value(String.valueOf(enumeration.getValue())); + } + + @Override + public StateEnum read(final JsonReader jsonReader) throws IOException { + Object value = jsonReader.nextString(); + return StateEnum.fromValue((String)(value)); + } + } + } @SerializedName("state") + private StateEnum state = null; @SerializedName("comments") private Integer comments = null; @SerializedName("created_at") - private String createdAt = null; + private OffsetDateTime createdAt = null; @SerializedName("updated_at") - private String updatedAt = null; + private OffsetDateTime updatedAt = null; @SerializedName("pull_request") private Object pullRequest = null; - @SerializedName("closed") - private Boolean closed = null; - - public Issue id(Integer id) { + public Issue id(Long id) { this.id = id; return this; } @@ -85,33 +121,33 @@ public Issue id(Integer id) { * @return id **/ @Schema(description = "") - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } - public Issue number(Integer number) { + public Issue number(Long number) { this.number = number; return this; } /** - * Get number + * Issue index within the repository * @return number **/ - @Schema(description = "") - public Integer getNumber() { + @Schema(description = "Issue index within the repository") + public Long getNumber() { return number; } - public void setNumber(Integer number) { + public void setNumber(Long number) { this.number = number; } - public Issue user(User user) { + public Issue user(ComponentsschemasUserYaml user) { this.user = user; return this; } @@ -121,11 +157,11 @@ public Issue user(User user) { * @return user **/ @Schema(description = "") - public User getUser() { + public ComponentsschemasUserYaml getUser() { return user; } - public void setUser(User user) { + public void setUser(ComponentsschemasUserYaml user) { this.user = user; } @@ -138,7 +174,7 @@ public Issue title(String title) { * Get title * @return title **/ - @Schema(required = true, description = "") + @Schema(description = "") public String getTitle() { return title; } @@ -156,7 +192,7 @@ public Issue body(String body) { * Get body * @return body **/ - @Schema(required = true, description = "") + @Schema(description = "") public String getBody() { return body; } @@ -165,12 +201,15 @@ public void setBody(String body) { this.body = body; } - public Issue labels(List labels) { + public Issue labels(List labels) { this.labels = labels; return this; } - public Issue addLabelsItem(IssueLabels labelsItem) { + public Issue addLabelsItem(Object labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList(); + } this.labels.add(labelsItem); return this; } @@ -179,16 +218,16 @@ public Issue addLabelsItem(IssueLabels labelsItem) { * Get labels * @return labels **/ - @Schema(required = true, description = "") - public List getLabels() { + @Schema(description = "") + public List getLabels() { return labels; } - public void setLabels(List labels) { + public void setLabels(List labels) { this.labels = labels; } - public Issue milestone(IssueMilestone milestone) { + public Issue milestone(Object milestone) { this.milestone = milestone; return this; } @@ -197,16 +236,16 @@ public Issue milestone(IssueMilestone milestone) { * Get milestone * @return milestone **/ - @Schema(required = true, description = "") - public IssueMilestone getMilestone() { + @Schema(description = "") + public Object getMilestone() { return milestone; } - public void setMilestone(IssueMilestone milestone) { + public void setMilestone(Object milestone) { this.milestone = milestone; } - public Issue assignee(IssueAssignee assignee) { + public Issue assignee(ComponentsschemasUserYaml assignee) { this.assignee = assignee; return this; } @@ -215,16 +254,16 @@ public Issue assignee(IssueAssignee assignee) { * Get assignee * @return assignee **/ - @Schema(required = true, description = "") - public IssueAssignee getAssignee() { + @Schema(description = "") + public ComponentsschemasUserYaml getAssignee() { return assignee; } - public void setAssignee(IssueAssignee assignee) { + public void setAssignee(ComponentsschemasUserYaml assignee) { this.assignee = assignee; } - public Issue state(String state) { + public Issue state(StateEnum state) { this.state = state; return this; } @@ -234,11 +273,11 @@ public Issue state(String state) { * @return state **/ @Schema(description = "") - public String getState() { + public StateEnum getState() { return state; } - public void setState(String state) { + public void setState(StateEnum state) { this.state = state; } @@ -260,7 +299,7 @@ public void setComments(Integer comments) { this.comments = comments; } - public Issue createdAt(String createdAt) { + public Issue createdAt(OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } @@ -270,15 +309,15 @@ public Issue createdAt(String createdAt) { * @return createdAt **/ @Schema(description = "") - public String getCreatedAt() { + public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(String createdAt) { + public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public Issue updatedAt(String updatedAt) { + public Issue updatedAt(OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } @@ -288,11 +327,11 @@ public Issue updatedAt(String updatedAt) { * @return updatedAt **/ @Schema(description = "") - public String getUpdatedAt() { + public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(String updatedAt) { + public void setUpdatedAt(OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -302,10 +341,10 @@ public Issue pullRequest(Object pullRequest) { } /** - * Get pullRequest + * Present when the issue is associated with a pull request * @return pullRequest **/ - @Schema(description = "") + @Schema(description = "Present when the issue is associated with a pull request") public Object getPullRequest() { return pullRequest; } @@ -314,24 +353,6 @@ public void setPullRequest(Object pullRequest) { this.pullRequest = pullRequest; } - public Issue closed(Boolean closed) { - this.closed = closed; - return this; - } - - /** - * Get closed - * @return closed - **/ - @Schema(required = true, description = "") - public Boolean isClosed() { - return closed; - } - - public void setClosed(Boolean closed) { - this.closed = closed; - } - @Override public boolean equals(java.lang.Object o) { @@ -354,13 +375,12 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.comments, issue.comments) && Objects.equals(this.createdAt, issue.createdAt) && Objects.equals(this.updatedAt, issue.updatedAt) && - Objects.equals(this.pullRequest, issue.pullRequest) && - Objects.equals(this.closed, issue.closed); + Objects.equals(this.pullRequest, issue.pullRequest); } @Override public int hashCode() { - return Objects.hash(id, number, user, title, body, labels, milestone, assignee, state, comments, createdAt, updatedAt, pullRequest, closed); + return Objects.hash(id, number, user, title, body, labels, milestone, assignee, state, comments, createdAt, updatedAt, pullRequest); } @@ -382,7 +402,6 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" pullRequest: ").append(toIndentedString(pullRequest)).append("\n"); - sb.append(" closed: ").append(toIndentedString(closed)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/Java/src/main/java/io/swagger/client/model/IssueAssignee.java b/Java/src/main/java/io/swagger/client/model/IssueAssignee.java deleted file mode 100644 index edc98c6..0000000 --- a/Java/src/main/java/io/swagger/client/model/IssueAssignee.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * IssueAssignee - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class IssueAssignee { - @SerializedName("id") - private Integer id = null; - - @SerializedName("login") - private String login = null; - - @SerializedName("full_name") - private String fullName = null; - - @SerializedName("avatar_url") - private String avatarUrl = null; - - @SerializedName("username") - private String username = null; - - public IssueAssignee id(Integer id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @Schema(description = "") - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public IssueAssignee login(String login) { - this.login = login; - return this; - } - - /** - * Get login - * @return login - **/ - @Schema(description = "") - public String getLogin() { - return login; - } - - public void setLogin(String login) { - this.login = login; - } - - public IssueAssignee fullName(String fullName) { - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @Schema(description = "") - public String getFullName() { - return fullName; - } - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - public IssueAssignee avatarUrl(String avatarUrl) { - this.avatarUrl = avatarUrl; - return this; - } - - /** - * Get avatarUrl - * @return avatarUrl - **/ - @Schema(description = "") - public String getAvatarUrl() { - return avatarUrl; - } - - public void setAvatarUrl(String avatarUrl) { - this.avatarUrl = avatarUrl; - } - - public IssueAssignee username(String username) { - this.username = username; - return this; - } - - /** - * Get username - * @return username - **/ - @Schema(description = "") - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IssueAssignee issueAssignee = (IssueAssignee) o; - return Objects.equals(this.id, issueAssignee.id) && - Objects.equals(this.login, issueAssignee.login) && - Objects.equals(this.fullName, issueAssignee.fullName) && - Objects.equals(this.avatarUrl, issueAssignee.avatarUrl) && - Objects.equals(this.username, issueAssignee.username); - } - - @Override - public int hashCode() { - return Objects.hash(id, login, fullName, avatarUrl, username); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IssueAssignee {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" login: ").append(toIndentedString(login)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" avatarUrl: ").append(toIndentedString(avatarUrl)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/IssueLabels.java b/Java/src/main/java/io/swagger/client/model/IssueLabels.java deleted file mode 100644 index 891a88f..0000000 --- a/Java/src/main/java/io/swagger/client/model/IssueLabels.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * IssueLabels - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class IssueLabels { - @SerializedName("id") - private Integer id = null; - - @SerializedName("name") - private String name = null; - - @SerializedName("color") - private String color = null; - - @SerializedName("url") - private String url = null; - - public IssueLabels id(Integer id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @Schema(description = "") - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public IssueLabels name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @Schema(description = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public IssueLabels color(String color) { - this.color = color; - return this; - } - - /** - * Get color - * @return color - **/ - @Schema(description = "") - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public IssueLabels url(String url) { - this.url = url; - return this; - } - - /** - * Get url - * @return url - **/ - @Schema(description = "") - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IssueLabels issueLabels = (IssueLabels) o; - return Objects.equals(this.id, issueLabels.id) && - Objects.equals(this.name, issueLabels.name) && - Objects.equals(this.color, issueLabels.color) && - Objects.equals(this.url, issueLabels.url); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, color, url); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IssueLabels {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/IssueMilestone.java b/Java/src/main/java/io/swagger/client/model/IssueMilestone.java deleted file mode 100644 index 88455ba..0000000 --- a/Java/src/main/java/io/swagger/client/model/IssueMilestone.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * IssueMilestone - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class IssueMilestone { - @SerializedName("id") - private Integer id = null; - - @SerializedName("title") - private String title = null; - - @SerializedName("description") - private String description = null; - - @SerializedName("state") - private String state = null; - - @SerializedName("open_issues") - private Integer openIssues = null; - - @SerializedName("closed_issues") - private Integer closedIssues = null; - - @SerializedName("closed_at") - private String closedAt = null; - - @SerializedName("due_on") - private String dueOn = null; - - public IssueMilestone id(Integer id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @Schema(description = "") - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public IssueMilestone title(String title) { - this.title = title; - return this; - } - - /** - * Get title - * @return title - **/ - @Schema(description = "") - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public IssueMilestone description(String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @Schema(description = "") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public IssueMilestone state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @Schema(description = "") - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public IssueMilestone openIssues(Integer openIssues) { - this.openIssues = openIssues; - return this; - } - - /** - * Get openIssues - * @return openIssues - **/ - @Schema(description = "") - public Integer getOpenIssues() { - return openIssues; - } - - public void setOpenIssues(Integer openIssues) { - this.openIssues = openIssues; - } - - public IssueMilestone closedIssues(Integer closedIssues) { - this.closedIssues = closedIssues; - return this; - } - - /** - * Get closedIssues - * @return closedIssues - **/ - @Schema(description = "") - public Integer getClosedIssues() { - return closedIssues; - } - - public void setClosedIssues(Integer closedIssues) { - this.closedIssues = closedIssues; - } - - public IssueMilestone closedAt(String closedAt) { - this.closedAt = closedAt; - return this; - } - - /** - * Get closedAt - * @return closedAt - **/ - @Schema(description = "") - public String getClosedAt() { - return closedAt; - } - - public void setClosedAt(String closedAt) { - this.closedAt = closedAt; - } - - public IssueMilestone dueOn(String dueOn) { - this.dueOn = dueOn; - return this; - } - - /** - * Get dueOn - * @return dueOn - **/ - @Schema(description = "") - public String getDueOn() { - return dueOn; - } - - public void setDueOn(String dueOn) { - this.dueOn = dueOn; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IssueMilestone issueMilestone = (IssueMilestone) o; - return Objects.equals(this.id, issueMilestone.id) && - Objects.equals(this.title, issueMilestone.title) && - Objects.equals(this.description, issueMilestone.description) && - Objects.equals(this.state, issueMilestone.state) && - Objects.equals(this.openIssues, issueMilestone.openIssues) && - Objects.equals(this.closedIssues, issueMilestone.closedIssues) && - Objects.equals(this.closedAt, issueMilestone.closedAt) && - Objects.equals(this.dueOn, issueMilestone.dueOn); - } - - @Override - public int hashCode() { - return Objects.hash(id, title, description, state, openIssues, closedIssues, closedAt, dueOn); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IssueMilestone {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" openIssues: ").append(toIndentedString(openIssues)).append("\n"); - sb.append(" closedIssues: ").append(toIndentedString(closedIssues)).append("\n"); - sb.append(" closedAt: ").append(toIndentedString(closedAt)).append("\n"); - sb.append(" dueOn: ").append(toIndentedString(dueOn)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/Issues.java b/Java/src/main/java/io/swagger/client/model/Issues.java index d8a9cef..838caa7 100644 --- a/Java/src/main/java/io/swagger/client/model/Issues.java +++ b/Java/src/main/java/io/swagger/client/model/Issues.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -14,15 +14,15 @@ import java.util.Objects; import java.util.Arrays; -import io.swagger.client.model.Issue; +import io.swagger.client.model.ComponentsschemasIssueYaml; import java.util.ArrayList; import java.util.List; /** * Issues */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class Issues extends ArrayList { +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") +public class Issues extends ArrayList { @Override public boolean equals(java.lang.Object o) { diff --git a/Java/src/main/java/io/swagger/client/model/Labels.java b/Java/src/main/java/io/swagger/client/model/Labels.java deleted file mode 100644 index 03a4d0d..0000000 --- a/Java/src/main/java/io/swagger/client/model/Labels.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import io.swagger.v3.oas.annotations.media.Schema; -import java.util.ArrayList; -import java.util.List; -/** - * Labels **ID** to associate with this issue. **Note:** Only users with write access can set labels for new issues. Labels are silently dropped otherwise. - */ -@Schema(description = "Labels **ID** to associate with this issue. **Note:** Only users with write access can set labels for new issues. Labels are silently dropped otherwise.") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class Labels extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Labels {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/MigrateRepo.java b/Java/src/main/java/io/swagger/client/model/MigrateRepo.java deleted file mode 100644 index 4dddc59..0000000 --- a/Java/src/main/java/io/swagger/client/model/MigrateRepo.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * MigrateRepo - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class MigrateRepo { - @SerializedName("clone_addr") - private String cloneAddr = null; - - @SerializedName("auth_username") - private String authUsername = null; - - @SerializedName("auth_password") - private String authPassword = null; - - @SerializedName("user_id") - private Integer userId = null; - - @SerializedName("repo_name") - private String repoName = null; - - @SerializedName("mirror") - private Boolean mirror = false; - - /** - * Repository will be private or public. - */ - @JsonAdapter(VisibilityEnum.Adapter.class) - public enum VisibilityEnum { - PRIVATE("private"), - PUBLIC("public"); - - private String value; - - VisibilityEnum(String value) { - this.value = value; - } - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - public static VisibilityEnum fromValue(String input) { - for (VisibilityEnum b : VisibilityEnum.values()) { - if (b.value.equals(input)) { - return b; - } - } - return null; - } - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VisibilityEnum enumeration) throws IOException { - jsonWriter.value(String.valueOf(enumeration.getValue())); - } - - @Override - public VisibilityEnum read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextString(); - return VisibilityEnum.fromValue((String)(value)); - } - } - } @SerializedName("visibility") - private VisibilityEnum visibility = false; - - @SerializedName("description") - private String description = null; - - public MigrateRepo cloneAddr(String cloneAddr) { - this.cloneAddr = cloneAddr; - return this; - } - - /** - * Remote Git address (HTTP/HTTPS URL or local path) - * @return cloneAddr - **/ - @Schema(required = true, description = "Remote Git address (HTTP/HTTPS URL or local path)") - public String getCloneAddr() { - return cloneAddr; - } - - public void setCloneAddr(String cloneAddr) { - this.cloneAddr = cloneAddr; - } - - public MigrateRepo authUsername(String authUsername) { - this.authUsername = authUsername; - return this; - } - - /** - * Authorization username - * @return authUsername - **/ - @Schema(description = "Authorization username") - public String getAuthUsername() { - return authUsername; - } - - public void setAuthUsername(String authUsername) { - this.authUsername = authUsername; - } - - public MigrateRepo authPassword(String authPassword) { - this.authPassword = authPassword; - return this; - } - - /** - * Authorization password - * @return authPassword - **/ - @Schema(description = "Authorization password") - public String getAuthPassword() { - return authPassword; - } - - public void setAuthPassword(String authPassword) { - this.authPassword = authPassword; - } - - public MigrateRepo userId(Integer userId) { - this.userId = userId; - return this; - } - - /** - * User ID who takes ownership of this repository - * @return userId - **/ - @Schema(required = true, description = "User ID who takes ownership of this repository") - public Integer getUserId() { - return userId; - } - - public void setUserId(Integer userId) { - this.userId = userId; - } - - public MigrateRepo repoName(String repoName) { - this.repoName = repoName; - return this; - } - - /** - * Name of the repository - * @return repoName - **/ - @Schema(example = "repo-name", description = "Name of the repository") - public String getRepoName() { - return repoName; - } - - public void setRepoName(String repoName) { - this.repoName = repoName; - } - - public MigrateRepo mirror(Boolean mirror) { - this.mirror = mirror; - return this; - } - - /** - * Repository will be a mirror (connected repository). - * @return mirror - **/ - @Schema(description = "Repository will be a mirror (connected repository).") - public Boolean isMirror() { - return mirror; - } - - public void setMirror(Boolean mirror) { - this.mirror = mirror; - } - - public MigrateRepo visibility(VisibilityEnum visibility) { - this.visibility = visibility; - return this; - } - - /** - * Repository will be private or public. - * @return visibility - **/ - @Schema(description = "Repository will be private or public.") - public VisibilityEnum getVisibility() { - return visibility; - } - - public void setVisibility(VisibilityEnum visibility) { - this.visibility = visibility; - } - - public MigrateRepo description(String description) { - this.description = description; - return this; - } - - /** - * Description of the repository - * @return description - **/ - @Schema(example = "This is a repository", description = "Description of the repository") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MigrateRepo migrateRepo = (MigrateRepo) o; - return Objects.equals(this.cloneAddr, migrateRepo.cloneAddr) && - Objects.equals(this.authUsername, migrateRepo.authUsername) && - Objects.equals(this.authPassword, migrateRepo.authPassword) && - Objects.equals(this.userId, migrateRepo.userId) && - Objects.equals(this.repoName, migrateRepo.repoName) && - Objects.equals(this.mirror, migrateRepo.mirror) && - Objects.equals(this.visibility, migrateRepo.visibility) && - Objects.equals(this.description, migrateRepo.description); - } - - @Override - public int hashCode() { - return Objects.hash(cloneAddr, authUsername, authPassword, userId, repoName, mirror, visibility, description); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MigrateRepo {\n"); - - sb.append(" cloneAddr: ").append(toIndentedString(cloneAddr)).append("\n"); - sb.append(" authUsername: ").append(toIndentedString(authUsername)).append("\n"); - sb.append(" authPassword: ").append(toIndentedString(authPassword)).append("\n"); - sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); - sb.append(" repoName: ").append(toIndentedString(repoName)).append("\n"); - sb.append(" mirror: ").append(toIndentedString(mirror)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/PatchIssue.java b/Java/src/main/java/io/swagger/client/model/PatchIssue.java index b3eeecd..8edee0c 100644 --- a/Java/src/main/java/io/swagger/client/model/PatchIssue.java +++ b/Java/src/main/java/io/swagger/client/model/PatchIssue.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -19,31 +19,35 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.client.model.State; +import io.swagger.client.model.ComponentsschemasAssigneeYaml; +import io.swagger.client.model.ComponentsschemasBodyYaml; +import io.swagger.client.model.ComponentsschemasMilestoneYaml; +import io.swagger.client.model.ComponentsschemasStateYaml; +import io.swagger.client.model.ComponentsschemasTitleYaml; import io.swagger.v3.oas.annotations.media.Schema; import java.io.IOException; /** * PatchIssue */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") public class PatchIssue { @SerializedName("title") - private String title = null; + private ComponentsschemasTitleYaml title = null; @SerializedName("body") - private String body = null; + private ComponentsschemasBodyYaml body = null; @SerializedName("assignee") - private String assignee = null; + private ComponentsschemasAssigneeYaml assignee = null; @SerializedName("milestone") - private Integer milestone = null; + private ComponentsschemasMilestoneYaml milestone = null; @SerializedName("state") - private State state = null; + private ComponentsschemasStateYaml state = null; - public PatchIssue title(String title) { + public PatchIssue title(ComponentsschemasTitleYaml title) { this.title = title; return this; } @@ -53,15 +57,15 @@ public PatchIssue title(String title) { * @return title **/ @Schema(description = "") - public String getTitle() { + public ComponentsschemasTitleYaml getTitle() { return title; } - public void setTitle(String title) { + public void setTitle(ComponentsschemasTitleYaml title) { this.title = title; } - public PatchIssue body(String body) { + public PatchIssue body(ComponentsschemasBodyYaml body) { this.body = body; return this; } @@ -71,15 +75,15 @@ public PatchIssue body(String body) { * @return body **/ @Schema(description = "") - public String getBody() { + public ComponentsschemasBodyYaml getBody() { return body; } - public void setBody(String body) { + public void setBody(ComponentsschemasBodyYaml body) { this.body = body; } - public PatchIssue assignee(String assignee) { + public PatchIssue assignee(ComponentsschemasAssigneeYaml assignee) { this.assignee = assignee; return this; } @@ -89,15 +93,15 @@ public PatchIssue assignee(String assignee) { * @return assignee **/ @Schema(description = "") - public String getAssignee() { + public ComponentsschemasAssigneeYaml getAssignee() { return assignee; } - public void setAssignee(String assignee) { + public void setAssignee(ComponentsschemasAssigneeYaml assignee) { this.assignee = assignee; } - public PatchIssue milestone(Integer milestone) { + public PatchIssue milestone(ComponentsschemasMilestoneYaml milestone) { this.milestone = milestone; return this; } @@ -107,15 +111,15 @@ public PatchIssue milestone(Integer milestone) { * @return milestone **/ @Schema(description = "") - public Integer getMilestone() { + public ComponentsschemasMilestoneYaml getMilestone() { return milestone; } - public void setMilestone(Integer milestone) { + public void setMilestone(ComponentsschemasMilestoneYaml milestone) { this.milestone = milestone; } - public PatchIssue state(State state) { + public PatchIssue state(ComponentsschemasStateYaml state) { this.state = state; return this; } @@ -125,11 +129,11 @@ public PatchIssue state(State state) { * @return state **/ @Schema(description = "") - public State getState() { + public ComponentsschemasStateYaml getState() { return state; } - public void setState(State state) { + public void setState(ComponentsschemasStateYaml state) { this.state = state; } diff --git a/Java/src/main/java/io/swagger/client/model/PostIssue.java b/Java/src/main/java/io/swagger/client/model/PostIssue.java index 821b5ed..8f99878 100644 --- a/Java/src/main/java/io/swagger/client/model/PostIssue.java +++ b/Java/src/main/java/io/swagger/client/model/PostIssue.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -19,34 +19,39 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.client.model.Labels; +import io.swagger.client.model.ComponentsschemasAssigneeYaml; +import io.swagger.client.model.ComponentsschemasBodyYaml; +import io.swagger.client.model.ComponentsschemasClosedYaml; +import io.swagger.client.model.ComponentsschemasLabelsYaml; +import io.swagger.client.model.ComponentsschemasMilestoneYaml; +import io.swagger.client.model.ComponentsschemasTitleYaml; import io.swagger.v3.oas.annotations.media.Schema; import java.io.IOException; /** * PostIssue */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") public class PostIssue { @SerializedName("title") - private String title = null; + private ComponentsschemasTitleYaml title = null; @SerializedName("body") - private String body = null; + private ComponentsschemasBodyYaml body = null; @SerializedName("assignee") - private String assignee = null; + private ComponentsschemasAssigneeYaml assignee = null; @SerializedName("milestone") - private Integer milestone = null; + private ComponentsschemasMilestoneYaml milestone = null; @SerializedName("labels") - private Labels labels = null; + private ComponentsschemasLabelsYaml labels = null; @SerializedName("closed") - private Boolean closed = null; + private ComponentsschemasClosedYaml closed = null; - public PostIssue title(String title) { + public PostIssue title(ComponentsschemasTitleYaml title) { this.title = title; return this; } @@ -56,15 +61,15 @@ public PostIssue title(String title) { * @return title **/ @Schema(description = "") - public String getTitle() { + public ComponentsschemasTitleYaml getTitle() { return title; } - public void setTitle(String title) { + public void setTitle(ComponentsschemasTitleYaml title) { this.title = title; } - public PostIssue body(String body) { + public PostIssue body(ComponentsschemasBodyYaml body) { this.body = body; return this; } @@ -74,15 +79,15 @@ public PostIssue body(String body) { * @return body **/ @Schema(description = "") - public String getBody() { + public ComponentsschemasBodyYaml getBody() { return body; } - public void setBody(String body) { + public void setBody(ComponentsschemasBodyYaml body) { this.body = body; } - public PostIssue assignee(String assignee) { + public PostIssue assignee(ComponentsschemasAssigneeYaml assignee) { this.assignee = assignee; return this; } @@ -92,15 +97,15 @@ public PostIssue assignee(String assignee) { * @return assignee **/ @Schema(description = "") - public String getAssignee() { + public ComponentsschemasAssigneeYaml getAssignee() { return assignee; } - public void setAssignee(String assignee) { + public void setAssignee(ComponentsschemasAssigneeYaml assignee) { this.assignee = assignee; } - public PostIssue milestone(Integer milestone) { + public PostIssue milestone(ComponentsschemasMilestoneYaml milestone) { this.milestone = milestone; return this; } @@ -110,15 +115,15 @@ public PostIssue milestone(Integer milestone) { * @return milestone **/ @Schema(description = "") - public Integer getMilestone() { + public ComponentsschemasMilestoneYaml getMilestone() { return milestone; } - public void setMilestone(Integer milestone) { + public void setMilestone(ComponentsschemasMilestoneYaml milestone) { this.milestone = milestone; } - public PostIssue labels(Labels labels) { + public PostIssue labels(ComponentsschemasLabelsYaml labels) { this.labels = labels; return this; } @@ -128,15 +133,15 @@ public PostIssue labels(Labels labels) { * @return labels **/ @Schema(description = "") - public Labels getLabels() { + public ComponentsschemasLabelsYaml getLabels() { return labels; } - public void setLabels(Labels labels) { + public void setLabels(ComponentsschemasLabelsYaml labels) { this.labels = labels; } - public PostIssue closed(Boolean closed) { + public PostIssue closed(ComponentsschemasClosedYaml closed) { this.closed = closed; return this; } @@ -146,11 +151,11 @@ public PostIssue closed(Boolean closed) { * @return closed **/ @Schema(description = "") - public Boolean getClosed() { + public ComponentsschemasClosedYaml getClosed() { return closed; } - public void setClosed(Boolean closed) { + public void setClosed(ComponentsschemasClosedYaml closed) { this.closed = closed; } diff --git a/Java/src/main/java/io/swagger/client/model/PutFile.java b/Java/src/main/java/io/swagger/client/model/PutFile.java index 38740b7..8515140 100644 --- a/Java/src/main/java/io/swagger/client/model/PutFile.java +++ b/Java/src/main/java/io/swagger/client/model/PutFile.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * PutFile */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") public class PutFile { @SerializedName("commit_summary") private String commitSummary = null; diff --git a/Java/src/main/java/io/swagger/client/model/RepoHooksBody.java b/Java/src/main/java/io/swagger/client/model/RepoHooksBody.java deleted file mode 100644 index 5a82f3f..0000000 --- a/Java/src/main/java/io/swagger/client/model/RepoHooksBody.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.client.model.WebhookConfig; -import io.swagger.client.model.WebhookEvents; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * RepoHooksBody - */ - -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class RepoHooksBody { - /** - * The type of webhook - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DAGSHUB("dagshub"), - SLACK("slack"), - DISCORD("discord"), - DINGTALK("dingtalk"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - public static TypeEnum fromValue(String input) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(input)) { - return b; - } - } - return null; - } - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(String.valueOf(enumeration.getValue())); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextString(); - return TypeEnum.fromValue((String)(value)); - } - } - } @SerializedName("type") - private TypeEnum type = null; - - @SerializedName("config") - private WebhookConfig config = null; - - @SerializedName("events") - private WebhookEvents events = null; - - public RepoHooksBody type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * The type of webhook - * @return type - **/ - @Schema(example = "discord", required = true, description = "The type of webhook") - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - public RepoHooksBody config(WebhookConfig config) { - this.config = config; - return this; - } - - /** - * Get config - * @return config - **/ - @Schema(required = true, description = "") - public WebhookConfig getConfig() { - return config; - } - - public void setConfig(WebhookConfig config) { - this.config = config; - } - - public RepoHooksBody events(WebhookEvents events) { - this.events = events; - return this; - } - - /** - * Get events - * @return events - **/ - @Schema(description = "") - public WebhookEvents getEvents() { - return events; - } - - public void setEvents(WebhookEvents events) { - this.events = events; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RepoHooksBody repoHooksBody = (RepoHooksBody) o; - return Objects.equals(this.type, repoHooksBody.type) && - Objects.equals(this.config, repoHooksBody.config) && - Objects.equals(this.events, repoHooksBody.events); - } - - @Override - public int hashCode() { - return Objects.hash(type, config, events); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RepoHooksBody {\n"); - - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" config: ").append(toIndentedString(config)).append("\n"); - sb.append(" events: ").append(toIndentedString(events)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/main/java/io/swagger/client/model/State.java b/Java/src/main/java/io/swagger/client/model/State.java deleted file mode 100644 index 5a54cfe..0000000 --- a/Java/src/main/java/io/swagger/client/model/State.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.annotations.SerializedName; -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets State - */ -@JsonAdapter(State.Adapter.class) -public enum State { - OPEN("open"), - CLOSED("closed"); - - private String value; - - State(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static State fromValue(String input) { - for (State b : State.values()) { - if (b.value.equals(input)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final State enumeration) throws IOException { - jsonWriter.value(String.valueOf(enumeration.getValue())); - } - - @Override - public State read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextString(); - return State.fromValue((String)(value)); - } - } -} diff --git a/Java/src/main/java/io/swagger/client/model/User.java b/Java/src/main/java/io/swagger/client/model/User.java index 3c73a31..d9a0f67 100644 --- a/Java/src/main/java/io/swagger/client/model/User.java +++ b/Java/src/main/java/io/swagger/client/model/User.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,24 +25,36 @@ * User */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-06-11T12:30:28.047632461Z[Etc/UTC]") public class User { @SerializedName("id") - private Integer id = null; + private Long id = null; @SerializedName("login") private String login = null; + @SerializedName("username") + private String username = null; + @SerializedName("full_name") private String fullName = null; @SerializedName("avatar_url") private String avatarUrl = null; - @SerializedName("username") - private String username = null; + @SerializedName("public_email") + private String publicEmail = null; + + @SerializedName("website") + private String website = null; + + @SerializedName("company") + private String company = null; + + @SerializedName("description") + private String description = null; - public User id(Integer id) { + public User id(Long id) { this.id = id; return this; } @@ -52,11 +64,11 @@ public User id(Integer id) { * @return id **/ @Schema(description = "") - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } @@ -78,6 +90,24 @@ public void setLogin(String login) { this.login = login; } + public User username(String username) { + this.username = username; + return this; + } + + /** + * Alias for login (legacy compatibility) + * @return username + **/ + @Schema(description = "Alias for login (legacy compatibility)") + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + public User fullName(String fullName) { this.fullName = fullName; return this; @@ -114,22 +144,76 @@ public void setAvatarUrl(String avatarUrl) { this.avatarUrl = avatarUrl; } - public User username(String username) { - this.username = username; + public User publicEmail(String publicEmail) { + this.publicEmail = publicEmail; return this; } /** - * Get username - * @return username + * Get publicEmail + * @return publicEmail **/ @Schema(description = "") - public String getUsername() { - return username; + public String getPublicEmail() { + return publicEmail; } - public void setUsername(String username) { - this.username = username; + public void setPublicEmail(String publicEmail) { + this.publicEmail = publicEmail; + } + + public User website(String website) { + this.website = website; + return this; + } + + /** + * Get website + * @return website + **/ + @Schema(description = "") + public String getWebsite() { + return website; + } + + public void setWebsite(String website) { + this.website = website; + } + + public User company(String company) { + this.company = company; + return this; + } + + /** + * Get company + * @return company + **/ + @Schema(description = "") + public String getCompany() { + return company; + } + + public void setCompany(String company) { + this.company = company; + } + + public User description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @Schema(description = "") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; } @@ -144,14 +228,18 @@ public boolean equals(java.lang.Object o) { User user = (User) o; return Objects.equals(this.id, user.id) && Objects.equals(this.login, user.login) && + Objects.equals(this.username, user.username) && Objects.equals(this.fullName, user.fullName) && Objects.equals(this.avatarUrl, user.avatarUrl) && - Objects.equals(this.username, user.username); + Objects.equals(this.publicEmail, user.publicEmail) && + Objects.equals(this.website, user.website) && + Objects.equals(this.company, user.company) && + Objects.equals(this.description, user.description); } @Override public int hashCode() { - return Objects.hash(id, login, fullName, avatarUrl, username); + return Objects.hash(id, login, username, fullName, avatarUrl, publicEmail, website, company, description); } @@ -162,9 +250,13 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" login: ").append(toIndentedString(login)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); sb.append(" avatarUrl: ").append(toIndentedString(avatarUrl)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" publicEmail: ").append(toIndentedString(publicEmail)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append(" company: ").append(toIndentedString(company)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/Java/src/main/java/io/swagger/client/model/WebhookConfig.java b/Java/src/main/java/io/swagger/client/model/WebhookConfig.java deleted file mode 100644 index 5eed4cd..0000000 --- a/Java/src/main/java/io/swagger/client/model/WebhookConfig.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.v3.oas.annotations.media.Schema; -import java.io.IOException; -/** - * Key/value pairs to provide settings for this hook - */ -@Schema(description = "Key/value pairs to provide settings for this hook") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") -public class WebhookConfig { - @SerializedName("url") - private String url = null; - - /** - * A string defining the media type used to serialize the payloads. - */ - @JsonAdapter(ContentTypeEnum.Adapter.class) - public enum ContentTypeEnum { - JSON("json"), - FORM("form"); - - private String value; - - ContentTypeEnum(String value) { - this.value = value; - } - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - public static ContentTypeEnum fromValue(String input) { - for (ContentTypeEnum b : ContentTypeEnum.values()) { - if (b.value.equals(input)) { - return b; - } - } - return null; - } - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ContentTypeEnum enumeration) throws IOException { - jsonWriter.value(String.valueOf(enumeration.getValue())); - } - - @Override - public ContentTypeEnum read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextString(); - return ContentTypeEnum.fromValue((String)(value)); - } - } - } @SerializedName("content_type") - private ContentTypeEnum contentType = null; - - @SerializedName("secret") - private String secret = null; - - public WebhookConfig url(String url) { - this.url = url; - return this; - } - - /** - * A string defining the URL to which the payloads will be delivered. - * @return url - **/ - @Schema(example = "http://yourwebsite.io", required = true, description = "A string defining the URL to which the payloads will be delivered.") - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public WebhookConfig contentType(ContentTypeEnum contentType) { - this.contentType = contentType; - return this; - } - - /** - * A string defining the media type used to serialize the payloads. - * @return contentType - **/ - @Schema(example = "json", required = true, description = "A string defining the media type used to serialize the payloads.") - public ContentTypeEnum getContentType() { - return contentType; - } - - public void setContentType(ContentTypeEnum contentType) { - this.contentType = contentType; - } - - public WebhookConfig secret(String secret) { - this.secret = secret; - return this; - } - - /** - * An optional string that's passed with the HTTP requests body. - * @return secret - **/ - @Schema(example = "supersecretkey", description = "An optional string that's passed with the HTTP requests body.") - public String getSecret() { - return secret; - } - - public void setSecret(String secret) { - this.secret = secret; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WebhookConfig webhookConfig = (WebhookConfig) o; - return Objects.equals(this.url, webhookConfig.url) && - Objects.equals(this.contentType, webhookConfig.contentType) && - Objects.equals(this.secret, webhookConfig.secret); - } - - @Override - public int hashCode() { - return Objects.hash(url, contentType, secret); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WebhookConfig {\n"); - - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); - sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/Java/src/test/java/io/swagger/client/api/BranchesApiTest.java b/Java/src/test/java/io/swagger/client/api/BranchesApiTest.java deleted file mode 100644 index 0c1c255..0000000 --- a/Java/src/test/java/io/swagger/client/api/BranchesApiTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for BranchesApi - */ -@Ignore -public class BranchesApiTest { - - private final BranchesApi api = new BranchesApi(); - - /** - * Get Branch - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getBranchTest() throws Exception { - String owner = null; - String repo = null; - String branch = null; - api.getBranch(owner, repo, branch); - - // TODO: test validations - } - /** - * List Branches - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void listBranchesTest() throws Exception { - String owner = null; - String repo = null; - api.listBranches(owner, repo); - - // TODO: test validations - } -} diff --git a/Java/src/test/java/io/swagger/client/api/CollaboratorsApiTest.java b/Java/src/test/java/io/swagger/client/api/CollaboratorsApiTest.java deleted file mode 100644 index 30953b7..0000000 --- a/Java/src/test/java/io/swagger/client/api/CollaboratorsApiTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.model.CollaboratorsCollaboratorBody; -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for CollaboratorsApi - */ -@Ignore -public class CollaboratorsApiTest { - - private final CollaboratorsApi api = new CollaboratorsApi(); - - /** - * Add user as a collaborator - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void addCollaboratorTest() throws Exception { - String owner = null; - String repo = null; - String collaborator = null; - CollaboratorsCollaboratorBody body = null; - api.addCollaborator(owner, repo, collaborator, body); - - // TODO: test validations - } - /** - * Get collaborators - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getCollaboratorsTest() throws Exception { - String owner = null; - String repo = null; - api.getCollaborators(owner, repo); - - // TODO: test validations - } - /** - * Delete collaborator - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void removeCollaboratorTest() throws Exception { - String owner = null; - String repo = null; - String collaborator = null; - api.removeCollaborator(owner, repo, collaborator); - - // TODO: test validations - } -} diff --git a/Java/src/test/java/io/swagger/client/api/CommitsApiTest.java b/Java/src/test/java/io/swagger/client/api/CommitsApiTest.java deleted file mode 100644 index a374165..0000000 --- a/Java/src/test/java/io/swagger/client/api/CommitsApiTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for CommitsApi - */ -@Ignore -public class CommitsApiTest { - - private final CommitsApi api = new CommitsApi(); - - /** - * Get a single commit - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getCommitTest() throws Exception { - String owner = null; - String repo = null; - String sha = null; - api.getCommit(owner, repo, sha); - - // TODO: test validations - } -} diff --git a/Java/src/test/java/io/swagger/client/api/ContentApiTest.java b/Java/src/test/java/io/swagger/client/api/ContentApiTest.java deleted file mode 100644 index 3e08a21..0000000 --- a/Java/src/test/java/io/swagger/client/api/ContentApiTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.model.Files; -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for ContentApi - */ -@Ignore -public class ContentApiTest { - - private final ContentApi api = new ContentApi(); - - /** - * Download archive - * - * This method returns archive by given format. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getArchiveTest() throws Exception { - String owner = null; - String repo = null; - String ref = null; - String format = null; - api.getArchive(owner, repo, ref, format); - - // TODO: test validations - } - /** - * List data in a repository folder - * - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getContentTest() throws Exception { - String owner = null; - String repo = null; - String branch = null; - String path = null; - Boolean includeSize = null; - Files response = api.getContent(owner, repo, branch, path, includeSize); - - // TODO: test validations - } - /** - * Download raw content - * - * This method returns the raw content of a file. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getRawTest() throws Exception { - String owner = null; - String repo = null; - String ref = null; - String path = null; - api.getRaw(owner, repo, ref, path); - - // TODO: test validations - } - /** - * Upload data to a repository - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void uploadContentTest() throws Exception { - String owner = null; - String repo = null; - String branch = null; - String path = null; - String commitSummary = null; - String commitMessage = null; - String commitChoice = null; - String lastCommit = null; - String newBranchName = null; - String versioning = null; - String files = null; - api.uploadContent(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files); - - // TODO: test validations - } -} diff --git a/Java/src/test/java/io/swagger/client/api/ExperimentsApiTest.java b/Java/src/test/java/io/swagger/client/api/ExperimentsApiTest.java deleted file mode 100644 index 99d18ae..0000000 --- a/Java/src/test/java/io/swagger/client/api/ExperimentsApiTest.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.model.EditExperimentPost; -import io.swagger.client.model.ExperimentKeys; -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for ExperimentsApi - */ -@Ignore -public class ExperimentsApiTest { - - private final ExperimentsApi api = new ExperimentsApi(); - - /** - * Add label to experiment - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void addExperimentLabelTest() throws Exception { - String owner = null; - String repo = null; - String experimentKey = null; - String experimentLabel = null; - api.addExperimentLabel(owner, repo, experimentKey, experimentLabel); - - // TODO: test validations - } - /** - * Delete experiment - * - * Support both git and MLflow experiments - * - * @throws Exception - * if the Api call fails - */ - @Test - public void deleteExperimentTest() throws Exception { - String owner = null; - String repo = null; - String experimentKey = null; - api.deleteExperiment(owner, repo, experimentKey); - - // TODO: test validations - } - /** - * Delete experiment label - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void deleteExperimentLabelTest() throws Exception { - String owner = null; - String repo = null; - String experimentKey = null; - String experimentLabel = null; - api.deleteExperimentLabel(owner, repo, experimentKey, experimentLabel); - - // TODO: test validations - } - /** - * Edit experiment info - * - * Edit experiment info, currently supports just changing experiment name. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void editExperimentTest() throws Exception { - String owner = null; - String repo = null; - String experimentKey = null; - EditExperimentPost body = null; - api.editExperiment(owner, repo, experimentKey, body); - - // TODO: test validations - } - /** - * Get experiment metrics for experiment - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getExperimentMetricsTest() throws Exception { - String owner = null; - String repo = null; - ExperimentKeys body = null; - api.getExperimentMetrics(owner, repo, body); - - // TODO: test validations - } - /** - * List Experiments - * - * Get a list of experiments in the given repository - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getExperimentsTest() throws Exception { - String owner = null; - String repo = null; - api.getExperiments(owner, repo); - - // TODO: test validations - } -} diff --git a/Java/src/test/java/io/swagger/client/api/IssuesApiTest.java b/Java/src/test/java/io/swagger/client/api/IssuesApiTest.java deleted file mode 100644 index 7600c3b..0000000 --- a/Java/src/test/java/io/swagger/client/api/IssuesApiTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.model.Issue; -import io.swagger.client.model.Issues; -import io.swagger.client.model.PatchIssue; -import io.swagger.client.model.PostIssue; -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for IssuesApi - */ -@Ignore -public class IssuesApiTest { - - private final IssuesApi api = new IssuesApi(); - - /** - * Create an issue - * - * Any user with read access to a repository can create an issue. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void createIssueTest() throws Exception { - String owner = null; - String repo = null; - PostIssue body = null; - Issue response = api.createIssue(owner, repo, body); - - // TODO: test validations - } - /** - * Edit an issue - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void editIssueTest() throws Exception { - String owner = null; - String repo = null; - PatchIssue body = null; - Issue response = api.editIssue(owner, repo, body); - - // TODO: test validations - } - /** - * Get a single issue - * - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getIssueTest() throws Exception { - String owner = null; - String repo = null; - Integer index = null; - Issue response = api.getIssue(owner, repo, index); - - // TODO: test validations - } - /** - * List issues for a repository - * - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void listRepoIssuesTest() throws Exception { - String owner = null; - String repo = null; - Issues response = api.listRepoIssues(owner, repo); - - // TODO: test validations - } -} diff --git a/Java/src/test/java/io/swagger/client/api/ReleasesApiTest.java b/Java/src/test/java/io/swagger/client/api/ReleasesApiTest.java deleted file mode 100644 index 22f29ba..0000000 --- a/Java/src/test/java/io/swagger/client/api/ReleasesApiTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for ReleasesApi - */ -@Ignore -public class ReleasesApiTest { - - private final ReleasesApi api = new ReleasesApi(); - - /** - * List Releases - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void listReleasesTest() throws Exception { - String owner = null; - String repo = null; - api.listReleases(owner, repo); - - // TODO: test validations - } -} diff --git a/Java/src/test/java/io/swagger/client/api/RepositoryApiTest.java b/Java/src/test/java/io/swagger/client/api/RepositoryApiTest.java deleted file mode 100644 index 99f9660..0000000 --- a/Java/src/test/java/io/swagger/client/api/RepositoryApiTest.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.model.CreateRepo; -import io.swagger.client.model.MigrateRepo; -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for RepositoryApi - */ -@Ignore -public class RepositoryApiTest { - - private final RepositoryApi api = new RepositoryApi(); - - /** - * Create in organization - * - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void createOrgRepoTest() throws Exception { - String orgname = null; - CreateRepo body = null; - api.createOrgRepo(orgname, body); - - // TODO: test validations - } - /** - * Create - * - * Create a new repository for the authenticated user. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void createRepoTest() throws Exception { - CreateRepo body = null; - api.createRepo(body); - - // TODO: test validations - } - /** - * Get repository information - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getRepoTest() throws Exception { - String owner = null; - String repo = null; - api.getRepo(owner, repo); - - // TODO: test validations - } - /** - * List your repositories - * - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void listMyReposTest() throws Exception { - Object response = api.listMyRepos(); - - // TODO: test validations - } - /** - * List organization repositories - * - * List repositories that are accessible to the authenticated user. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void listOrgReposTest() throws Exception { - String orgname = null; - api.listOrgRepos(orgname); - - // TODO: test validations - } - /** - * List user repositories - * - * List public repositories for the specified user. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void listUserReposTest() throws Exception { - String username = null; - api.listUserRepos(username); - - // TODO: test validations - } - /** - * Migrate repository - * - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * - * @throws Exception - * if the Api call fails - */ - @Test - public void migrateRepoTest() throws Exception { - MigrateRepo body = null; - api.migrateRepo(body); - - // TODO: test validations - } - /** - * Search repositories - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void searchTest() throws Exception { - String q = null; - Integer uid = null; - Integer limit = null; - Integer page = null; - Object response = api.search(q, uid, limit, page); - - // TODO: test validations - } -} diff --git a/Java/src/test/java/io/swagger/client/api/StorageIntegrationsApiTest.java b/Java/src/test/java/io/swagger/client/api/StorageIntegrationsApiTest.java deleted file mode 100644 index 2e2a999..0000000 --- a/Java/src/test/java/io/swagger/client/api/StorageIntegrationsApiTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.model.Files1; -import io.swagger.client.model.Integration; -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for StorageIntegrationsApi - */ -@Ignore -public class StorageIntegrationsApiTest { - - private final StorageIntegrationsApi api = new StorageIntegrationsApi(); - - /** - * List contents in the path - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getBucketContentTest() throws Exception { - String owner = null; - String repo = null; - String protocol = null; - String bucket = null; - String path = null; - Boolean includeSize = null; - Integer limit = null; - String fromToken = null; - Files1 response = api.getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); - - // TODO: test validations - } - /** - * Get file in the bucket - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getBucketFileTest() throws Exception { - String owner = null; - String repo = null; - String protocol = null; - String bucket = null; - String path = null; - api.getBucketFile(owner, repo, protocol, bucket, path); - - // TODO: test validations - } - /** - * List integrated storages in the repository - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getBucketsTest() throws Exception { - String owner = null; - String repo = null; - Integration response = api.getBuckets(owner, repo); - - // TODO: test validations - } -} diff --git a/Java/src/test/java/io/swagger/client/api/UserApiTest.java b/Java/src/test/java/io/swagger/client/api/UserApiTest.java deleted file mode 100644 index d89c88b..0000000 --- a/Java/src/test/java/io/swagger/client/api/UserApiTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for UserApi - */ -@Ignore -public class UserApiTest { - - private final UserApi api = new UserApi(); - - /** - * Get authenticated user information - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getAuthenticatedUserTest() throws Exception { - api.getAuthenticatedUser(); - - // TODO: test validations - } - /** - * Get information about a user - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void getUserTest() throws Exception { - String username = null; - api.getUser(username); - - // TODO: test validations - } -} diff --git a/Java/src/test/java/io/swagger/client/api/WebhooksApiTest.java b/Java/src/test/java/io/swagger/client/api/WebhooksApiTest.java deleted file mode 100644 index 84fe4c3..0000000 --- a/Java/src/test/java/io/swagger/client/api/WebhooksApiTest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.api; - -import io.swagger.client.model.HooksIdBody; -import io.swagger.client.model.RepoHooksBody; -import org.junit.Test; -import org.junit.Ignore; - - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * API tests for WebhooksApi - */ -@Ignore -public class WebhooksApiTest { - - private final WebhooksApi api = new WebhooksApi(); - - /** - * Create a hook - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void createHookTest() throws Exception { - String owner = null; - String repo = null; - RepoHooksBody body = null; - api.createHook(owner, repo, body); - - // TODO: test validations - } - /** - * Delete a hook - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void deleteHookTest() throws Exception { - String owner = null; - String repo = null; - Integer id = null; - api.deleteHook(owner, repo, id); - - // TODO: test validations - } - /** - * Edit a hook - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void editHookTest() throws Exception { - String owner = null; - String repo = null; - Integer id = null; - HooksIdBody body = null; - api.editHook(owner, repo, id, body); - - // TODO: test validations - } - /** - * List hooks - * - * - * - * @throws Exception - * if the Api call fails - */ - @Test - public void listHooksTest() throws Exception { - String owner = null; - String repo = null; - api.listHooks(owner, repo); - - // TODO: test validations - } -} diff --git a/JavaScript/.babelrc b/JavaScript/.babelrc deleted file mode 100644 index c73df9d..0000000 --- a/JavaScript/.babelrc +++ /dev/null @@ -1,33 +0,0 @@ -{ - "presets": [ - "@babel/preset-env" - ], - "plugins": [ - "@babel/plugin-syntax-dynamic-import", - "@babel/plugin-syntax-import-meta", - "@babel/plugin-proposal-class-properties", - "@babel/plugin-proposal-json-strings", - [ - "@babel/plugin-proposal-decorators", - { - "legacy": true - } - ], - "@babel/plugin-proposal-function-sent", - "@babel/plugin-proposal-export-namespace-from", - "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-throw-expressions", - "@babel/plugin-proposal-export-default-from", - "@babel/plugin-proposal-logical-assignment-operators", - "@babel/plugin-proposal-optional-chaining", - [ - "@babel/plugin-proposal-pipeline-operator", - { - "proposal": "minimal" - } - ], - "@babel/plugin-proposal-nullish-coalescing-operator", - "@babel/plugin-proposal-do-expressions", - "@babel/plugin-proposal-function-bind" - ] -} diff --git a/JavaScript/.swagger-codegen-ignore b/JavaScript/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/JavaScript/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/JavaScript/.swagger-codegen/VERSION b/JavaScript/.swagger-codegen/VERSION deleted file mode 100644 index 053a355..0000000 --- a/JavaScript/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.35 \ No newline at end of file diff --git a/JavaScript/.travis.yml b/JavaScript/.travis.yml deleted file mode 100644 index e49f469..0000000 --- a/JavaScript/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "6" - - "6.1" - - "5" - - "5.11" - diff --git a/JavaScript/README.md b/JavaScript/README.md deleted file mode 100644 index 9ebca43..0000000 --- a/JavaScript/README.md +++ /dev/null @@ -1,189 +0,0 @@ -# dags_hub_api - -DagsHubApi - JavaScript client for dags_hub_api -This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - -- API version: 1.0.2 -- Package version: 1.0.2 -- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen - -## Installation - -### For [Node.js](https://nodejs.org/) - -#### npm - -To publish the library as a [npm](https://www.npmjs.com/), -please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages). - -Then install it via: - -```shell -npm install dags_hub_api --save -``` - -#### git -# -If the library is hosted at a git repository, e.g. -https://github.com/DagsHub/api-clients -then install it via: - -```shell - npm install DagsHub/api-clients --save -``` - -### For browser - -The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following -the above steps with Node.js and installing browserify with `npm install -g browserify`, -perform the following (assuming *main.js* is your entry file): - -```shell -browserify main.js > bundle.js -``` - -Then include *bundle.js* in the HTML pages. - -### Webpack Configuration - -Using Webpack you may encounter the following error: "Module not found: Error: -Cannot resolve module", most certainly you should disable AMD loader. Add/merge -the following section to your webpack config: - -```javascript -module: { - rules: [ - { - parser: { - amd: false - } - } - ] -} -``` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following JS code: - -```javascript -var DagsHubApi = require('dags_hub_api'); -var defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -var basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME' -basicAuth.password = 'YOUR PASSWORD' - -// Configure API key authorization: tokenAuth -var tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = "YOUR API KEY" -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix['token'] = "Token" - -var api = new DagsHubApi.BranchesApi() -var owner = "owner_example"; // {String} owner of the repository -var repo = "repo_example"; // {String} name of the repository -var branch = "branch_example"; // {String} branch of the repository - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -api.getBranch(owner, repo, branch, callback); -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://dagshub.com/api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DagsHubApi.BranchesApi* | [**getBranch**](docs/BranchesApi.md#getBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -*DagsHubApi.BranchesApi* | [**listBranches**](docs/BranchesApi.md#listBranches) | **GET** /repos/{owner}/{repo}/branches | List Branches -*DagsHubApi.CollaboratorsApi* | [**addCollaborator**](docs/CollaboratorsApi.md#addCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -*DagsHubApi.CollaboratorsApi* | [**getCollaborators**](docs/CollaboratorsApi.md#getCollaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -*DagsHubApi.CollaboratorsApi* | [**removeCollaborator**](docs/CollaboratorsApi.md#removeCollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator -*DagsHubApi.CommitsApi* | [**getCommit**](docs/CommitsApi.md#getCommit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit -*DagsHubApi.ContentApi* | [**getArchive**](docs/ContentApi.md#getArchive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -*DagsHubApi.ContentApi* | [**getContent**](docs/ContentApi.md#getContent) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -*DagsHubApi.ContentApi* | [**getRaw**](docs/ContentApi.md#getRaw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -*DagsHubApi.ContentApi* | [**uploadContent**](docs/ContentApi.md#uploadContent) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository -*DagsHubApi.ExperimentsApi* | [**addExperimentLabel**](docs/ExperimentsApi.md#addExperimentLabel) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -*DagsHubApi.ExperimentsApi* | [**deleteExperiment**](docs/ExperimentsApi.md#deleteExperiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -*DagsHubApi.ExperimentsApi* | [**deleteExperimentLabel**](docs/ExperimentsApi.md#deleteExperimentLabel) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -*DagsHubApi.ExperimentsApi* | [**editExperiment**](docs/ExperimentsApi.md#editExperiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -*DagsHubApi.ExperimentsApi* | [**getExperimentMetrics**](docs/ExperimentsApi.md#getExperimentMetrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -*DagsHubApi.ExperimentsApi* | [**getExperiments**](docs/ExperimentsApi.md#getExperiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments -*DagsHubApi.IssuesApi* | [**createIssue**](docs/IssuesApi.md#createIssue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -*DagsHubApi.IssuesApi* | [**editIssue**](docs/IssuesApi.md#editIssue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -*DagsHubApi.IssuesApi* | [**getIssue**](docs/IssuesApi.md#getIssue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -*DagsHubApi.IssuesApi* | [**listRepoIssues**](docs/IssuesApi.md#listRepoIssues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository -*DagsHubApi.ReleasesApi* | [**listReleases**](docs/ReleasesApi.md#listReleases) | **GET** /repos/{owner}/{repo}/releases | List Releases -*DagsHubApi.RepositoryApi* | [**createOrgRepo**](docs/RepositoryApi.md#createOrgRepo) | **POST** /org/{orgname}/repos | Create in organization -*DagsHubApi.RepositoryApi* | [**createRepo**](docs/RepositoryApi.md#createRepo) | **POST** /user/repos | Create -*DagsHubApi.RepositoryApi* | [**getRepo**](docs/RepositoryApi.md#getRepo) | **GET** /repos/{owner}/{repo} | Get repository information -*DagsHubApi.RepositoryApi* | [**listMyRepos**](docs/RepositoryApi.md#listMyRepos) | **GET** /user/repos | List your repositories -*DagsHubApi.RepositoryApi* | [**listOrgRepos**](docs/RepositoryApi.md#listOrgRepos) | **GET** /orgs/{orgname}/repos | List organization repositories -*DagsHubApi.RepositoryApi* | [**listUserRepos**](docs/RepositoryApi.md#listUserRepos) | **GET** /users/{username}/repos | List user repositories -*DagsHubApi.RepositoryApi* | [**migrateRepo**](docs/RepositoryApi.md#migrateRepo) | **POST** /repos/migrate | Migrate repository -*DagsHubApi.RepositoryApi* | [**search**](docs/RepositoryApi.md#search) | **GET** /repos/search | Search repositories -*DagsHubApi.StorageIntegrationsApi* | [**getBucketContent**](docs/StorageIntegrationsApi.md#getBucketContent) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -*DagsHubApi.StorageIntegrationsApi* | [**getBucketFile**](docs/StorageIntegrationsApi.md#getBucketFile) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -*DagsHubApi.StorageIntegrationsApi* | [**getBuckets**](docs/StorageIntegrationsApi.md#getBuckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository -*DagsHubApi.UserApi* | [**getAuthenticatedUser**](docs/UserApi.md#getAuthenticatedUser) | **GET** /user | Get authenticated user information -*DagsHubApi.UserApi* | [**getUser**](docs/UserApi.md#getUser) | **GET** /users/{username} | Get information about a user -*DagsHubApi.WebhooksApi* | [**createHook**](docs/WebhooksApi.md#createHook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -*DagsHubApi.WebhooksApi* | [**deleteHook**](docs/WebhooksApi.md#deleteHook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -*DagsHubApi.WebhooksApi* | [**editHook**](docs/WebhooksApi.md#editHook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -*DagsHubApi.WebhooksApi* | [**listHooks**](docs/WebhooksApi.md#listHooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - -## Documentation for Models - - - [DagsHubApi.Assignee](docs/Assignee.md) - - [DagsHubApi.Body](docs/Body.md) - - [DagsHubApi.Closed](docs/Closed.md) - - [DagsHubApi.CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) - - [DagsHubApi.CreateRepo](docs/CreateRepo.md) - - [DagsHubApi.EditExperimentPost](docs/EditExperimentPost.md) - - [DagsHubApi.ExperimentKeys](docs/ExperimentKeys.md) - - [DagsHubApi.File](docs/File.md) - - [DagsHubApi.Files](docs/Files.md) - - [DagsHubApi.Files1](docs/Files1.md) - - [DagsHubApi.HooksIdBody](docs/HooksIdBody.md) - - [DagsHubApi.Integration](docs/Integration.md) - - [DagsHubApi.IntegrationInner](docs/IntegrationInner.md) - - [DagsHubApi.Issue](docs/Issue.md) - - [DagsHubApi.IssueAssignee](docs/IssueAssignee.md) - - [DagsHubApi.IssueLabels](docs/IssueLabels.md) - - [DagsHubApi.IssueMilestone](docs/IssueMilestone.md) - - [DagsHubApi.Issues](docs/Issues.md) - - [DagsHubApi.Labels](docs/Labels.md) - - [DagsHubApi.MigrateRepo](docs/MigrateRepo.md) - - [DagsHubApi.Milestone](docs/Milestone.md) - - [DagsHubApi.PatchIssue](docs/PatchIssue.md) - - [DagsHubApi.PostIssue](docs/PostIssue.md) - - [DagsHubApi.PutFile](docs/PutFile.md) - - [DagsHubApi.RepoHooksBody](docs/RepoHooksBody.md) - - [DagsHubApi.State](docs/State.md) - - [DagsHubApi.Title](docs/Title.md) - - [DagsHubApi.User](docs/User.md) - - [DagsHubApi.WebhookConfig](docs/WebhookConfig.md) - - [DagsHubApi.WebhookEvents](docs/WebhookEvents.md) - -## Documentation for Authorization - - -### basicAuth - -- **Type**: HTTP basic authentication - -### tokenAuth - -- **Type**: API key -- **API key parameter name**: token -- **Location**: URL query string - diff --git a/JavaScript/docs/Body.md b/JavaScript/docs/Body.md deleted file mode 100644 index 11166e8..0000000 --- a/JavaScript/docs/Body.md +++ /dev/null @@ -1,5 +0,0 @@ -# DagsHubApi.Body - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/JavaScript/docs/BranchesApi.md b/JavaScript/docs/BranchesApi.md deleted file mode 100644 index 911d76a..0000000 --- a/JavaScript/docs/BranchesApi.md +++ /dev/null @@ -1,119 +0,0 @@ -# DagsHubApi.BranchesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getBranch**](BranchesApi.md#getBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -[**listBranches**](BranchesApi.md#listBranches) | **GET** /repos/{owner}/{repo}/branches | List Branches - - -# **getBranch** -> getBranch(owner, repo, branch) - -Get Branch - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.BranchesApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let branch = "branch_example"; // String | branch of the repository - -apiInstance.getBranch(owner, repo, branch, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **branch** | **String**| branch of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **listBranches** -> listBranches(owner, repo) - -List Branches - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.BranchesApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository - -apiInstance.listBranches(owner, repo, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/JavaScript/docs/Closed.md b/JavaScript/docs/Closed.md deleted file mode 100644 index 1c0c35f..0000000 --- a/JavaScript/docs/Closed.md +++ /dev/null @@ -1,5 +0,0 @@ -# DagsHubApi.Closed - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/JavaScript/docs/CollaboratorsApi.md b/JavaScript/docs/CollaboratorsApi.md deleted file mode 100644 index 7c32597..0000000 --- a/JavaScript/docs/CollaboratorsApi.md +++ /dev/null @@ -1,179 +0,0 @@ -# DagsHubApi.CollaboratorsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addCollaborator**](CollaboratorsApi.md#addCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -[**getCollaborators**](CollaboratorsApi.md#getCollaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -[**removeCollaborator**](CollaboratorsApi.md#removeCollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator - - -# **addCollaborator** -> addCollaborator(owner, repo, collaborator, opts) - -Add user as a collaborator - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.CollaboratorsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let collaborator = "collaborator_example"; // String | collaborator username -let opts = { - 'body': new DagsHubApi.CollaboratorsCollaboratorBody() // CollaboratorsCollaboratorBody | -}; -apiInstance.addCollaborator(owner, repo, collaborator, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **collaborator** | **String**| collaborator username | - **body** | [**CollaboratorsCollaboratorBody**](CollaboratorsCollaboratorBody.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **getCollaborators** -> getCollaborators(owner, repo) - -Get collaborators - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.CollaboratorsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository - -apiInstance.getCollaborators(owner, repo, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **removeCollaborator** -> removeCollaborator(owner, repo, collaborator) - -Delete collaborator - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.CollaboratorsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let collaborator = "collaborator_example"; // String | collaborator username - -apiInstance.removeCollaborator(owner, repo, collaborator, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **collaborator** | **String**| collaborator username | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - diff --git a/JavaScript/docs/CollaboratorsCollaboratorBody.md b/JavaScript/docs/CollaboratorsCollaboratorBody.md deleted file mode 100644 index 0744558..0000000 --- a/JavaScript/docs/CollaboratorsCollaboratorBody.md +++ /dev/null @@ -1,6 +0,0 @@ -# DagsHubApi.CollaboratorsCollaboratorBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**permission** | **String** | The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. | [optional] [default to 'write'] diff --git a/JavaScript/docs/CommitsApi.md b/JavaScript/docs/CommitsApi.md deleted file mode 100644 index e25c6e9..0000000 --- a/JavaScript/docs/CommitsApi.md +++ /dev/null @@ -1,64 +0,0 @@ -# DagsHubApi.CommitsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getCommit**](CommitsApi.md#getCommit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit - - -# **getCommit** -> getCommit(owner, repo, sha) - -Get a single commit - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.CommitsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let sha = "sha_example"; // String | a SHA1 of a commit - -apiInstance.getCommit(owner, repo, sha, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **sha** | **String**| a SHA1 of a commit | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/JavaScript/docs/ContentApi.md b/JavaScript/docs/ContentApi.md deleted file mode 100644 index cb9604a..0000000 --- a/JavaScript/docs/ContentApi.md +++ /dev/null @@ -1,267 +0,0 @@ -# DagsHubApi.ContentApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getArchive**](ContentApi.md#getArchive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -[**getContent**](ContentApi.md#getContent) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -[**getRaw**](ContentApi.md#getRaw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -[**uploadContent**](ContentApi.md#uploadContent) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository - - -# **getArchive** -> getArchive(owner, repo, ref, format) - -Download archive - -This method returns archive by given format. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ContentApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let ref = "ref_example"; // String | The name of the commit/branch/tag -let format = "format_example"; // String | The format of archive, either .zip or .tar.gz - -apiInstance.getArchive(owner, repo, ref, format, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **ref** | **String**| The name of the commit/branch/tag | - **format** | **String**| The format of archive, either .zip or .tar.gz | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **getContent** -> Files getContent(owner, repo, branch, path, opts) - -List data in a repository folder - -List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ContentApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let branch = "branch_example"; // String | branch of the repository -let path = "path_example"; // String | path of a folder in the repository -let opts = { - 'includeSize': false // Boolean | -}; -apiInstance.getContent(owner, repo, branch, path, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **branch** | **String**| branch of the repository | - **path** | **String**| path of a folder in the repository | - **includeSize** | **Boolean**| | [optional] [default to false] - -### Return type - -[**Files**](Files.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **getRaw** -> getRaw(owner, repo, ref, path) - -Download raw content - -This method returns the raw content of a file. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ContentApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let ref = "ref_example"; // String | The name of the commit/branch/tag -let path = "path_example"; // String | The content path - -apiInstance.getRaw(owner, repo, ref, path, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **ref** | **String**| The name of the commit/branch/tag | - **path** | **String**| The content path | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **uploadContent** -> uploadContent(owner, repo, branch, path, opts) - -Upload data to a repository - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ContentApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let branch = "branch_example"; // String | branch of the repository -let path = "path_example"; // String | path of a folder in the repository -let opts = { - 'commitSummary': "commitSummary_example", // String | - 'commitMessage': "commitMessage_example", // String | - 'commitChoice': "commitChoice_example", // String | - 'lastCommit': "lastCommit_example", // String | - 'newBranchName': "newBranchName_example", // String | - 'versioning': "versioning_example", // String | - 'files': "files_example" // String | -}; -apiInstance.uploadContent(owner, repo, branch, path, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **branch** | **String**| branch of the repository | - **path** | **String**| path of a folder in the repository | - **commitSummary** | **String**| | [optional] - **commitMessage** | **String**| | [optional] - **commitChoice** | **String**| | [optional] - **lastCommit** | **String**| | [optional] - **newBranchName** | **String**| | [optional] - **versioning** | **String**| | [optional] - **files** | **String**| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: Not defined - diff --git a/JavaScript/docs/CreateRepo.md b/JavaScript/docs/CreateRepo.md deleted file mode 100644 index 5fe9f0e..0000000 --- a/JavaScript/docs/CreateRepo.md +++ /dev/null @@ -1,61 +0,0 @@ -# DagsHubApi.CreateRepo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | name of the repository | -**description** | **String** | A short description of the repository | [optional] -**_private** | **Boolean** | Either true to create a private repository, or false to create a public one. | [optional] [default to false] -**autoInit** | **Boolean** | Pass true to create an initial commit with README, .gitignore and LICENSE. | [optional] [default to false] -**projectTemplate** | **String** | Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. | [optional] -**gitignores** | **String** | Desired language .gitignore templates to apply. Use the name of the templates. | [optional] -**license** | **String** | Desired LICENSE template to apply. Use the name of the template. | [optional] -**readme** | **String** | Desired README template to apply. Use the name of the template. | [optional] [default to 'Default'] - - -## Enum: ProjectTemplateEnum - -* `cookiecutterDagshubDvc` (value: `"cookiecutter-dagshub-dvc"`) -* `custom` (value: `"custom"`) -* `none` (value: `"none"`) -* `notebookTemplate` (value: `"notebook-template"`) - - - -## Enum: LicenseEnum - -* `apacheLicense20` (value: `"Apache License 2.0"`) -* `mITLicense` (value: `"MIT License"`) -* `abstylesLicense` (value: `"Abstyles License"`) -* `academicFreeLicenseV11` (value: `"Academic Free License v1.1"`) -* `academicFreeLicenseV12` (value: `"Academic Free License v1.2"`) -* `academicFreeLicenseV20` (value: `"Academic Free License v2.0"`) -* `academicFreeLicenseV21` (value: `"Academic Free License v2.1"`) -* `academicFreeLicenseV30` (value: `"Academic Free License v3.0"`) -* `afferoGeneralPublicLicenseV10` (value: `"Affero General Public License v1.0"`) -* `apacheLicense10` (value: `"Apache License 1.0"`) -* `apacheLicense11` (value: `"Apache License 1.1"`) -* `artisticLicense10` (value: `"Artistic License 1.0"`) -* `artisticLicense20` (value: `"Artistic License 2.0"`) -* `bSD2ClauseLicense` (value: `"BSD 2-clause License"`) -* `bSD3ClauseLicense` (value: `"BSD 3-clause License"`) -* `bSD4ClauseLicense` (value: `"BSD 4-clause License"`) -* `creativeCommonsCC010Universal` (value: `"Creative Commons CC0 1.0 Universal"`) -* `eclipsePublicLicense10` (value: `"Eclipse Public License 1.0"`) -* `educationalCommunityLicenseV10` (value: `"Educational Community License v1.0"`) -* `educationalCommunityLicenseV20` (value: `"Educational Community License v2.0"`) -* `gNUAfferoGeneralPublicLicenseV30` (value: `"GNU Affero General Public License v3.0"`) -* `gNUFreeDocumentationLicenseV11` (value: `"GNU Free Documentation License v1.1"`) -* `gNUFreeDocumentationLicenseV12` (value: `"GNU Free Documentation License v1.2"`) -* `gNUFreeDocumentationLicenseV13` (value: `"GNU Free Documentation License v1.3"`) -* `gNUGeneralPublicLicenseV10` (value: `"GNU General Public License v1.0"`) -* `gNUGeneralPublicLicenseV20` (value: `"GNU General Public License v2.0"`) -* `gNUGeneralPublicLicenseV30` (value: `"GNU General Public License v3.0"`) -* `gNULesserGeneralPublicLicenseV21` (value: `"GNU Lesser General Public License v2.1"`) -* `gNULesserGeneralPublicLicenseV30` (value: `"GNU Lesser General Public License v3.0"`) -* `gNULibraryGeneralPublicLicenseV20` (value: `"GNU Library General Public License v2.0"`) -* `iSCLicense` (value: `"ISC license"`) -* `mozillaPublicLicense10` (value: `"Mozilla Public License 1.0"`) -* `mozillaPublicLicense11` (value: `"Mozilla Public License 1.1"`) -* `mozillaPublicLicense203` (value: `"Mozilla Public License 2.03"`) - diff --git a/JavaScript/docs/EditExperimentPost.md b/JavaScript/docs/EditExperimentPost.md deleted file mode 100644 index aa6a680..0000000 --- a/JavaScript/docs/EditExperimentPost.md +++ /dev/null @@ -1,6 +0,0 @@ -# DagsHubApi.EditExperimentPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | diff --git a/Java/docs/Labels.md b/JavaScript/docs/ExperimentMetricsResponse.md similarity index 73% rename from Java/docs/Labels.md rename to JavaScript/docs/ExperimentMetricsResponse.md index 30705f5..292a237 100644 --- a/Java/docs/Labels.md +++ b/JavaScript/docs/ExperimentMetricsResponse.md @@ -1,4 +1,4 @@ -# Labels +# DagsHubApi.ExperimentMetricsResponse ## Properties Name | Type | Description | Notes diff --git a/JavaScript/docs/ExperimentsApi.md b/JavaScript/docs/ExperimentsApi.md deleted file mode 100644 index 1164782..0000000 --- a/JavaScript/docs/ExperimentsApi.md +++ /dev/null @@ -1,361 +0,0 @@ -# DagsHubApi.ExperimentsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addExperimentLabel**](ExperimentsApi.md#addExperimentLabel) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -[**deleteExperiment**](ExperimentsApi.md#deleteExperiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -[**deleteExperimentLabel**](ExperimentsApi.md#deleteExperimentLabel) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -[**editExperiment**](ExperimentsApi.md#editExperiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -[**getExperimentMetrics**](ExperimentsApi.md#getExperimentMetrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -[**getExperiments**](ExperimentsApi.md#getExperiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments - - -# **addExperimentLabel** -> addExperimentLabel(owner, repo, experimentKey, experimentLabel) - -Add label to experiment - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ExperimentsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let experimentKey = "experimentKey_example"; // String | a valid experiment key -let experimentLabel = "experimentLabel_example"; // String | A label for the experiment, max 128 characters. - -apiInstance.addExperimentLabel(owner, repo, experimentKey, experimentLabel, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **experimentKey** | **String**| a valid experiment key | - **experimentLabel** | **String**| A label for the experiment, max 128 characters. | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **deleteExperiment** -> deleteExperiment(owner, repo, experimentKey) - -Delete experiment - -Support both git and MLflow experiments - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ExperimentsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let experimentKey = "experimentKey_example"; // String | a valid experiment key - -apiInstance.deleteExperiment(owner, repo, experimentKey, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **experimentKey** | **String**| a valid experiment key | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **deleteExperimentLabel** -> deleteExperimentLabel(owner, repo, experimentKey, experimentLabel) - -Delete experiment label - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ExperimentsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let experimentKey = "experimentKey_example"; // String | a valid experiment key -let experimentLabel = "experimentLabel_example"; // String | A label for the experiment, max 128 characters. - -apiInstance.deleteExperimentLabel(owner, repo, experimentKey, experimentLabel, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **experimentKey** | **String**| a valid experiment key | - **experimentLabel** | **String**| A label for the experiment, max 128 characters. | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **editExperiment** -> editExperiment(owner, repo, experimentKey, opts) - -Edit experiment info - -Edit experiment info, currently supports just changing experiment name. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ExperimentsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let experimentKey = "experimentKey_example"; // String | a valid experiment key -let opts = { - 'body': new DagsHubApi.EditExperimentPost() // EditExperimentPost | -}; -apiInstance.editExperiment(owner, repo, experimentKey, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **experimentKey** | **String**| a valid experiment key | - **body** | [**EditExperimentPost**](EditExperimentPost.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **getExperimentMetrics** -> getExperimentMetrics(owner, repo, opts) - -Get experiment metrics for experiment - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ExperimentsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let opts = { - 'body': new DagsHubApi.ExperimentKeys() // ExperimentKeys | -}; -apiInstance.getExperimentMetrics(owner, repo, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **body** | [**ExperimentKeys**](ExperimentKeys.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **getExperiments** -> getExperiments(owner, repo) - -List Experiments - -Get a list of experiments in the given repository - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ExperimentsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository - -apiInstance.getExperiments(owner, repo, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/JavaScript/docs/ExperimentsResponse.md b/JavaScript/docs/ExperimentsResponse.md new file mode 100644 index 0000000..155a27f --- /dev/null +++ b/JavaScript/docs/ExperimentsResponse.md @@ -0,0 +1,8 @@ +# DagsHubApi.ExperimentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**experiments** | [**{String: ComponentsschemasExperimentYaml}**](ComponentsschemasExperimentYaml.md) | Map of experiment ID to experiment details | [optional] +**isEditor** | **Boolean** | Whether the authenticated user can edit experiments in this repo | [optional] +**nextPageToken** | **String** | Pagination token for the next page of results (empty string when no more pages) | [optional] diff --git a/JavaScript/docs/File.md b/JavaScript/docs/File.md deleted file mode 100644 index 9bb8210..0000000 --- a/JavaScript/docs/File.md +++ /dev/null @@ -1,27 +0,0 @@ -# DagsHubApi.File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**path** | **String** | | [optional] -**type** | **String** | | [optional] -**size** | **Number** | | [optional] -**hash** | **String** | | [optional] -**versioning** | **String** | | [optional] -**downloadUrl** | **String** | | [optional] -**contentUrl** | **String** | | [optional] - - -## Enum: TypeEnum - -* `file` (value: `"file"`) -* `dir` (value: `"dir"`) - - - -## Enum: VersioningEnum - -* `git` (value: `"git"`) -* `dvc` (value: `"dvc"`) -* `bucket` (value: `"bucket"`) - diff --git a/JavaScript/docs/Files1.md b/JavaScript/docs/Files1.md index 4e5c6a8..a91352d 100644 --- a/JavaScript/docs/Files1.md +++ b/JavaScript/docs/Files1.md @@ -3,6 +3,5 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**entries** | **[File]** | | [optional] -**limit** | **Number** | | [optional] -**nextToken** | **String** | | [optional] +**entries** | [**[ComponentsschemasFileYaml]**](ComponentsschemasFileYaml.md) | | [optional] +**nextToken** | **String** | Next token to continue pagination from | [optional] diff --git a/JavaScript/docs/HooksIdBody.md b/JavaScript/docs/HooksIdBody.md deleted file mode 100644 index 752ec1f..0000000 --- a/JavaScript/docs/HooksIdBody.md +++ /dev/null @@ -1,8 +0,0 @@ -# DagsHubApi.HooksIdBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**config** | [**WebhookConfig**](WebhookConfig.md) | | [optional] -**events** | [**WebhookEvents**](WebhookEvents.md) | | [optional] -**active** | **Boolean** | Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. | [optional] diff --git a/JavaScript/docs/IntegrationInner.md b/JavaScript/docs/IntegrationInner.md deleted file mode 100644 index 1707aa5..0000000 --- a/JavaScript/docs/IntegrationInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# DagsHubApi.IntegrationInner - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Name/path of the bucket | [optional] -**protocol** | **String** | Protocol used by the integration | [optional] -**listPath** | **String** | URL to list the root of this bucket | [optional] - - -## Enum: ProtocolEnum - -* `s3` (value: `"s3"`) -* `gs` (value: `"gs"`) - diff --git a/JavaScript/docs/Issue.md b/JavaScript/docs/Issue.md index 6c35158..06d02f9 100644 --- a/JavaScript/docs/Issue.md +++ b/JavaScript/docs/Issue.md @@ -4,16 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **Number** | | [optional] -**_number** | **Number** | | [optional] -**user** | [**User**](User.md) | | [optional] -**title** | [**Title**](Title.md) | | -**body** | [**Body**](Body.md) | | -**labels** | [**[IssueLabels]**](IssueLabels.md) | | -**milestone** | [**IssueMilestone**](IssueMilestone.md) | | -**assignee** | [**IssueAssignee**](IssueAssignee.md) | | +**_number** | **Number** | Issue index within the repository | [optional] +**user** | [**ComponentsschemasUserYaml**](ComponentsschemasUserYaml.md) | | [optional] +**title** | **String** | | [optional] +**body** | **String** | | [optional] +**labels** | **[Object]** | | [optional] +**milestone** | **Object** | | [optional] +**assignee** | [**ComponentsschemasUserYaml**](ComponentsschemasUserYaml.md) | | [optional] **state** | **String** | | [optional] **comments** | **Number** | | [optional] -**createdAt** | **String** | | [optional] -**updatedAt** | **String** | | [optional] -**pullRequest** | **Object** | | [optional] -**closed** | **Boolean** | | +**createdAt** | **Date** | | [optional] +**updatedAt** | **Date** | | [optional] +**pullRequest** | **Object** | Present when the issue is associated with a pull request | [optional] + + +## Enum: StateEnum + +* `open` (value: `"open"`) +* `closed` (value: `"closed"`) + diff --git a/JavaScript/docs/IssueAssignee.md b/JavaScript/docs/IssueAssignee.md deleted file mode 100644 index 4fc6b08..0000000 --- a/JavaScript/docs/IssueAssignee.md +++ /dev/null @@ -1,10 +0,0 @@ -# DagsHubApi.IssueAssignee - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Number** | | [optional] -**login** | **String** | | [optional] -**fullName** | **String** | | [optional] -**avatarUrl** | **String** | | [optional] -**username** | **String** | | [optional] diff --git a/JavaScript/docs/IssueLabels.md b/JavaScript/docs/IssueLabels.md deleted file mode 100644 index 14829aa..0000000 --- a/JavaScript/docs/IssueLabels.md +++ /dev/null @@ -1,9 +0,0 @@ -# DagsHubApi.IssueLabels - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Number** | | [optional] -**name** | **String** | | [optional] -**color** | **String** | | [optional] -**url** | **String** | | [optional] diff --git a/JavaScript/docs/IssueMilestone.md b/JavaScript/docs/IssueMilestone.md deleted file mode 100644 index bc2470c..0000000 --- a/JavaScript/docs/IssueMilestone.md +++ /dev/null @@ -1,13 +0,0 @@ -# DagsHubApi.IssueMilestone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Number** | | [optional] -**title** | **String** | | [optional] -**description** | **String** | | [optional] -**state** | **String** | | [optional] -**openIssues** | **Number** | | [optional] -**closedIssues** | **Number** | | [optional] -**closedAt** | **String** | | [optional] -**dueOn** | **String** | | [optional] diff --git a/JavaScript/docs/IssuesApi.md b/JavaScript/docs/IssuesApi.md deleted file mode 100644 index f543e08..0000000 --- a/JavaScript/docs/IssuesApi.md +++ /dev/null @@ -1,241 +0,0 @@ -# DagsHubApi.IssuesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createIssue**](IssuesApi.md#createIssue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -[**editIssue**](IssuesApi.md#editIssue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -[**getIssue**](IssuesApi.md#getIssue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -[**listRepoIssues**](IssuesApi.md#listRepoIssues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository - - -# **createIssue** -> Issue createIssue(owner, repo, opts) - -Create an issue - -Any user with read access to a repository can create an issue. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.IssuesApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let opts = { - 'body': new DagsHubApi.PostIssue() // PostIssue | -}; -apiInstance.createIssue(owner, repo, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **body** | [**PostIssue**](PostIssue.md)| | [optional] - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **editIssue** -> Issue editIssue(owner, repo, opts) - -Edit an issue - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.IssuesApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let opts = { - 'body': new DagsHubApi.PatchIssue() // PatchIssue | -}; -apiInstance.editIssue(owner, repo, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **body** | [**PatchIssue**](PatchIssue.md)| | [optional] - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **getIssue** -> Issue getIssue(owner, repo, index) - -Get a single issue - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.IssuesApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let index = 56; // Number | the index of an issue or a pull request - -apiInstance.getIssue(owner, repo, index, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **index** | **Number**| the index of an issue or a pull request | - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **listRepoIssues** -> Issues listRepoIssues(owner, repo) - -List issues for a repository - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.IssuesApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository - -apiInstance.listRepoIssues(owner, repo, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -[**Issues**](Issues.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/JavaScript/docs/Labels.md b/JavaScript/docs/Labels.md deleted file mode 100644 index 7b8bb7e..0000000 --- a/JavaScript/docs/Labels.md +++ /dev/null @@ -1,5 +0,0 @@ -# DagsHubApi.Labels - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/JavaScript/docs/MigrateRepo.md b/JavaScript/docs/MigrateRepo.md deleted file mode 100644 index 06542b7..0000000 --- a/JavaScript/docs/MigrateRepo.md +++ /dev/null @@ -1,20 +0,0 @@ -# DagsHubApi.MigrateRepo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cloneAddr** | **String** | Remote Git address (HTTP/HTTPS URL or local path) | -**authUsername** | **String** | Authorization username | [optional] -**authPassword** | **String** | Authorization password | [optional] -**userId** | **Number** | User ID who takes ownership of this repository | -**repoName** | **String** | Name of the repository | [optional] -**mirror** | **Boolean** | Repository will be a mirror (connected repository). | [optional] [default to false] -**visibility** | **String** | Repository will be private or public. | [optional] [default to 'false'] -**description** | **String** | Description of the repository | [optional] - - -## Enum: VisibilityEnum - -* `_private` (value: `"private"`) -* `_public` (value: `"public"`) - diff --git a/JavaScript/docs/Milestone.md b/JavaScript/docs/Milestone.md deleted file mode 100644 index 88ff68c..0000000 --- a/JavaScript/docs/Milestone.md +++ /dev/null @@ -1,5 +0,0 @@ -# DagsHubApi.Milestone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/JavaScript/docs/PatchIssue.md b/JavaScript/docs/PatchIssue.md index 38607d1..c8de17c 100644 --- a/JavaScript/docs/PatchIssue.md +++ b/JavaScript/docs/PatchIssue.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | [**Title**](Title.md) | | [optional] -**body** | [**Body**](Body.md) | | [optional] -**assignee** | [**Assignee**](Assignee.md) | | [optional] -**milestone** | [**Milestone**](Milestone.md) | | [optional] -**state** | [**State**](State.md) | | [optional] +**title** | [**ComponentsschemasTitleYaml**](ComponentsschemasTitleYaml.md) | | [optional] +**body** | [**ComponentsschemasBodyYaml**](ComponentsschemasBodyYaml.md) | | [optional] +**assignee** | [**ComponentsschemasAssigneeYaml**](ComponentsschemasAssigneeYaml.md) | | [optional] +**milestone** | [**ComponentsschemasMilestoneYaml**](ComponentsschemasMilestoneYaml.md) | | [optional] +**state** | [**ComponentsschemasStateYaml**](ComponentsschemasStateYaml.md) | | [optional] diff --git a/JavaScript/docs/PostIssue.md b/JavaScript/docs/PostIssue.md index 242a030..dab7e1c 100644 --- a/JavaScript/docs/PostIssue.md +++ b/JavaScript/docs/PostIssue.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | [**Title**](Title.md) | | [optional] -**body** | [**Body**](Body.md) | | [optional] -**assignee** | [**Assignee**](Assignee.md) | | [optional] -**milestone** | [**Milestone**](Milestone.md) | | [optional] -**labels** | [**Labels**](Labels.md) | | [optional] -**closed** | [**Closed**](Closed.md) | | [optional] +**title** | [**ComponentsschemasTitleYaml**](ComponentsschemasTitleYaml.md) | | [optional] +**body** | [**ComponentsschemasBodyYaml**](ComponentsschemasBodyYaml.md) | | [optional] +**assignee** | [**ComponentsschemasAssigneeYaml**](ComponentsschemasAssigneeYaml.md) | | [optional] +**milestone** | [**ComponentsschemasMilestoneYaml**](ComponentsschemasMilestoneYaml.md) | | [optional] +**labels** | [**ComponentsschemasLabelsYaml**](ComponentsschemasLabelsYaml.md) | | [optional] +**closed** | [**ComponentsschemasClosedYaml**](ComponentsschemasClosedYaml.md) | | [optional] diff --git a/JavaScript/docs/ReleasesApi.md b/JavaScript/docs/ReleasesApi.md deleted file mode 100644 index 7c1e29c..0000000 --- a/JavaScript/docs/ReleasesApi.md +++ /dev/null @@ -1,62 +0,0 @@ -# DagsHubApi.ReleasesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**listReleases**](ReleasesApi.md#listReleases) | **GET** /repos/{owner}/{repo}/releases | List Releases - - -# **listReleases** -> listReleases(owner, repo) - -List Releases - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.ReleasesApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository - -apiInstance.listReleases(owner, repo, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/JavaScript/docs/RepoHooksBody.md b/JavaScript/docs/RepoHooksBody.md deleted file mode 100644 index 92c07e2..0000000 --- a/JavaScript/docs/RepoHooksBody.md +++ /dev/null @@ -1,17 +0,0 @@ -# DagsHubApi.RepoHooksBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | The type of webhook | -**config** | [**WebhookConfig**](WebhookConfig.md) | | -**events** | [**WebhookEvents**](WebhookEvents.md) | | [optional] - - -## Enum: TypeEnum - -* `dagshub` (value: `"dagshub"`) -* `slack` (value: `"slack"`) -* `discord` (value: `"discord"`) -* `dingtalk` (value: `"dingtalk"`) - diff --git a/JavaScript/docs/RepositoryApi.md b/JavaScript/docs/RepositoryApi.md deleted file mode 100644 index b7812fc..0000000 --- a/JavaScript/docs/RepositoryApi.md +++ /dev/null @@ -1,452 +0,0 @@ -# DagsHubApi.RepositoryApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createOrgRepo**](RepositoryApi.md#createOrgRepo) | **POST** /org/{orgname}/repos | Create in organization -[**createRepo**](RepositoryApi.md#createRepo) | **POST** /user/repos | Create -[**getRepo**](RepositoryApi.md#getRepo) | **GET** /repos/{owner}/{repo} | Get repository information -[**listMyRepos**](RepositoryApi.md#listMyRepos) | **GET** /user/repos | List your repositories -[**listOrgRepos**](RepositoryApi.md#listOrgRepos) | **GET** /orgs/{orgname}/repos | List organization repositories -[**listUserRepos**](RepositoryApi.md#listUserRepos) | **GET** /users/{username}/repos | List user repositories -[**migrateRepo**](RepositoryApi.md#migrateRepo) | **POST** /repos/migrate | Migrate repository -[**search**](RepositoryApi.md#search) | **GET** /repos/search | Search repositories - - -# **createOrgRepo** -> createOrgRepo(orgname, opts) - -Create in organization - -Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.RepositoryApi(); -let orgname = "orgname_example"; // String | A DagsHub organization name -let opts = { - 'body': new DagsHubApi.CreateRepo() // CreateRepo | -}; -apiInstance.createOrgRepo(orgname, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgname** | **String**| A DagsHub organization name | - **body** | [**CreateRepo**](CreateRepo.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **createRepo** -> createRepo(opts) - -Create - -Create a new repository for the authenticated user. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.RepositoryApi(); -let opts = { - 'body': new DagsHubApi.CreateRepo() // CreateRepo | -}; -apiInstance.createRepo(opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateRepo**](CreateRepo.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **getRepo** -> getRepo(owner, repo) - -Get repository information - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.RepositoryApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository - -apiInstance.getRepo(owner, repo, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **listMyRepos** -> Object listMyRepos() - -List your repositories - -List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.RepositoryApi(); -apiInstance.listMyRepos((error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**Object** - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **listOrgRepos** -> listOrgRepos(orgname) - -List organization repositories - -List repositories that are accessible to the authenticated user. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.RepositoryApi(); -let orgname = "orgname_example"; // String | A DagsHub organization name - -apiInstance.listOrgRepos(orgname, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgname** | **String**| A DagsHub organization name | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **listUserRepos** -> listUserRepos(username) - -List user repositories - -List public repositories for the specified user. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.RepositoryApi(); -let username = "username_example"; // String | A DagsHub username or organization name - -apiInstance.listUserRepos(username, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| A DagsHub username or organization name | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **migrateRepo** -> migrateRepo(opts) - -Migrate repository - -Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.RepositoryApi(); -let opts = { - 'body': new DagsHubApi.MigrateRepo() // MigrateRepo | -}; -apiInstance.migrateRepo(opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**MigrateRepo**](MigrateRepo.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **search** -> Object search(q, opts) - -Search repositories - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.RepositoryApi(); -let q = "q_example"; // String | -let opts = { - 'uid': 0, // Number | User ID to specify search whose repositories. Default is 0 and search all repositories - 'limit': 10, // Number | Maximum number of repositories in search results. - 'page': 1 // Number | Page number. Default is 1. -}; -apiInstance.search(q, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **q** | **String**| | - **uid** | **Number**| User ID to specify search whose repositories. Default is 0 and search all repositories | [optional] [default to 0] - **limit** | **Number**| Maximum number of repositories in search results. | [optional] [default to 10] - **page** | **Number**| Page number. Default is 1. | [optional] [default to 1] - -### Return type - -**Object** - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/JavaScript/docs/State.md b/JavaScript/docs/State.md deleted file mode 100644 index e78a184..0000000 --- a/JavaScript/docs/State.md +++ /dev/null @@ -1,6 +0,0 @@ -# DagsHubApi.State - -## Enum - -* `open` (value: `"open"`) -* `closed` (value: `"closed"`) diff --git a/JavaScript/docs/StorageIntegrationsApi.md b/JavaScript/docs/StorageIntegrationsApi.md deleted file mode 100644 index 00779e9..0000000 --- a/JavaScript/docs/StorageIntegrationsApi.md +++ /dev/null @@ -1,191 +0,0 @@ -# DagsHubApi.StorageIntegrationsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getBucketContent**](StorageIntegrationsApi.md#getBucketContent) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -[**getBucketFile**](StorageIntegrationsApi.md#getBucketFile) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -[**getBuckets**](StorageIntegrationsApi.md#getBuckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository - - -# **getBucketContent** -> Files1 getBucketContent(owner, repo, protocol, bucket, path, opts) - -List contents in the path - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.StorageIntegrationsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let protocol = "protocol_example"; // String | protocol of the storage integration -let bucket = "bucket_example"; // String | name and prefix of the bucket integration -let path = "path_example"; // String | path of a folder in the repository -let opts = { - 'includeSize': false, // Boolean | - 'limit': 100, // Number | Maximum amount of items to return - 'fromToken': "fromToken_example" // String | Token, from which to continue iteration -}; -apiInstance.getBucketContent(owner, repo, protocol, bucket, path, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **protocol** | **String**| protocol of the storage integration | - **bucket** | **String**| name and prefix of the bucket integration | - **path** | **String**| path of a folder in the repository | - **includeSize** | **Boolean**| | [optional] [default to false] - **limit** | **Number**| Maximum amount of items to return | [optional] [default to 100] - **fromToken** | **String**| Token, from which to continue iteration | [optional] - -### Return type - -[**Files1**](Files1.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **getBucketFile** -> getBucketFile(owner, repo, protocol, bucket, path) - -Get file in the bucket - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.StorageIntegrationsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let protocol = "protocol_example"; // String | protocol of the storage integration -let bucket = "bucket_example"; // String | name and prefix of the bucket integration -let path = "path_example"; // String | The content path - -apiInstance.getBucketFile(owner, repo, protocol, bucket, path, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **protocol** | **String**| protocol of the storage integration | - **bucket** | **String**| name and prefix of the bucket integration | - **path** | **String**| The content path | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **getBuckets** -> Integration getBuckets(owner, repo) - -List integrated storages in the repository - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.StorageIntegrationsApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository - -apiInstance.getBuckets(owner, repo, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -[**Integration**](Integration.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/JavaScript/docs/Title.md b/JavaScript/docs/Title.md deleted file mode 100644 index 12b8d5e..0000000 --- a/JavaScript/docs/Title.md +++ /dev/null @@ -1,5 +0,0 @@ -# DagsHubApi.Title - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/JavaScript/docs/User.md b/JavaScript/docs/User.md index d91386e..4dfbd8b 100644 --- a/JavaScript/docs/User.md +++ b/JavaScript/docs/User.md @@ -5,6 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **Number** | | [optional] **login** | **String** | | [optional] +**username** | **String** | Alias for login (legacy compatibility) | [optional] **fullName** | **String** | | [optional] **avatarUrl** | **String** | | [optional] -**username** | **String** | | [optional] +**publicEmail** | **String** | | [optional] +**website** | **String** | | [optional] +**company** | **String** | | [optional] +**description** | **String** | | [optional] diff --git a/JavaScript/docs/UserApi.md b/JavaScript/docs/UserApi.md deleted file mode 100644 index c071177..0000000 --- a/JavaScript/docs/UserApi.md +++ /dev/null @@ -1,108 +0,0 @@ -# DagsHubApi.UserApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getAuthenticatedUser**](UserApi.md#getAuthenticatedUser) | **GET** /user | Get authenticated user information -[**getUser**](UserApi.md#getUser) | **GET** /users/{username} | Get information about a user - - -# **getAuthenticatedUser** -> getAuthenticatedUser() - -Get authenticated user information - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.UserApi(); -apiInstance.getAuthenticatedUser((error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **getUser** -> getUser(username) - -Get information about a user - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.UserApi(); -let username = "username_example"; // String | A DagsHub username or organization name - -apiInstance.getUser(username, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| A DagsHub username or organization name | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/JavaScript/docs/WebhookConfig.md b/JavaScript/docs/WebhookConfig.md deleted file mode 100644 index 66ee7e1..0000000 --- a/JavaScript/docs/WebhookConfig.md +++ /dev/null @@ -1,15 +0,0 @@ -# DagsHubApi.WebhookConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **String** | A string defining the URL to which the payloads will be delivered. | -**contentType** | **String** | A string defining the media type used to serialize the payloads. | -**secret** | **String** | An optional string that's passed with the HTTP requests body. | [optional] - - -## Enum: ContentTypeEnum - -* `json` (value: `"json"`) -* `form` (value: `"form"`) - diff --git a/JavaScript/docs/WebhookEvents.md b/JavaScript/docs/WebhookEvents.md deleted file mode 100644 index e4fe649..0000000 --- a/JavaScript/docs/WebhookEvents.md +++ /dev/null @@ -1,5 +0,0 @@ -# DagsHubApi.WebhookEvents - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/JavaScript/docs/WebhooksApi.md b/JavaScript/docs/WebhooksApi.md deleted file mode 100644 index ad1893e..0000000 --- a/JavaScript/docs/WebhooksApi.md +++ /dev/null @@ -1,237 +0,0 @@ -# DagsHubApi.WebhooksApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createHook**](WebhooksApi.md#createHook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -[**deleteHook**](WebhooksApi.md#deleteHook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -[**editHook**](WebhooksApi.md#editHook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -[**listHooks**](WebhooksApi.md#listHooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - - -# **createHook** -> createHook(owner, repo, opts) - -Create a hook - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.WebhooksApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let opts = { - 'body': new DagsHubApi.RepoHooksBody() // RepoHooksBody | -}; -apiInstance.createHook(owner, repo, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **body** | [**RepoHooksBody**](RepoHooksBody.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **deleteHook** -> deleteHook(owner, repo, id) - -Delete a hook - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.WebhooksApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let id = 56; // Number | - -apiInstance.deleteHook(owner, repo, id, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **id** | **Number**| | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **editHook** -> editHook(owner, repo, id, opts) - -Edit a hook - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.WebhooksApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository -let id = 56; // Number | -let opts = { - 'body': new DagsHubApi.HooksIdBody() // HooksIdBody | -}; -apiInstance.editHook(owner, repo, id, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - **id** | **Number**| | - **body** | [**HooksIdBody**](HooksIdBody.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **listHooks** -> listHooks(owner, repo) - -List hooks - -### Example -```javascript -import {DagsHubApi} from 'dags_hub_api'; -let defaultClient = DagsHubApi.ApiClient.instance; -// Configure HTTP basic authorization: basicAuth -let basicAuth = defaultClient.authentications['basicAuth']; -basicAuth.username = 'YOUR USERNAME'; -basicAuth.password = 'YOUR PASSWORD'; - -// Configure API key authorization: tokenAuth -let tokenAuth = defaultClient.authentications['tokenAuth']; -tokenAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//tokenAuth.apiKeyPrefix = 'Token'; - -let apiInstance = new DagsHubApi.WebhooksApi(); -let owner = "owner_example"; // String | owner of the repository -let repo = "repo_example"; // String | name of the repository - -apiInstance.listHooks(owner, repo, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repository | - **repo** | **String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/JavaScript/git_push.sh b/JavaScript/git_push.sh deleted file mode 100644 index 55c5020..0000000 --- a/JavaScript/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="DagsHub" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="api-clients" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the Git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/JavaScript/mocha.opts b/JavaScript/mocha.opts deleted file mode 100644 index 9070118..0000000 --- a/JavaScript/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---timeout 10000 diff --git a/JavaScript/package.json b/JavaScript/package.json deleted file mode 100644 index 3fe6b1e..0000000 --- a/JavaScript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "dags_hub_api", - "version": "1.0.2", - "description": "This_API_provides_a_way_to_retrive__interact_with_data_about_DagsHub_repositories_users_issues_webhooks_and_more_The_API_is_also_used_by_the__DagsHub_Direct_Data_Access_streaming_client_httpsgithub_comDagsHubclient_to_stream_content_from_a_repository_for_easier_and_faster_training_", - "license": "Unlicense", - "main": "src/index.js", - "scripts": { - "test": "mocha --require @babel/register --recursive" - }, - "browser": { - "fs": false - }, - "dependencies": { - "@babel/cli": "^7.0.0", - "superagent": "^5.3.0" - }, - "devDependencies": { - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-decorators": "^7.0.0", - "@babel/plugin-proposal-do-expressions": "^7.0.0", - "@babel/plugin-proposal-export-default-from": "^7.0.0", - "@babel/plugin-proposal-export-namespace-from": "^7.0.0", - "@babel/plugin-proposal-function-bind": "^7.0.0", - "@babel/plugin-proposal-function-sent": "^7.0.0", - "@babel/plugin-proposal-json-strings": "^7.0.0", - "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-numeric-separator": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-proposal-pipeline-operator": "^7.0.0", - "@babel/plugin-proposal-throw-expressions": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-syntax-import-meta": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/register": "^7.0.0", - "expect.js": "^0.3.1", - "mocha": "^8.0.1", - "sinon": "^7.2.0" - } -} diff --git a/JavaScript/src/ApiClient.js b/JavaScript/src/ApiClient.js deleted file mode 100644 index 32ef9e1..0000000 --- a/JavaScript/src/ApiClient.js +++ /dev/null @@ -1,586 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import superagent from "superagent"; -import querystring from "querystring"; - -/** -* @module ApiClient -* @version 1.0.2 -*/ - -/** -* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an -* application to use this class directly - the *Api and model classes provide the public API for the service. The -* contents of this file should be regarded as internal but are documented for completeness. -* @alias module:ApiClient -* @class -*/ -export class ApiClient { - constructor() { - /** - * The base URL against which to resolve every API call's (relative) path. - * @type {String} - * @default https://dagshub.com/api/v1 - */ - this.basePath = 'https://dagshub.com/api/v1'.replace(/\/+$/, ''); - - /** - * The authentication methods to be included for all API calls. - * @type {Array.} - */ - this.authentications = { - 'basicAuth': {type: 'basic'}, - 'tokenAuth': {type: 'apiKey', 'in': 'query', name: 'token'} - } - - /** - * The default HTTP headers to be included for all API calls. - * @type {Array.} - * @default {} - */ - this.defaultHeaders = {}; - - /** - * The default HTTP timeout for all API calls. - * @type {Number} - * @default 60000 - */ - this.timeout = 60000; - - /** - * If set to false an additional timestamp parameter is added to all API GET calls to - * prevent browser caching - * @type {Boolean} - * @default true - */ - this.cache = true; - - /** - * If set to true, the client will save the cookies from each server - * response, and return them in the next request. - * @default false - */ - this.enableCookies = false; - - /* - * Used to save and return cookies in a node.js (non-browser) setting, - * if this.enableCookies is set to true. - */ - if (typeof window === 'undefined') { - this.agent = new superagent.agent(); - } - - /* - * Allow user to override superagent agent - */ - this.requestAgent = null; - - } - - /** - * Returns a string representation for an actual parameter. - * @param param The actual parameter. - * @returns {String} The string representation of param. - */ - paramToString(param) { - if (param == undefined || param == null) { - return ''; - } - if (param instanceof Date) { - return param.toJSON(); - } - - return param.toString(); - } - - /** - * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. - * NOTE: query parameters are not handled here. - * @param {String} path The path to append to the base URL. - * @param {Object} pathParams The parameter values to append. - * @returns {String} The encoded path with parameter values substituted. - */ - buildUrl(path, pathParams) { - if (!path.match(/^\//)) { - path = '/' + path; - } - - var url = this.basePath + path; - url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => { - var value; - if (pathParams.hasOwnProperty(key)) { - value = this.paramToString(pathParams[key]); - } else { - value = fullMatch; - } - - return encodeURIComponent(value); - }); - - return url; - } - - /** - * Checks whether the given content type represents JSON.
- * JSON content type examples:
- *
    - *
  • application/json
  • - *
  • application/json; charset=UTF8
  • - *
  • APPLICATION/JSON
  • - *
- * @param {String} contentType The MIME content type to check. - * @returns {Boolean} true if contentType represents JSON, otherwise false. - */ - isJsonMime(contentType) { - return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); - } - - /** - * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. - * @param {Array.} contentTypes - * @returns {String} The chosen content type, preferring JSON. - */ - jsonPreferredMime(contentTypes) { - for (var i = 0; i < contentTypes.length; i++) { - if (this.isJsonMime(contentTypes[i])) { - return contentTypes[i]; - } - } - - return contentTypes[0]; - } - - /** - * Checks whether the given parameter value represents file-like content. - * @param param The parameter to check. - * @returns {Boolean} true if param represents a file. - */ - isFileParam(param) { - // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) - if (typeof require === 'function') { - let fs; - try { - fs = require('fs'); - } catch (err) {} - if (fs && fs.ReadStream && param instanceof fs.ReadStream) { - return true; - } - } - - // Buffer in Node.js - if (typeof Buffer === 'function' && param instanceof Buffer) { - return true; - } - - // Blob in browser - if (typeof Blob === 'function' && param instanceof Blob) { - return true; - } - - // File in browser (it seems File object is also instance of Blob, but keep this for safe) - if (typeof File === 'function' && param instanceof File) { - return true; - } - - return false; - } - - /** - * Normalizes parameter values: - *
    - *
  • remove nils
  • - *
  • keep files and arrays
  • - *
  • format to string with `paramToString` for other cases
  • - *
- * @param {Object.} params The parameters as object properties. - * @returns {Object.} normalized parameters. - */ - normalizeParams(params) { - var newParams = {}; - for (var key in params) { - if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { - var value = params[key]; - if (this.isFileParam(value) || Array.isArray(value)) { - newParams[key] = value; - } else { - newParams[key] = this.paramToString(value); - } - } - } - - return newParams; - } - - /** - * Enumeration of collection format separator strategies. - * @enum {String} - * @readonly - */ - static CollectionFormatEnum = { - /** - * Comma-separated values. Value: csv - * @const - */ - CSV: ',', - - /** - * Space-separated values. Value: ssv - * @const - */ - SSV: ' ', - - /** - * Tab-separated values. Value: tsv - * @const - */ - TSV: '\t', - - /** - * Pipe(|)-separated values. Value: pipes - * @const - */ - PIPES: '|', - - /** - * Native array. Value: multi - * @const - */ - MULTI: 'multi' - }; - - /** - * Builds a string representation of an array-type actual parameter, according to the given collection format. - * @param {Array} param An array parameter. - * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. - * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns - * param as is if collectionFormat is multi. - */ - buildCollectionParam(param, collectionFormat) { - if (param == null) { - return null; - } - switch (collectionFormat) { - case 'csv': - return param.map(this.paramToString).join(','); - case 'ssv': - return param.map(this.paramToString).join(' '); - case 'tsv': - return param.map(this.paramToString).join('\t'); - case 'pipes': - return param.map(this.paramToString).join('|'); - case 'multi': - //return the array directly as SuperAgent will handle it as expected - return param.map(this.paramToString); - default: - throw new Error('Unknown collection format: ' + collectionFormat); - } - } - - /** - * Applies authentication headers to the request. - * @param {Object} request The request object created by a superagent() call. - * @param {Array.} authNames An array of authentication method names. - */ - applyAuthToRequest(request, authNames) { - authNames.forEach((authName) => { - var auth = this.authentications[authName]; - switch (auth.type) { - case 'basic': - if (auth.username || auth.password) { - request.auth(auth.username || '', auth.password || ''); - } - - break; - case 'apiKey': - if (auth.apiKey) { - var data = {}; - if (auth.apiKeyPrefix) { - data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; - } else { - data[auth.name] = auth.apiKey; - } - - if (auth['in'] === 'header') { - request.set(data); - } else { - request.query(data); - } - } - - break; - case 'oauth2': - if (auth.accessToken) { - request.set({'Authorization': 'Bearer ' + auth.accessToken}); - } - - break; - default: - throw new Error('Unknown authentication type: ' + auth.type); - } - }); - } - - /** - * Deserializes an HTTP response body into a value of the specified type. - * @param {Object} response A SuperAgent response object. - * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns A value of the specified type. - */ - deserialize(response, returnType) { - if (response == null || returnType == null || response.status == 204) { - return null; - } - - // Rely on SuperAgent for parsing response body. - // See http://visionmedia.github.io/superagent/#parsing-response-bodies - var data = response.body; - if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) { - // SuperAgent does not always produce a body; use the unparsed response as a fallback - data = response.text; - } - - return ApiClient.convertToType(data, returnType); - } - - /** - * Callback function to receive the result of the operation. - * @callback module:ApiClient~callApiCallback - * @param {String} error Error message, if any. - * @param data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Invokes the REST service using the supplied settings and parameters. - * @param {String} path The base URL to invoke. - * @param {String} httpMethod The HTTP method to use. - * @param {Object.} pathParams A map of path parameters and their values. - * @param {Object.} queryParams A map of query parameters and their values. - * @param {Object.} headerParams A map of header parameters and their values. - * @param {Object.} formParams A map of form parameters and their values. - * @param {Object} bodyParam The value to pass as the request body. - * @param {Array.} authNames An array of authentication type names. - * @param {Array.} contentTypes An array of request MIME types. - * @param {Array.} accepts An array of acceptable response MIME types. - * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the - * constructor for a complex type. - * @param {module:ApiClient~callApiCallback} callback The callback function. - * @returns {Object} The SuperAgent request object. - */ - callApi(path, httpMethod, pathParams, - queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, - returnType, callback) { - - var url = this.buildUrl(path, pathParams); - var request = superagent(httpMethod, url); - - // apply authentications - this.applyAuthToRequest(request, authNames); - - // set query parameters - if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { - queryParams['_'] = new Date().getTime(); - } - - request.query(this.normalizeParams(queryParams)); - - // set header parameters - request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - - // set requestAgent if it is set by user - if (this.requestAgent) { - request.agent(this.requestAgent); - } - - // set request timeout - request.timeout(this.timeout); - - var contentType = this.jsonPreferredMime(contentTypes); - if (contentType) { - // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) - if(contentType != 'multipart/form-data') { - request.type(contentType); - } - } else if (!request.header['Content-Type']) { - request.type('application/json'); - } - - if (contentType === 'application/x-www-form-urlencoded') { - request.send(querystring.stringify(this.normalizeParams(formParams))); - } else if (contentType == 'multipart/form-data') { - var _formParams = this.normalizeParams(formParams); - for (var key in _formParams) { - if (_formParams.hasOwnProperty(key)) { - if (this.isFileParam(_formParams[key])) { - // file field - request.attach(key, _formParams[key]); - } else { - request.field(key, _formParams[key]); - } - } - } - } else if (bodyParam) { - request.send(bodyParam); - } - - var accept = this.jsonPreferredMime(accepts); - if (accept) { - request.accept(accept); - } - - if (returnType === 'Blob') { - request.responseType('blob'); - } else if (returnType === 'String') { - request.responseType('string'); - } - - // Attach previously saved cookies, if enabled - if (this.enableCookies){ - if (typeof window === 'undefined') { - this.agent.attachCookies(request); - } - else { - request.withCredentials(); - } - } - - - - request.end((error, response) => { - if (callback) { - var data = null; - if (!error) { - try { - data = this.deserialize(response, returnType); - if (this.enableCookies && typeof window === 'undefined'){ - this.agent.saveCookies(response); - } - } catch (err) { - error = err; - } - } - - callback(error, data, response); - } - }); - - return request; - } - - /** - * Parses an ISO-8601 string representation of a date value. - * @param {String} str The date value as a string. - * @returns {Date} The parsed date object. - */ - static parseDate(str) { - return new Date(str); - } - - /** - * Converts a value to the specified type. - * @param {(String|Object)} data The data to convert, as a string or object. - * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns An instance of the specified type or null or undefined if data is null or undefined. - */ - static convertToType(data, type) { - if (data === null || data === undefined) - return data - - switch (type) { - case 'Boolean': - return Boolean(data); - case 'Integer': - return parseInt(data, 10); - case 'Number': - return parseFloat(data); - case 'String': - return String(data); - case 'Date': - return ApiClient.parseDate(String(data)); - case 'Blob': - return data; - default: - if (type === Object) { - // generic object, return directly - return data; - } else if (typeof type === 'function') { - // for model type like: User - return type.constructFromObject(data); - } else if (Array.isArray(type)) { - // for array type like: ['String'] - var itemType = type[0]; - - return data.map((item) => { - return ApiClient.convertToType(item, itemType); - }); - } else if (typeof type === 'object') { - // for plain object type like: {'String': 'Integer'} - var keyType, valueType; - for (var k in type) { - if (type.hasOwnProperty(k)) { - keyType = k; - valueType = type[k]; - break; - } - } - - var result = {}; - for (var k in data) { - if (data.hasOwnProperty(k)) { - var key = ApiClient.convertToType(k, keyType); - var value = ApiClient.convertToType(data[k], valueType); - result[key] = value; - } - } - - return result; - } else { - // for unknown type, return the data directly - return data; - } - } - } - - /** - * Constructs a new map or array model from REST data. - * @param data {Object|Array} The REST data. - * @param obj {Object|Array} The target object or array. - */ - static constructFromObject(data, obj, itemType) { - if (Array.isArray(data)) { - for (var i = 0; i < data.length; i++) { - if (data.hasOwnProperty(i)) - obj[i] = ApiClient.convertToType(data[i], itemType); - } - } else { - for (var k in data) { - if (data.hasOwnProperty(k)) - obj[k] = ApiClient.convertToType(data[k], itemType); - } - } - }; -} - -/** -* The default API client implementation. -* @type {module:ApiClient} -*/ -ApiClient.instance = new ApiClient(); diff --git a/JavaScript/src/api/BranchesApi.js b/JavaScript/src/api/BranchesApi.js deleted file mode 100644 index 57a6960..0000000 --- a/JavaScript/src/api/BranchesApi.js +++ /dev/null @@ -1,142 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; - -/** -* Branches service. -* @module api/BranchesApi -* @version 1.0.2 -*/ -export class BranchesApi { - - /** - * Constructs a new BranchesApi. - * @alias module:api/BranchesApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the getBranch operation. - * @callback moduleapi/BranchesApi~getBranchCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Get Branch - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} branch branch of the repository - * @param {module:api/BranchesApi~getBranchCallback} callback The callback function, accepting three arguments: error, data, response - */ - getBranch(owner, repo, branch, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getBranch"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getBranch"); - } - // verify the required parameter 'branch' is set - if (branch === undefined || branch === null) { - throw new Error("Missing the required parameter 'branch' when calling getBranch"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'branch': branch - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/branches/{branch}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the listBranches operation. - * @callback moduleapi/BranchesApi~listBranchesCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * List Branches - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {module:api/BranchesApi~listBranchesCallback} callback The callback function, accepting three arguments: error, data, response - */ - listBranches(owner, repo, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling listBranches"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling listBranches"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/branches', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/api/CollaboratorsApi.js b/JavaScript/src/api/CollaboratorsApi.js deleted file mode 100644 index b92c286..0000000 --- a/JavaScript/src/api/CollaboratorsApi.js +++ /dev/null @@ -1,200 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; -import {CollaboratorsCollaboratorBody} from '../model/CollaboratorsCollaboratorBody'; - -/** -* Collaborators service. -* @module api/CollaboratorsApi -* @version 1.0.2 -*/ -export class CollaboratorsApi { - - /** - * Constructs a new CollaboratorsApi. - * @alias module:api/CollaboratorsApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the addCollaborator operation. - * @callback moduleapi/CollaboratorsApi~addCollaboratorCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Add user as a collaborator - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} collaborator collaborator username - * @param {Object} opts Optional parameters - * @param {module:model/CollaboratorsCollaboratorBody} opts.body - * @param {module:api/CollaboratorsApi~addCollaboratorCallback} callback The callback function, accepting three arguments: error, data, response - */ - addCollaborator(owner, repo, collaborator, opts, callback) { - opts = opts || {}; - let postBody = opts['body']; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling addCollaborator"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling addCollaborator"); - } - // verify the required parameter 'collaborator' is set - if (collaborator === undefined || collaborator === null) { - throw new Error("Missing the required parameter 'collaborator' when calling addCollaborator"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'collaborator': collaborator - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['application/json']; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/collaborators/{collaborator}', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the getCollaborators operation. - * @callback moduleapi/CollaboratorsApi~getCollaboratorsCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Get collaborators - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {module:api/CollaboratorsApi~getCollaboratorsCallback} callback The callback function, accepting three arguments: error, data, response - */ - getCollaborators(owner, repo, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getCollaborators"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getCollaborators"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/collaborators', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the removeCollaborator operation. - * @callback moduleapi/CollaboratorsApi~removeCollaboratorCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete collaborator - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} collaborator collaborator username - * @param {module:api/CollaboratorsApi~removeCollaboratorCallback} callback The callback function, accepting three arguments: error, data, response - */ - removeCollaborator(owner, repo, collaborator, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling removeCollaborator"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling removeCollaborator"); - } - // verify the required parameter 'collaborator' is set - if (collaborator === undefined || collaborator === null) { - throw new Error("Missing the required parameter 'collaborator' when calling removeCollaborator"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'collaborator': collaborator - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/collaborators/{collaborator}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/api/CommitsApi.js b/JavaScript/src/api/CommitsApi.js deleted file mode 100644 index 4ecb322..0000000 --- a/JavaScript/src/api/CommitsApi.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; - -/** -* Commits service. -* @module api/CommitsApi -* @version 1.0.2 -*/ -export class CommitsApi { - - /** - * Constructs a new CommitsApi. - * @alias module:api/CommitsApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the getCommit operation. - * @callback moduleapi/CommitsApi~getCommitCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Get a single commit - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} sha a SHA1 of a commit - * @param {module:api/CommitsApi~getCommitCallback} callback The callback function, accepting three arguments: error, data, response - */ - getCommit(owner, repo, sha, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getCommit"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getCommit"); - } - // verify the required parameter 'sha' is set - if (sha === undefined || sha === null) { - throw new Error("Missing the required parameter 'sha' when calling getCommit"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'sha': sha - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/commits/{sha}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/api/ContentApi.js b/JavaScript/src/api/ContentApi.js deleted file mode 100644 index ed1a7cb..0000000 --- a/JavaScript/src/api/ContentApi.js +++ /dev/null @@ -1,292 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; -import {Files} from '../model/Files'; - -/** -* Content service. -* @module api/ContentApi -* @version 1.0.2 -*/ -export class ContentApi { - - /** - * Constructs a new ContentApi. - * @alias module:api/ContentApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the getArchive operation. - * @callback moduleapi/ContentApi~getArchiveCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Download archive - * This method returns archive by given format. - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} ref The name of the commit/branch/tag - * @param {module:model/String} format The format of archive, either .zip or .tar.gz - * @param {module:api/ContentApi~getArchiveCallback} callback The callback function, accepting three arguments: error, data, response - */ - getArchive(owner, repo, ref, format, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getArchive"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getArchive"); - } - // verify the required parameter 'ref' is set - if (ref === undefined || ref === null) { - throw new Error("Missing the required parameter 'ref' when calling getArchive"); - } - // verify the required parameter 'format' is set - if (format === undefined || format === null) { - throw new Error("Missing the required parameter 'format' when calling getArchive"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'ref': ref,'format': format - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/archive/{ref}{format}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the getContent operation. - * @callback moduleapi/ContentApi~getContentCallback - * @param {String} error Error message, if any. - * @param {module:model/Files{ data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * List data in a repository folder - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} branch branch of the repository - * @param {String} path path of a folder in the repository - * @param {Object} opts Optional parameters - * @param {Boolean} opts.includeSize (default to <.>) - * @param {module:api/ContentApi~getContentCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} - */ - getContent(owner, repo, branch, path, opts, callback) { - opts = opts || {}; - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getContent"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getContent"); - } - // verify the required parameter 'branch' is set - if (branch === undefined || branch === null) { - throw new Error("Missing the required parameter 'branch' when calling getContent"); - } - // verify the required parameter 'path' is set - if (path === undefined || path === null) { - throw new Error("Missing the required parameter 'path' when calling getContent"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'branch': branch,'path': path - }; - let queryParams = { - 'include_size': opts['includeSize'] - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Files; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/content/{branch}/{path}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the getRaw operation. - * @callback moduleapi/ContentApi~getRawCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Download raw content - * This method returns the raw content of a file. - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} ref The name of the commit/branch/tag - * @param {String} path The content path - * @param {module:api/ContentApi~getRawCallback} callback The callback function, accepting three arguments: error, data, response - */ - getRaw(owner, repo, ref, path, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getRaw"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getRaw"); - } - // verify the required parameter 'ref' is set - if (ref === undefined || ref === null) { - throw new Error("Missing the required parameter 'ref' when calling getRaw"); - } - // verify the required parameter 'path' is set - if (path === undefined || path === null) { - throw new Error("Missing the required parameter 'path' when calling getRaw"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'ref': ref,'path': path - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/raw/{ref}/{path}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the uploadContent operation. - * @callback moduleapi/ContentApi~uploadContentCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Upload data to a repository - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} branch branch of the repository - * @param {String} path path of a folder in the repository - * @param {Object} opts Optional parameters - * @param {String} opts.commitSummary - * @param {String} opts.commitMessage - * @param {module:model/String} opts.commitChoice - * @param {String} opts.lastCommit - * @param {String} opts.newBranchName - * @param {module:model/String} opts.versioning - * @param {String} opts.files - * @param {module:api/ContentApi~uploadContentCallback} callback The callback function, accepting three arguments: error, data, response - */ - uploadContent(owner, repo, branch, path, opts, callback) { - opts = opts || {}; - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling uploadContent"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling uploadContent"); - } - // verify the required parameter 'branch' is set - if (branch === undefined || branch === null) { - throw new Error("Missing the required parameter 'branch' when calling uploadContent"); - } - // verify the required parameter 'path' is set - if (path === undefined || path === null) { - throw new Error("Missing the required parameter 'path' when calling uploadContent"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'branch': branch,'path': path - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - 'commit_summary': opts['commitSummary'],'commit_message': opts['commitMessage'],'commit_choice': opts['commitChoice'],'last_commit': opts['lastCommit'],'new_branch_name': opts['newBranchName'],'versioning': opts['versioning'],'files': opts['files'] - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['multipart/form-data']; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/content/{branch}/{path}', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/api/ExperimentsApi.js b/JavaScript/src/api/ExperimentsApi.js deleted file mode 100644 index 8200745..0000000 --- a/JavaScript/src/api/ExperimentsApi.js +++ /dev/null @@ -1,376 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; -import {EditExperimentPost} from '../model/EditExperimentPost'; -import {ExperimentKeys} from '../model/ExperimentKeys'; - -/** -* Experiments service. -* @module api/ExperimentsApi -* @version 1.0.2 -*/ -export class ExperimentsApi { - - /** - * Constructs a new ExperimentsApi. - * @alias module:api/ExperimentsApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the addExperimentLabel operation. - * @callback moduleapi/ExperimentsApi~addExperimentLabelCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Add label to experiment - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} experimentKey a valid experiment key - * @param {String} experimentLabel A label for the experiment, max 128 characters. - * @param {module:api/ExperimentsApi~addExperimentLabelCallback} callback The callback function, accepting three arguments: error, data, response - */ - addExperimentLabel(owner, repo, experimentKey, experimentLabel, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling addExperimentLabel"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling addExperimentLabel"); - } - // verify the required parameter 'experimentKey' is set - if (experimentKey === undefined || experimentKey === null) { - throw new Error("Missing the required parameter 'experimentKey' when calling addExperimentLabel"); - } - // verify the required parameter 'experimentLabel' is set - if (experimentLabel === undefined || experimentLabel === null) { - throw new Error("Missing the required parameter 'experimentLabel' when calling addExperimentLabel"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'experimentKey': experimentKey,'experimentLabel': experimentLabel - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the deleteExperiment operation. - * @callback moduleapi/ExperimentsApi~deleteExperimentCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete experiment - * Support both git and MLflow experiments - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} experimentKey a valid experiment key - * @param {module:api/ExperimentsApi~deleteExperimentCallback} callback The callback function, accepting three arguments: error, data, response - */ - deleteExperiment(owner, repo, experimentKey, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling deleteExperiment"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling deleteExperiment"); - } - // verify the required parameter 'experimentKey' is set - if (experimentKey === undefined || experimentKey === null) { - throw new Error("Missing the required parameter 'experimentKey' when calling deleteExperiment"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'experimentKey': experimentKey - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/experiments/experiment/{experimentKey}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the deleteExperimentLabel operation. - * @callback moduleapi/ExperimentsApi~deleteExperimentLabelCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete experiment label - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} experimentKey a valid experiment key - * @param {String} experimentLabel A label for the experiment, max 128 characters. - * @param {module:api/ExperimentsApi~deleteExperimentLabelCallback} callback The callback function, accepting three arguments: error, data, response - */ - deleteExperimentLabel(owner, repo, experimentKey, experimentLabel, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling deleteExperimentLabel"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling deleteExperimentLabel"); - } - // verify the required parameter 'experimentKey' is set - if (experimentKey === undefined || experimentKey === null) { - throw new Error("Missing the required parameter 'experimentKey' when calling deleteExperimentLabel"); - } - // verify the required parameter 'experimentLabel' is set - if (experimentLabel === undefined || experimentLabel === null) { - throw new Error("Missing the required parameter 'experimentLabel' when calling deleteExperimentLabel"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'experimentKey': experimentKey,'experimentLabel': experimentLabel - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the editExperiment operation. - * @callback moduleapi/ExperimentsApi~editExperimentCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Edit experiment info - * Edit experiment info, currently supports just changing experiment name. - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {String} experimentKey a valid experiment key - * @param {Object} opts Optional parameters - * @param {module:model/EditExperimentPost} opts.body - * @param {module:api/ExperimentsApi~editExperimentCallback} callback The callback function, accepting three arguments: error, data, response - */ - editExperiment(owner, repo, experimentKey, opts, callback) { - opts = opts || {}; - let postBody = opts['body']; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling editExperiment"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling editExperiment"); - } - // verify the required parameter 'experimentKey' is set - if (experimentKey === undefined || experimentKey === null) { - throw new Error("Missing the required parameter 'experimentKey' when calling editExperiment"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'experimentKey': experimentKey - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/experiments/experiment/{experimentKey}', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the getExperimentMetrics operation. - * @callback moduleapi/ExperimentsApi~getExperimentMetricsCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Get experiment metrics for experiment - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {Object} opts Optional parameters - * @param {module:model/ExperimentKeys} opts.body - * @param {module:api/ExperimentsApi~getExperimentMetricsCallback} callback The callback function, accepting three arguments: error, data, response - */ - getExperimentMetrics(owner, repo, opts, callback) { - opts = opts || {}; - let postBody = opts['body']; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getExperimentMetrics"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getExperimentMetrics"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/experiments/metricsForExperiments', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the getExperiments operation. - * @callback moduleapi/ExperimentsApi~getExperimentsCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * List Experiments - * Get a list of experiments in the given repository - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {module:api/ExperimentsApi~getExperimentsCallback} callback The callback function, accepting three arguments: error, data, response - */ - getExperiments(owner, repo, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getExperiments"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getExperiments"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/experiments', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/api/IssuesApi.js b/JavaScript/src/api/IssuesApi.js deleted file mode 100644 index 0148856..0000000 --- a/JavaScript/src/api/IssuesApi.js +++ /dev/null @@ -1,257 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; -import {Issue} from '../model/Issue'; -import {Issues} from '../model/Issues'; -import {PatchIssue} from '../model/PatchIssue'; -import {PostIssue} from '../model/PostIssue'; - -/** -* Issues service. -* @module api/IssuesApi -* @version 1.0.2 -*/ -export class IssuesApi { - - /** - * Constructs a new IssuesApi. - * @alias module:api/IssuesApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the createIssue operation. - * @callback moduleapi/IssuesApi~createIssueCallback - * @param {String} error Error message, if any. - * @param {module:model/Issue{ data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Create an issue - * Any user with read access to a repository can create an issue. - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {Object} opts Optional parameters - * @param {module:model/PostIssue} opts.body - * @param {module:api/IssuesApi~createIssueCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} - */ - createIssue(owner, repo, opts, callback) { - opts = opts || {}; - let postBody = opts['body']; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling createIssue"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling createIssue"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Issue; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/issues', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the editIssue operation. - * @callback moduleapi/IssuesApi~editIssueCallback - * @param {String} error Error message, if any. - * @param {module:model/Issue{ data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Edit an issue - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {Object} opts Optional parameters - * @param {module:model/PatchIssue} opts.body - * @param {module:api/IssuesApi~editIssueCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} - */ - editIssue(owner, repo, opts, callback) { - opts = opts || {}; - let postBody = opts['body']; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling editIssue"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling editIssue"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Issue; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/issues', 'PATCH', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the getIssue operation. - * @callback moduleapi/IssuesApi~getIssueCallback - * @param {String} error Error message, if any. - * @param {module:model/Issue{ data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Get a single issue - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {Number} index the index of an issue or a pull request - * @param {module:api/IssuesApi~getIssueCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} - */ - getIssue(owner, repo, index, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getIssue"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getIssue"); - } - // verify the required parameter 'index' is set - if (index === undefined || index === null) { - throw new Error("Missing the required parameter 'index' when calling getIssue"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'index': index - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Issue; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/issues/{index}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the listRepoIssues operation. - * @callback moduleapi/IssuesApi~listRepoIssuesCallback - * @param {String} error Error message, if any. - * @param {module:model/Issues{ data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * List issues for a repository - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {module:api/IssuesApi~listRepoIssuesCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} - */ - listRepoIssues(owner, repo, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling listRepoIssues"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling listRepoIssues"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Issues; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/issues', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/api/ReleasesApi.js b/JavaScript/src/api/ReleasesApi.js deleted file mode 100644 index 637a680..0000000 --- a/JavaScript/src/api/ReleasesApi.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; - -/** -* Releases service. -* @module api/ReleasesApi -* @version 1.0.2 -*/ -export class ReleasesApi { - - /** - * Constructs a new ReleasesApi. - * @alias module:api/ReleasesApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the listReleases operation. - * @callback moduleapi/ReleasesApi~listReleasesCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * List Releases - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {module:api/ReleasesApi~listReleasesCallback} callback The callback function, accepting three arguments: error, data, response - */ - listReleases(owner, repo, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling listReleases"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling listReleases"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/releases', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/api/RepositoryApi.js b/JavaScript/src/api/RepositoryApi.js deleted file mode 100644 index 270ebb8..0000000 --- a/JavaScript/src/api/RepositoryApi.js +++ /dev/null @@ -1,407 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; -import {CreateRepo} from '../model/CreateRepo'; -import {MigrateRepo} from '../model/MigrateRepo'; - -/** -* Repository service. -* @module api/RepositoryApi -* @version 1.0.2 -*/ -export class RepositoryApi { - - /** - * Constructs a new RepositoryApi. - * @alias module:api/RepositoryApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the createOrgRepo operation. - * @callback moduleapi/RepositoryApi~createOrgRepoCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Create in organization - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * @param {String} orgname A DagsHub organization name - * @param {Object} opts Optional parameters - * @param {module:model/CreateRepo} opts.body - * @param {module:api/RepositoryApi~createOrgRepoCallback} callback The callback function, accepting three arguments: error, data, response - */ - createOrgRepo(orgname, opts, callback) { - opts = opts || {}; - let postBody = opts['body']; - // verify the required parameter 'orgname' is set - if (orgname === undefined || orgname === null) { - throw new Error("Missing the required parameter 'orgname' when calling createOrgRepo"); - } - - let pathParams = { - 'orgname': orgname - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['application/json']; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/org/{orgname}/repos', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the createRepo operation. - * @callback moduleapi/RepositoryApi~createRepoCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Create - * Create a new repository for the authenticated user. - * @param {Object} opts Optional parameters - * @param {module:model/CreateRepo} opts.body - * @param {module:api/RepositoryApi~createRepoCallback} callback The callback function, accepting three arguments: error, data, response - */ - createRepo(opts, callback) { - opts = opts || {}; - let postBody = opts['body']; - - let pathParams = { - - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['application/json']; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/user/repos', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the getRepo operation. - * @callback moduleapi/RepositoryApi~getRepoCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Get repository information - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {module:api/RepositoryApi~getRepoCallback} callback The callback function, accepting three arguments: error, data, response - */ - getRepo(owner, repo, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getRepo"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getRepo"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the listMyRepos operation. - * @callback moduleapi/RepositoryApi~listMyReposCallback - * @param {String} error Error message, if any. - * @param {Object{ data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * List your repositories - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * @param {module:api/RepositoryApi~listMyReposCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} - */ - listMyRepos(callback) { - - let postBody = null; - - let pathParams = { - - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Object; - - return this.apiClient.callApi( - '/user/repos', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the listOrgRepos operation. - * @callback moduleapi/RepositoryApi~listOrgReposCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * List organization repositories - * List repositories that are accessible to the authenticated user. - * @param {String} orgname A DagsHub organization name - * @param {module:api/RepositoryApi~listOrgReposCallback} callback The callback function, accepting three arguments: error, data, response - */ - listOrgRepos(orgname, callback) { - - let postBody = null; - // verify the required parameter 'orgname' is set - if (orgname === undefined || orgname === null) { - throw new Error("Missing the required parameter 'orgname' when calling listOrgRepos"); - } - - let pathParams = { - 'orgname': orgname - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/orgs/{orgname}/repos', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the listUserRepos operation. - * @callback moduleapi/RepositoryApi~listUserReposCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * List user repositories - * List public repositories for the specified user. - * @param {String} username A DagsHub username or organization name - * @param {module:api/RepositoryApi~listUserReposCallback} callback The callback function, accepting three arguments: error, data, response - */ - listUserRepos(username, callback) { - - let postBody = null; - // verify the required parameter 'username' is set - if (username === undefined || username === null) { - throw new Error("Missing the required parameter 'username' when calling listUserRepos"); - } - - let pathParams = { - 'username': username - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/users/{username}/repos', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the migrateRepo operation. - * @callback moduleapi/RepositoryApi~migrateRepoCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Migrate repository - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * @param {Object} opts Optional parameters - * @param {module:model/MigrateRepo} opts.body - * @param {module:api/RepositoryApi~migrateRepoCallback} callback The callback function, accepting three arguments: error, data, response - */ - migrateRepo(opts, callback) { - opts = opts || {}; - let postBody = opts['body']; - - let pathParams = { - - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['application/json']; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/repos/migrate', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the search operation. - * @callback moduleapi/RepositoryApi~searchCallback - * @param {String} error Error message, if any. - * @param {Object{ data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Search repositories - * @param {String} q - * @param {Object} opts Optional parameters - * @param {Number} opts.uid User ID to specify search whose repositories. Default is 0 and search all repositories (default to <.>) - * @param {Number} opts.limit Maximum number of repositories in search results. (default to <.>) - * @param {Number} opts.page Page number. Default is 1. (default to <.>) - * @param {module:api/RepositoryApi~searchCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} - */ - search(q, opts, callback) { - opts = opts || {}; - let postBody = null; - // verify the required parameter 'q' is set - if (q === undefined || q === null) { - throw new Error("Missing the required parameter 'q' when calling search"); - } - - let pathParams = { - - }; - let queryParams = { - 'q': q,'uid': opts['uid'],'limit': opts['limit'],'page': opts['page'] - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Object; - - return this.apiClient.callApi( - '/repos/search', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/api/StorageIntegrationsApi.js b/JavaScript/src/api/StorageIntegrationsApi.js deleted file mode 100644 index 35b20d0..0000000 --- a/JavaScript/src/api/StorageIntegrationsApi.js +++ /dev/null @@ -1,225 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; -import {Files1} from '../model/Files1'; -import {Integration} from '../model/Integration'; - -/** -* StorageIntegrations service. -* @module api/StorageIntegrationsApi -* @version 1.0.2 -*/ -export class StorageIntegrationsApi { - - /** - * Constructs a new StorageIntegrationsApi. - * @alias module:api/StorageIntegrationsApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the getBucketContent operation. - * @callback moduleapi/StorageIntegrationsApi~getBucketContentCallback - * @param {String} error Error message, if any. - * @param {module:model/Files1{ data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * List contents in the path - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {module:model/String} protocol protocol of the storage integration - * @param {String} bucket name and prefix of the bucket integration - * @param {String} path path of a folder in the repository - * @param {Object} opts Optional parameters - * @param {Boolean} opts.includeSize (default to <.>) - * @param {Number} opts.limit Maximum amount of items to return (default to <.>) - * @param {String} opts.fromToken Token, from which to continue iteration - * @param {module:api/StorageIntegrationsApi~getBucketContentCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} - */ - getBucketContent(owner, repo, protocol, bucket, path, opts, callback) { - opts = opts || {}; - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getBucketContent"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getBucketContent"); - } - // verify the required parameter 'protocol' is set - if (protocol === undefined || protocol === null) { - throw new Error("Missing the required parameter 'protocol' when calling getBucketContent"); - } - // verify the required parameter 'bucket' is set - if (bucket === undefined || bucket === null) { - throw new Error("Missing the required parameter 'bucket' when calling getBucketContent"); - } - // verify the required parameter 'path' is set - if (path === undefined || path === null) { - throw new Error("Missing the required parameter 'path' when calling getBucketContent"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'protocol': protocol,'bucket': bucket,'path': path - }; - let queryParams = { - 'include_size': opts['includeSize'],'limit': opts['limit'],'from_token': opts['fromToken'] - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Files1; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the getBucketFile operation. - * @callback moduleapi/StorageIntegrationsApi~getBucketFileCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Get file in the bucket - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {module:model/String} protocol protocol of the storage integration - * @param {String} bucket name and prefix of the bucket integration - * @param {String} path The content path - * @param {module:api/StorageIntegrationsApi~getBucketFileCallback} callback The callback function, accepting three arguments: error, data, response - */ - getBucketFile(owner, repo, protocol, bucket, path, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getBucketFile"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getBucketFile"); - } - // verify the required parameter 'protocol' is set - if (protocol === undefined || protocol === null) { - throw new Error("Missing the required parameter 'protocol' when calling getBucketFile"); - } - // verify the required parameter 'bucket' is set - if (bucket === undefined || bucket === null) { - throw new Error("Missing the required parameter 'bucket' when calling getBucketFile"); - } - // verify the required parameter 'path' is set - if (path === undefined || path === null) { - throw new Error("Missing the required parameter 'path' when calling getBucketFile"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'protocol': protocol,'bucket': bucket,'path': path - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the getBuckets operation. - * @callback moduleapi/StorageIntegrationsApi~getBucketsCallback - * @param {String} error Error message, if any. - * @param {module:model/Integration{ data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * List integrated storages in the repository - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {module:api/StorageIntegrationsApi~getBucketsCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} - */ - getBuckets(owner, repo, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling getBuckets"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling getBuckets"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Integration; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/storage', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/api/UserApi.js b/JavaScript/src/api/UserApi.js deleted file mode 100644 index def6a18..0000000 --- a/JavaScript/src/api/UserApi.js +++ /dev/null @@ -1,122 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; - -/** -* User service. -* @module api/UserApi -* @version 1.0.2 -*/ -export class UserApi { - - /** - * Constructs a new UserApi. - * @alias module:api/UserApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the getAuthenticatedUser operation. - * @callback moduleapi/UserApi~getAuthenticatedUserCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Get authenticated user information - * @param {module:api/UserApi~getAuthenticatedUserCallback} callback The callback function, accepting three arguments: error, data, response - */ - getAuthenticatedUser(callback) { - - let postBody = null; - - let pathParams = { - - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/user', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the getUser operation. - * @callback moduleapi/UserApi~getUserCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Get information about a user - * @param {String} username A DagsHub username or organization name - * @param {module:api/UserApi~getUserCallback} callback The callback function, accepting three arguments: error, data, response - */ - getUser(username, callback) { - - let postBody = null; - // verify the required parameter 'username' is set - if (username === undefined || username === null) { - throw new Error("Missing the required parameter 'username' when calling getUser"); - } - - let pathParams = { - 'username': username - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/users/{username}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/api/WebhooksApi.js b/JavaScript/src/api/WebhooksApi.js deleted file mode 100644 index 0f9eb59..0000000 --- a/JavaScript/src/api/WebhooksApi.js +++ /dev/null @@ -1,253 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from "../ApiClient"; -import {HooksIdBody} from '../model/HooksIdBody'; -import {RepoHooksBody} from '../model/RepoHooksBody'; - -/** -* Webhooks service. -* @module api/WebhooksApi -* @version 1.0.2 -*/ -export class WebhooksApi { - - /** - * Constructs a new WebhooksApi. - * @alias module:api/WebhooksApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instanc - e} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - /** - * Callback function to receive the result of the createHook operation. - * @callback moduleapi/WebhooksApi~createHookCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Create a hook - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {Object} opts Optional parameters - * @param {module:model/RepoHooksBody} opts.body - * @param {module:api/WebhooksApi~createHookCallback} callback The callback function, accepting three arguments: error, data, response - */ - createHook(owner, repo, opts, callback) { - opts = opts || {}; - let postBody = opts['body']; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling createHook"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling createHook"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/hooks', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the deleteHook operation. - * @callback moduleapi/WebhooksApi~deleteHookCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete a hook - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {Number} id - * @param {module:api/WebhooksApi~deleteHookCallback} callback The callback function, accepting three arguments: error, data, response - */ - deleteHook(owner, repo, id, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling deleteHook"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling deleteHook"); - } - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deleteHook"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'id': id - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/hooks/{id}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the editHook operation. - * @callback moduleapi/WebhooksApi~editHookCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Edit a hook - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {Number} id - * @param {Object} opts Optional parameters - * @param {module:model/HooksIdBody} opts.body - * @param {module:api/WebhooksApi~editHookCallback} callback The callback function, accepting three arguments: error, data, response - */ - editHook(owner, repo, id, opts, callback) { - opts = opts || {}; - let postBody = opts['body']; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling editHook"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling editHook"); - } - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling editHook"); - } - - let pathParams = { - 'owner': owner,'repo': repo,'id': id - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/hooks/{id}', 'PATCH', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - /** - * Callback function to receive the result of the listHooks operation. - * @callback moduleapi/WebhooksApi~listHooksCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * List hooks - * @param {String} owner owner of the repository - * @param {String} repo name of the repository - * @param {module:api/WebhooksApi~listHooksCallback} callback The callback function, accepting three arguments: error, data, response - */ - listHooks(owner, repo, callback) { - - let postBody = null; - // verify the required parameter 'owner' is set - if (owner === undefined || owner === null) { - throw new Error("Missing the required parameter 'owner' when calling listHooks"); - } - // verify the required parameter 'repo' is set - if (repo === undefined || repo === null) { - throw new Error("Missing the required parameter 'repo' when calling listHooks"); - } - - let pathParams = { - 'owner': owner,'repo': repo - }; - let queryParams = { - - }; - let headerParams = { - - }; - let formParams = { - - }; - - let authNames = ['basicAuth', 'tokenAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - - return this.apiClient.callApi( - '/repos/{owner}/{repo}/hooks', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - -} \ No newline at end of file diff --git a/JavaScript/src/index.js b/JavaScript/src/index.js deleted file mode 100644 index c59a5e8..0000000 --- a/JavaScript/src/index.js +++ /dev/null @@ -1,341 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from './ApiClient'; -import {Assignee} from './model/Assignee'; -import {Body} from './model/Body'; -import {Closed} from './model/Closed'; -import {CollaboratorsCollaboratorBody} from './model/CollaboratorsCollaboratorBody'; -import {CreateRepo} from './model/CreateRepo'; -import {EditExperimentPost} from './model/EditExperimentPost'; -import {ExperimentKeys} from './model/ExperimentKeys'; -import {File} from './model/File'; -import {Files} from './model/Files'; -import {Files1} from './model/Files1'; -import {HooksIdBody} from './model/HooksIdBody'; -import {Integration} from './model/Integration'; -import {IntegrationInner} from './model/IntegrationInner'; -import {Issue} from './model/Issue'; -import {IssueAssignee} from './model/IssueAssignee'; -import {IssueLabels} from './model/IssueLabels'; -import {IssueMilestone} from './model/IssueMilestone'; -import {Issues} from './model/Issues'; -import {Labels} from './model/Labels'; -import {MigrateRepo} from './model/MigrateRepo'; -import {Milestone} from './model/Milestone'; -import {PatchIssue} from './model/PatchIssue'; -import {PostIssue} from './model/PostIssue'; -import {PutFile} from './model/PutFile'; -import {RepoHooksBody} from './model/RepoHooksBody'; -import {State} from './model/State'; -import {Title} from './model/Title'; -import {User} from './model/User'; -import {WebhookConfig} from './model/WebhookConfig'; -import {WebhookEvents} from './model/WebhookEvents'; -import {BranchesApi} from './api/BranchesApi'; -import {CollaboratorsApi} from './api/CollaboratorsApi'; -import {CommitsApi} from './api/CommitsApi'; -import {ContentApi} from './api/ContentApi'; -import {ExperimentsApi} from './api/ExperimentsApi'; -import {IssuesApi} from './api/IssuesApi'; -import {ReleasesApi} from './api/ReleasesApi'; -import {RepositoryApi} from './api/RepositoryApi'; -import {StorageIntegrationsApi} from './api/StorageIntegrationsApi'; -import {UserApi} from './api/UserApi'; -import {WebhooksApi} from './api/WebhooksApi'; - -/** -* This_API_provides_a_way_to_retrive__interact_with_data_about_DagsHub_repositories_users_issues_webhooks_and_more_The_API_is_also_used_by_the__DagsHub_Direct_Data_Access_streaming_client_httpsgithub_comDagsHubclient_to_stream_content_from_a_repository_for_easier_and_faster_training_.
-* The index module provides access to constructors for all the classes which comprise the public API. -*

-* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: -*

-* var DagsHubApi = require('index'); // See note below*.
-* var xxxSvc = new DagsHubApi.XxxApi(); // Allocate the API class we're going to use.
-* var yyyModel = new DagsHubApi.Yyy(); // Construct a model instance.
-* yyyModel.someProperty = 'someValue';
-* ...
-* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
-* ...
-* 
-* *NOTE: For a top-level AMD script, use require(['index'], function(){...}) -* and put the application logic within the callback function. -*

-*

-* A non-AMD browser application (discouraged) might do something like this: -*

-* var xxxSvc = new DagsHubApi.XxxApi(); // Allocate the API class we're going to use.
-* var yyy = new DagsHubApi.Yyy(); // Construct a model instance.
-* yyyModel.someProperty = 'someValue';
-* ...
-* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
-* ...
-* 
-*

-* @module index -* @version 1.0.2 -*/ -export { - /** - * The ApiClient constructor. - * @property {module:ApiClient} - */ - ApiClient, - - /** - * The Assignee model constructor. - * @property {module:model/Assignee} - */ - Assignee, - - /** - * The Body model constructor. - * @property {module:model/Body} - */ - Body, - - /** - * The Closed model constructor. - * @property {module:model/Closed} - */ - Closed, - - /** - * The CollaboratorsCollaboratorBody model constructor. - * @property {module:model/CollaboratorsCollaboratorBody} - */ - CollaboratorsCollaboratorBody, - - /** - * The CreateRepo model constructor. - * @property {module:model/CreateRepo} - */ - CreateRepo, - - /** - * The EditExperimentPost model constructor. - * @property {module:model/EditExperimentPost} - */ - EditExperimentPost, - - /** - * The ExperimentKeys model constructor. - * @property {module:model/ExperimentKeys} - */ - ExperimentKeys, - - /** - * The File model constructor. - * @property {module:model/File} - */ - File, - - /** - * The Files model constructor. - * @property {module:model/Files} - */ - Files, - - /** - * The Files1 model constructor. - * @property {module:model/Files1} - */ - Files1, - - /** - * The HooksIdBody model constructor. - * @property {module:model/HooksIdBody} - */ - HooksIdBody, - - /** - * The Integration model constructor. - * @property {module:model/Integration} - */ - Integration, - - /** - * The IntegrationInner model constructor. - * @property {module:model/IntegrationInner} - */ - IntegrationInner, - - /** - * The Issue model constructor. - * @property {module:model/Issue} - */ - Issue, - - /** - * The IssueAssignee model constructor. - * @property {module:model/IssueAssignee} - */ - IssueAssignee, - - /** - * The IssueLabels model constructor. - * @property {module:model/IssueLabels} - */ - IssueLabels, - - /** - * The IssueMilestone model constructor. - * @property {module:model/IssueMilestone} - */ - IssueMilestone, - - /** - * The Issues model constructor. - * @property {module:model/Issues} - */ - Issues, - - /** - * The Labels model constructor. - * @property {module:model/Labels} - */ - Labels, - - /** - * The MigrateRepo model constructor. - * @property {module:model/MigrateRepo} - */ - MigrateRepo, - - /** - * The Milestone model constructor. - * @property {module:model/Milestone} - */ - Milestone, - - /** - * The PatchIssue model constructor. - * @property {module:model/PatchIssue} - */ - PatchIssue, - - /** - * The PostIssue model constructor. - * @property {module:model/PostIssue} - */ - PostIssue, - - /** - * The PutFile model constructor. - * @property {module:model/PutFile} - */ - PutFile, - - /** - * The RepoHooksBody model constructor. - * @property {module:model/RepoHooksBody} - */ - RepoHooksBody, - - /** - * The State model constructor. - * @property {module:model/State} - */ - State, - - /** - * The Title model constructor. - * @property {module:model/Title} - */ - Title, - - /** - * The User model constructor. - * @property {module:model/User} - */ - User, - - /** - * The WebhookConfig model constructor. - * @property {module:model/WebhookConfig} - */ - WebhookConfig, - - /** - * The WebhookEvents model constructor. - * @property {module:model/WebhookEvents} - */ - WebhookEvents, - - /** - * The BranchesApi service constructor. - * @property {module:api/BranchesApi} - */ - BranchesApi, - - /** - * The CollaboratorsApi service constructor. - * @property {module:api/CollaboratorsApi} - */ - CollaboratorsApi, - - /** - * The CommitsApi service constructor. - * @property {module:api/CommitsApi} - */ - CommitsApi, - - /** - * The ContentApi service constructor. - * @property {module:api/ContentApi} - */ - ContentApi, - - /** - * The ExperimentsApi service constructor. - * @property {module:api/ExperimentsApi} - */ - ExperimentsApi, - - /** - * The IssuesApi service constructor. - * @property {module:api/IssuesApi} - */ - IssuesApi, - - /** - * The ReleasesApi service constructor. - * @property {module:api/ReleasesApi} - */ - ReleasesApi, - - /** - * The RepositoryApi service constructor. - * @property {module:api/RepositoryApi} - */ - RepositoryApi, - - /** - * The StorageIntegrationsApi service constructor. - * @property {module:api/StorageIntegrationsApi} - */ - StorageIntegrationsApi, - - /** - * The UserApi service constructor. - * @property {module:api/UserApi} - */ - UserApi, - - /** - * The WebhooksApi service constructor. - * @property {module:api/WebhooksApi} - */ - WebhooksApi -}; diff --git a/JavaScript/src/model/Body.js b/JavaScript/src/model/Body.js deleted file mode 100644 index f07f39c..0000000 --- a/JavaScript/src/model/Body.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The Body model module. - * @module model/Body - * @version 1.0.2 - */ -export class Body { - /** - * Constructs a new Body. - * The contents of the issue. - * @alias module:model/Body - * @class - */ - constructor() { - } - - /** - * Constructs a Body from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Body} obj Optional instance to populate. - * @return {module:model/Body} The populated Body instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Body(); - } - return obj; - } -} diff --git a/JavaScript/src/model/Closed.js b/JavaScript/src/model/Closed.js deleted file mode 100644 index 51e8c46..0000000 --- a/JavaScript/src/model/Closed.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The Closed model module. - * @module model/Closed - * @version 1.0.2 - */ -export class Closed { - /** - * Constructs a new Closed. - * Indicate initial issue state as closed (**true**) or open (**false**). - * @alias module:model/Closed - * @class - */ - constructor() { - } - - /** - * Constructs a Closed from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Closed} obj Optional instance to populate. - * @return {module:model/Closed} The populated Closed instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Closed(); - } - return obj; - } -} diff --git a/JavaScript/src/model/CollaboratorsCollaboratorBody.js b/JavaScript/src/model/CollaboratorsCollaboratorBody.js deleted file mode 100644 index bef85b2..0000000 --- a/JavaScript/src/model/CollaboratorsCollaboratorBody.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The CollaboratorsCollaboratorBody model module. - * @module model/CollaboratorsCollaboratorBody - * @version 1.0.2 - */ -export class CollaboratorsCollaboratorBody { - /** - * Constructs a new CollaboratorsCollaboratorBody. - * @alias module:model/CollaboratorsCollaboratorBody - * @class - */ - constructor() { - } - - /** - * Constructs a CollaboratorsCollaboratorBody from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/CollaboratorsCollaboratorBody} obj Optional instance to populate. - * @return {module:model/CollaboratorsCollaboratorBody} The populated CollaboratorsCollaboratorBody instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CollaboratorsCollaboratorBody(); - if (data.hasOwnProperty('permission')) - obj.permission = ApiClient.convertToType(data['permission'], 'String'); - } - return obj; - } -} - -/** - * The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. - * @member {String} permission - * @default 'write' - */ -CollaboratorsCollaboratorBody.prototype.permission = 'write'; - diff --git a/JavaScript/src/model/CreateRepo.js b/JavaScript/src/model/CreateRepo.js deleted file mode 100644 index f3596aa..0000000 --- a/JavaScript/src/model/CreateRepo.js +++ /dev/null @@ -1,354 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The CreateRepo model module. - * @module model/CreateRepo - * @version 1.0.2 - */ -export class CreateRepo { - /** - * Constructs a new CreateRepo. - * @alias module:model/CreateRepo - * @class - * @param name {String} name of the repository - */ - constructor(name) { - this.name = name; - } - - /** - * Constructs a CreateRepo from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/CreateRepo} obj Optional instance to populate. - * @return {module:model/CreateRepo} The populated CreateRepo instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CreateRepo(); - if (data.hasOwnProperty('name')) - obj.name = ApiClient.convertToType(data['name'], 'String'); - if (data.hasOwnProperty('description')) - obj.description = ApiClient.convertToType(data['description'], 'String'); - if (data.hasOwnProperty('private')) - obj._private = ApiClient.convertToType(data['private'], 'Boolean'); - if (data.hasOwnProperty('auto_init')) - obj.autoInit = ApiClient.convertToType(data['auto_init'], 'Boolean'); - if (data.hasOwnProperty('project_template')) - obj.projectTemplate = ApiClient.convertToType(data['project_template'], 'String'); - if (data.hasOwnProperty('gitignores')) - obj.gitignores = ApiClient.convertToType(data['gitignores'], 'String'); - if (data.hasOwnProperty('license')) - obj.license = ApiClient.convertToType(data['license'], 'String'); - if (data.hasOwnProperty('readme')) - obj.readme = ApiClient.convertToType(data['readme'], 'String'); - } - return obj; - } -} - -/** - * name of the repository - * @member {String} name - */ -CreateRepo.prototype.name = undefined; - -/** - * A short description of the repository - * @member {String} description - */ -CreateRepo.prototype.description = undefined; - -/** - * Either true to create a private repository, or false to create a public one. - * @member {Boolean} _private - * @default false - */ -CreateRepo.prototype._private = false; - -/** - * Pass true to create an initial commit with README, .gitignore and LICENSE. - * @member {Boolean} autoInit - * @default false - */ -CreateRepo.prototype.autoInit = false; - -/** - * Allowed values for the projectTemplate property. - * @enum {String} - * @readonly - */ -CreateRepo.ProjectTemplateEnum = { - /** - * value: "cookiecutter-dagshub-dvc" - * @const - */ - cookiecutterDagshubDvc: "cookiecutter-dagshub-dvc", - - /** - * value: "custom" - * @const - */ - custom: "custom", - - /** - * value: "none" - * @const - */ - none: "none", - - /** - * value: "notebook-template" - * @const - */ - notebookTemplate: "notebook-template" -}; -/** - * Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - * @member {module:model/CreateRepo.ProjectTemplateEnum} projectTemplate - */ -CreateRepo.prototype.projectTemplate = undefined; - -/** - * Desired language .gitignore templates to apply. Use the name of the templates. - * @member {String} gitignores - */ -CreateRepo.prototype.gitignores = undefined; - -/** - * Allowed values for the license property. - * @enum {String} - * @readonly - */ -CreateRepo.LicenseEnum = { - /** - * value: "Apache License 2.0" - * @const - */ - apacheLicense20: "Apache License 2.0", - - /** - * value: "MIT License" - * @const - */ - mITLicense: "MIT License", - - /** - * value: "Abstyles License" - * @const - */ - abstylesLicense: "Abstyles License", - - /** - * value: "Academic Free License v1.1" - * @const - */ - academicFreeLicenseV11: "Academic Free License v1.1", - - /** - * value: "Academic Free License v1.2" - * @const - */ - academicFreeLicenseV12: "Academic Free License v1.2", - - /** - * value: "Academic Free License v2.0" - * @const - */ - academicFreeLicenseV20: "Academic Free License v2.0", - - /** - * value: "Academic Free License v2.1" - * @const - */ - academicFreeLicenseV21: "Academic Free License v2.1", - - /** - * value: "Academic Free License v3.0" - * @const - */ - academicFreeLicenseV30: "Academic Free License v3.0", - - /** - * value: "Affero General Public License v1.0" - * @const - */ - afferoGeneralPublicLicenseV10: "Affero General Public License v1.0", - - /** - * value: "Apache License 1.0" - * @const - */ - apacheLicense10: "Apache License 1.0", - - /** - * value: "Apache License 1.1" - * @const - */ - apacheLicense11: "Apache License 1.1", - - /** - * value: "Artistic License 1.0" - * @const - */ - artisticLicense10: "Artistic License 1.0", - - /** - * value: "Artistic License 2.0" - * @const - */ - artisticLicense20: "Artistic License 2.0", - - /** - * value: "BSD 2-clause License" - * @const - */ - bSD2ClauseLicense: "BSD 2-clause License", - - /** - * value: "BSD 3-clause License" - * @const - */ - bSD3ClauseLicense: "BSD 3-clause License", - - /** - * value: "BSD 4-clause License" - * @const - */ - bSD4ClauseLicense: "BSD 4-clause License", - - /** - * value: "Creative Commons CC0 1.0 Universal" - * @const - */ - creativeCommonsCC010Universal: "Creative Commons CC0 1.0 Universal", - - /** - * value: "Eclipse Public License 1.0" - * @const - */ - eclipsePublicLicense10: "Eclipse Public License 1.0", - - /** - * value: "Educational Community License v1.0" - * @const - */ - educationalCommunityLicenseV10: "Educational Community License v1.0", - - /** - * value: "Educational Community License v2.0" - * @const - */ - educationalCommunityLicenseV20: "Educational Community License v2.0", - - /** - * value: "GNU Affero General Public License v3.0" - * @const - */ - gNUAfferoGeneralPublicLicenseV30: "GNU Affero General Public License v3.0", - - /** - * value: "GNU Free Documentation License v1.1" - * @const - */ - gNUFreeDocumentationLicenseV11: "GNU Free Documentation License v1.1", - - /** - * value: "GNU Free Documentation License v1.2" - * @const - */ - gNUFreeDocumentationLicenseV12: "GNU Free Documentation License v1.2", - - /** - * value: "GNU Free Documentation License v1.3" - * @const - */ - gNUFreeDocumentationLicenseV13: "GNU Free Documentation License v1.3", - - /** - * value: "GNU General Public License v1.0" - * @const - */ - gNUGeneralPublicLicenseV10: "GNU General Public License v1.0", - - /** - * value: "GNU General Public License v2.0" - * @const - */ - gNUGeneralPublicLicenseV20: "GNU General Public License v2.0", - - /** - * value: "GNU General Public License v3.0" - * @const - */ - gNUGeneralPublicLicenseV30: "GNU General Public License v3.0", - - /** - * value: "GNU Lesser General Public License v2.1" - * @const - */ - gNULesserGeneralPublicLicenseV21: "GNU Lesser General Public License v2.1", - - /** - * value: "GNU Lesser General Public License v3.0" - * @const - */ - gNULesserGeneralPublicLicenseV30: "GNU Lesser General Public License v3.0", - - /** - * value: "GNU Library General Public License v2.0" - * @const - */ - gNULibraryGeneralPublicLicenseV20: "GNU Library General Public License v2.0", - - /** - * value: "ISC license" - * @const - */ - iSCLicense: "ISC license", - - /** - * value: "Mozilla Public License 1.0" - * @const - */ - mozillaPublicLicense10: "Mozilla Public License 1.0", - - /** - * value: "Mozilla Public License 1.1" - * @const - */ - mozillaPublicLicense11: "Mozilla Public License 1.1", - - /** - * value: "Mozilla Public License 2.03" - * @const - */ - mozillaPublicLicense203: "Mozilla Public License 2.03" -}; -/** - * Desired LICENSE template to apply. Use the name of the template. - * @member {module:model/CreateRepo.LicenseEnum} license - */ -CreateRepo.prototype.license = undefined; - -/** - * Desired README template to apply. Use the name of the template. - * @member {String} readme - * @default 'Default' - */ -CreateRepo.prototype.readme = 'Default'; - diff --git a/JavaScript/src/model/EditExperimentPost.js b/JavaScript/src/model/EditExperimentPost.js deleted file mode 100644 index 1275723..0000000 --- a/JavaScript/src/model/EditExperimentPost.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The EditExperimentPost model module. - * @module model/EditExperimentPost - * @version 1.0.2 - */ -export class EditExperimentPost { - /** - * Constructs a new EditExperimentPost. - * @alias module:model/EditExperimentPost - * @class - * @param name {String} - */ - constructor(name) { - this.name = name; - } - - /** - * Constructs a EditExperimentPost from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/EditExperimentPost} obj Optional instance to populate. - * @return {module:model/EditExperimentPost} The populated EditExperimentPost instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new EditExperimentPost(); - if (data.hasOwnProperty('name')) - obj.name = ApiClient.convertToType(data['name'], 'String'); - } - return obj; - } -} - -/** - * @member {String} name - */ -EditExperimentPost.prototype.name = undefined; - diff --git a/JavaScript/src/model/ExperimentKeys.js b/JavaScript/src/model/ExperimentKeys.js index e73674f..4f427c5 100644 --- a/JavaScript/src/model/ExperimentKeys.js +++ b/JavaScript/src/model/ExperimentKeys.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The ExperimentKeys model module. * @module model/ExperimentKeys - * @version 1.0.2 + * @version 1.0.3 */ export class ExperimentKeys { /** diff --git a/JavaScript/src/model/Assignee.js b/JavaScript/src/model/ExperimentMetricsResponse.js similarity index 53% rename from JavaScript/src/model/Assignee.js rename to JavaScript/src/model/ExperimentMetricsResponse.js index a39dedf..aba52e0 100644 --- a/JavaScript/src/model/Assignee.js +++ b/JavaScript/src/model/ExperimentMetricsResponse.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -15,30 +15,32 @@ import {ApiClient} from '../ApiClient'; /** - * The Assignee model module. - * @module model/Assignee - * @version 1.0.2 + * The ExperimentMetricsResponse model module. + * @module model/ExperimentMetricsResponse + * @version 1.0.3 */ -export class Assignee { +export class ExperimentMetricsResponse { /** - * Constructs a new Assignee. - * Username for the user that this issue should be assigned to. **Note:** Only users with write access can set the assignee for new issues. The assignee is silently dropped otherwise. - * @alias module:model/Assignee + * Constructs a new ExperimentMetricsResponse. + * Map of experiment IDs to their metrics by path + * @alias module:model/ExperimentMetricsResponse * @class + * @extends Object */ constructor() { } /** - * Constructs a Assignee from a plain JavaScript object, optionally creating a new instance. + * Constructs a ExperimentMetricsResponse from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from data to obj if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Assignee} obj Optional instance to populate. - * @return {module:model/Assignee} The populated Assignee instance. + * @param {module:model/ExperimentMetricsResponse} obj Optional instance to populate. + * @return {module:model/ExperimentMetricsResponse} The populated ExperimentMetricsResponse instance. */ static constructFromObject(data, obj) { if (data) { - obj = obj || new Assignee(); + obj = obj || new ExperimentMetricsResponse(); + ApiClient.constructFromObject(data, obj, 'Object'); } return obj; } diff --git a/JavaScript/src/model/ExperimentsResponse.js b/JavaScript/src/model/ExperimentsResponse.js new file mode 100644 index 0000000..bfb8bd5 --- /dev/null +++ b/JavaScript/src/model/ExperimentsResponse.js @@ -0,0 +1,70 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +import {ApiClient} from '../ApiClient'; +import {ComponentsschemasExperimentYaml} from './ComponentsschemasExperimentYaml'; + +/** + * The ExperimentsResponse model module. + * @module model/ExperimentsResponse + * @version 1.0.3 + */ +export class ExperimentsResponse { + /** + * Constructs a new ExperimentsResponse. + * @alias module:model/ExperimentsResponse + * @class + */ + constructor() { + } + + /** + * Constructs a ExperimentsResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ExperimentsResponse} obj Optional instance to populate. + * @return {module:model/ExperimentsResponse} The populated ExperimentsResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ExperimentsResponse(); + if (data.hasOwnProperty('experiments')) + obj.experiments = ApiClient.convertToType(data['experiments'], {'String': ComponentsschemasExperimentYaml}); + if (data.hasOwnProperty('isEditor')) + obj.isEditor = ApiClient.convertToType(data['isEditor'], 'Boolean'); + if (data.hasOwnProperty('nextPageToken')) + obj.nextPageToken = ApiClient.convertToType(data['nextPageToken'], 'String'); + } + return obj; + } +} + +/** + * Map of experiment ID to experiment details + * @member {Object.} experiments + */ +ExperimentsResponse.prototype.experiments = undefined; + +/** + * Whether the authenticated user can edit experiments in this repo + * @member {Boolean} isEditor + */ +ExperimentsResponse.prototype.isEditor = undefined; + +/** + * Pagination token for the next page of results (empty string when no more pages) + * @member {String} nextPageToken + */ +ExperimentsResponse.prototype.nextPageToken = undefined; + diff --git a/JavaScript/src/model/File.js b/JavaScript/src/model/File.js deleted file mode 100644 index cf9f8e7..0000000 --- a/JavaScript/src/model/File.js +++ /dev/null @@ -1,136 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The File model module. - * @module model/File - * @version 1.0.2 - */ -export class File { - /** - * Constructs a new File. - * @alias module:model/File - * @class - */ - constructor() { - } - - /** - * Constructs a File from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/File} obj Optional instance to populate. - * @return {module:model/File} The populated File instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new File(); - if (data.hasOwnProperty('path')) - obj.path = ApiClient.convertToType(data['path'], 'String'); - if (data.hasOwnProperty('type')) - obj.type = ApiClient.convertToType(data['type'], 'String'); - if (data.hasOwnProperty('size')) - obj.size = ApiClient.convertToType(data['size'], 'Number'); - if (data.hasOwnProperty('hash')) - obj.hash = ApiClient.convertToType(data['hash'], 'String'); - if (data.hasOwnProperty('versioning')) - obj.versioning = ApiClient.convertToType(data['versioning'], 'String'); - if (data.hasOwnProperty('download_url')) - obj.downloadUrl = ApiClient.convertToType(data['download_url'], 'String'); - if (data.hasOwnProperty('content_url')) - obj.contentUrl = ApiClient.convertToType(data['content_url'], 'String'); - } - return obj; - } -} - -/** - * @member {String} path - */ -File.prototype.path = undefined; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -File.TypeEnum = { - /** - * value: "file" - * @const - */ - file: "file", - - /** - * value: "dir" - * @const - */ - dir: "dir" -}; -/** - * @member {module:model/File.TypeEnum} type - */ -File.prototype.type = undefined; - -/** - * @member {Number} size - */ -File.prototype.size = undefined; - -/** - * @member {String} hash - */ -File.prototype.hash = undefined; - -/** - * Allowed values for the versioning property. - * @enum {String} - * @readonly - */ -File.VersioningEnum = { - /** - * value: "git" - * @const - */ - git: "git", - - /** - * value: "dvc" - * @const - */ - dvc: "dvc", - - /** - * value: "bucket" - * @const - */ - bucket: "bucket" -}; -/** - * @member {module:model/File.VersioningEnum} versioning - */ -File.prototype.versioning = undefined; - -/** - * @member {String} downloadUrl - */ -File.prototype.downloadUrl = undefined; - -/** - * @member {String} contentUrl - */ -File.prototype.contentUrl = undefined; - diff --git a/JavaScript/src/model/Files.js b/JavaScript/src/model/Files.js index dd1d741..3bd670d 100644 --- a/JavaScript/src/model/Files.js +++ b/JavaScript/src/model/Files.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -13,11 +13,12 @@ * */ import {ApiClient} from '../ApiClient'; +import {ComponentsschemasFileYaml} from './ComponentsschemasFileYaml'; /** * The Files model module. * @module model/Files - * @version 1.0.2 + * @version 1.0.3 */ export class Files extends Array { /** @@ -40,7 +41,7 @@ export class Files extends Array { static constructFromObject(data, obj) { if (data) { obj = obj || new Files(); - ApiClient.constructFromObject(data, obj, 'File'); + ApiClient.constructFromObject(data, obj, 'ComponentsschemasFileYaml'); } return obj; } diff --git a/JavaScript/src/model/Files1.js b/JavaScript/src/model/Files1.js index ca52cdc..0ae48fd 100644 --- a/JavaScript/src/model/Files1.js +++ b/JavaScript/src/model/Files1.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -13,11 +13,12 @@ * */ import {ApiClient} from '../ApiClient'; +import {ComponentsschemasFileYaml} from './ComponentsschemasFileYaml'; /** * The Files1 model module. * @module model/Files1 - * @version 1.0.2 + * @version 1.0.3 */ export class Files1 { /** @@ -39,9 +40,7 @@ export class Files1 { if (data) { obj = obj || new Files1(); if (data.hasOwnProperty('entries')) - obj.entries = ApiClient.convertToType(data['entries'], [File]); - if (data.hasOwnProperty('limit')) - obj.limit = ApiClient.convertToType(data['limit'], 'Number'); + obj.entries = ApiClient.convertToType(data['entries'], [ComponentsschemasFileYaml]); if (data.hasOwnProperty('next_token')) obj.nextToken = ApiClient.convertToType(data['next_token'], 'String'); } @@ -50,16 +49,12 @@ export class Files1 { } /** - * @member {Array.} entries + * @member {Array.} entries */ Files1.prototype.entries = undefined; /** - * @member {Number} limit - */ -Files1.prototype.limit = undefined; - -/** + * Next token to continue pagination from * @member {String} nextToken */ Files1.prototype.nextToken = undefined; diff --git a/JavaScript/src/model/HooksIdBody.js b/JavaScript/src/model/HooksIdBody.js deleted file mode 100644 index 39ea27d..0000000 --- a/JavaScript/src/model/HooksIdBody.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; -import {WebhookConfig} from './WebhookConfig'; -import {WebhookEvents} from './WebhookEvents'; - -/** - * The HooksIdBody model module. - * @module model/HooksIdBody - * @version 1.0.2 - */ -export class HooksIdBody { - /** - * Constructs a new HooksIdBody. - * @alias module:model/HooksIdBody - * @class - */ - constructor() { - } - - /** - * Constructs a HooksIdBody from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/HooksIdBody} obj Optional instance to populate. - * @return {module:model/HooksIdBody} The populated HooksIdBody instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new HooksIdBody(); - if (data.hasOwnProperty('config')) - obj.config = WebhookConfig.constructFromObject(data['config']); - if (data.hasOwnProperty('events')) - obj.events = WebhookEvents.constructFromObject(data['events']); - if (data.hasOwnProperty('active')) - obj.active = ApiClient.convertToType(data['active'], 'Boolean'); - } - return obj; - } -} - -/** - * @member {module:model/WebhookConfig} config - */ -HooksIdBody.prototype.config = undefined; - -/** - * @member {module:model/WebhookEvents} events - */ -HooksIdBody.prototype.events = undefined; - -/** - * Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. - * @member {Boolean} active - */ -HooksIdBody.prototype.active = undefined; - diff --git a/JavaScript/src/model/Integration.js b/JavaScript/src/model/Integration.js index 6ed5d2d..91abbbc 100644 --- a/JavaScript/src/model/Integration.js +++ b/JavaScript/src/model/Integration.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -13,12 +13,11 @@ * */ import {ApiClient} from '../ApiClient'; -import {IntegrationInner} from './IntegrationInner'; /** * The Integration model module. * @module model/Integration - * @version 1.0.2 + * @version 1.0.3 */ export class Integration extends Array { /** @@ -41,7 +40,7 @@ export class Integration extends Array { static constructFromObject(data, obj) { if (data) { obj = obj || new Integration(); - ApiClient.constructFromObject(data, obj, 'IntegrationInner'); + ApiClient.constructFromObject(data, obj, 'Object'); } return obj; } diff --git a/JavaScript/src/model/IntegrationInner.js b/JavaScript/src/model/IntegrationInner.js deleted file mode 100644 index d9b1806..0000000 --- a/JavaScript/src/model/IntegrationInner.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The IntegrationInner model module. - * @module model/IntegrationInner - * @version 1.0.2 - */ -export class IntegrationInner { - /** - * Constructs a new IntegrationInner. - * @alias module:model/IntegrationInner - * @class - */ - constructor() { - } - - /** - * Constructs a IntegrationInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/IntegrationInner} obj Optional instance to populate. - * @return {module:model/IntegrationInner} The populated IntegrationInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new IntegrationInner(); - if (data.hasOwnProperty('name')) - obj.name = ApiClient.convertToType(data['name'], 'String'); - if (data.hasOwnProperty('protocol')) - obj.protocol = ApiClient.convertToType(data['protocol'], 'String'); - if (data.hasOwnProperty('list_path')) - obj.listPath = ApiClient.convertToType(data['list_path'], 'String'); - } - return obj; - } -} - -/** - * Name/path of the bucket - * @member {String} name - */ -IntegrationInner.prototype.name = undefined; - -/** - * Allowed values for the protocol property. - * @enum {String} - * @readonly - */ -IntegrationInner.ProtocolEnum = { - /** - * value: "s3" - * @const - */ - s3: "s3", - - /** - * value: "gs" - * @const - */ - gs: "gs" -}; -/** - * Protocol used by the integration - * @member {module:model/IntegrationInner.ProtocolEnum} protocol - */ -IntegrationInner.prototype.protocol = undefined; - -/** - * URL to list the root of this bucket - * @member {String} listPath - */ -IntegrationInner.prototype.listPath = undefined; - diff --git a/JavaScript/src/model/Issue.js b/JavaScript/src/model/Issue.js index e421c16..ef2b5d9 100644 --- a/JavaScript/src/model/Issue.js +++ b/JavaScript/src/model/Issue.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -13,37 +13,20 @@ * */ import {ApiClient} from '../ApiClient'; -import {Body} from './Body'; -import {IssueAssignee} from './IssueAssignee'; -import {IssueLabels} from './IssueLabels'; -import {IssueMilestone} from './IssueMilestone'; -import {Title} from './Title'; -import {User} from './User'; +import {ComponentsschemasUserYaml} from './ComponentsschemasUserYaml'; /** * The Issue model module. * @module model/Issue - * @version 1.0.2 + * @version 1.0.3 */ export class Issue { /** * Constructs a new Issue. * @alias module:model/Issue * @class - * @param title {module:model/Title} - * @param body {module:model/Body} - * @param labels {Array.} - * @param milestone {module:model/IssueMilestone} - * @param assignee {module:model/IssueAssignee} - * @param closed {Boolean} */ - constructor(title, body, labels, milestone, assignee, closed) { - this.title = title; - this.body = body; - this.labels = labels; - this.milestone = milestone; - this.assignee = assignee; - this.closed = closed; + constructor() { } /** @@ -61,29 +44,27 @@ export class Issue { if (data.hasOwnProperty('number')) obj._number = ApiClient.convertToType(data['number'], 'Number'); if (data.hasOwnProperty('user')) - obj.user = User.constructFromObject(data['user']); + obj.user = ComponentsschemasUserYaml.constructFromObject(data['user']); if (data.hasOwnProperty('title')) - obj.title = Title.constructFromObject(data['title']); + obj.title = ApiClient.convertToType(data['title'], 'String'); if (data.hasOwnProperty('body')) - obj.body = Body.constructFromObject(data['body']); + obj.body = ApiClient.convertToType(data['body'], 'String'); if (data.hasOwnProperty('labels')) - obj.labels = ApiClient.convertToType(data['labels'], [IssueLabels]); + obj.labels = ApiClient.convertToType(data['labels'], [Object]); if (data.hasOwnProperty('milestone')) - obj.milestone = IssueMilestone.constructFromObject(data['milestone']); + obj.milestone = ApiClient.convertToType(data['milestone'], Object); if (data.hasOwnProperty('assignee')) - obj.assignee = IssueAssignee.constructFromObject(data['assignee']); + obj.assignee = ComponentsschemasUserYaml.constructFromObject(data['assignee']); if (data.hasOwnProperty('state')) obj.state = ApiClient.convertToType(data['state'], 'String'); if (data.hasOwnProperty('comments')) obj.comments = ApiClient.convertToType(data['comments'], 'Number'); if (data.hasOwnProperty('created_at')) - obj.createdAt = ApiClient.convertToType(data['created_at'], 'String'); + obj.createdAt = ApiClient.convertToType(data['created_at'], 'Date'); if (data.hasOwnProperty('updated_at')) - obj.updatedAt = ApiClient.convertToType(data['updated_at'], 'String'); + obj.updatedAt = ApiClient.convertToType(data['updated_at'], 'Date'); if (data.hasOwnProperty('pull_request')) obj.pullRequest = ApiClient.convertToType(data['pull_request'], Object); - if (data.hasOwnProperty('closed')) - obj.closed = ApiClient.convertToType(data['closed'], 'Boolean'); } return obj; } @@ -95,42 +76,61 @@ export class Issue { Issue.prototype.id = undefined; /** + * Issue index within the repository * @member {Number} _number */ Issue.prototype._number = undefined; /** - * @member {module:model/User} user + * @member {module:model/ComponentsschemasUserYaml} user */ Issue.prototype.user = undefined; /** - * @member {module:model/Title} title + * @member {String} title */ Issue.prototype.title = undefined; /** - * @member {module:model/Body} body + * @member {String} body */ Issue.prototype.body = undefined; /** - * @member {Array.} labels + * @member {Array.} labels */ Issue.prototype.labels = undefined; /** - * @member {module:model/IssueMilestone} milestone + * @member {Object} milestone */ Issue.prototype.milestone = undefined; /** - * @member {module:model/IssueAssignee} assignee + * @member {module:model/ComponentsschemasUserYaml} assignee */ Issue.prototype.assignee = undefined; /** - * @member {String} state + * Allowed values for the state property. + * @enum {String} + * @readonly + */ +Issue.StateEnum = { + /** + * value: "open" + * @const + */ + open: "open", + + /** + * value: "closed" + * @const + */ + closed: "closed" +}; +/** + * @member {module:model/Issue.StateEnum} state */ Issue.prototype.state = undefined; @@ -140,22 +140,18 @@ Issue.prototype.state = undefined; Issue.prototype.comments = undefined; /** - * @member {String} createdAt + * @member {Date} createdAt */ Issue.prototype.createdAt = undefined; /** - * @member {String} updatedAt + * @member {Date} updatedAt */ Issue.prototype.updatedAt = undefined; /** + * Present when the issue is associated with a pull request * @member {Object} pullRequest */ Issue.prototype.pullRequest = undefined; -/** - * @member {Boolean} closed - */ -Issue.prototype.closed = undefined; - diff --git a/JavaScript/src/model/IssueAssignee.js b/JavaScript/src/model/IssueAssignee.js deleted file mode 100644 index 4035dda..0000000 --- a/JavaScript/src/model/IssueAssignee.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The IssueAssignee model module. - * @module model/IssueAssignee - * @version 1.0.2 - */ -export class IssueAssignee { - /** - * Constructs a new IssueAssignee. - * @alias module:model/IssueAssignee - * @class - */ - constructor() { - } - - /** - * Constructs a IssueAssignee from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/IssueAssignee} obj Optional instance to populate. - * @return {module:model/IssueAssignee} The populated IssueAssignee instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new IssueAssignee(); - if (data.hasOwnProperty('id')) - obj.id = ApiClient.convertToType(data['id'], 'Number'); - if (data.hasOwnProperty('login')) - obj.login = ApiClient.convertToType(data['login'], 'String'); - if (data.hasOwnProperty('full_name')) - obj.fullName = ApiClient.convertToType(data['full_name'], 'String'); - if (data.hasOwnProperty('avatar_url')) - obj.avatarUrl = ApiClient.convertToType(data['avatar_url'], 'String'); - if (data.hasOwnProperty('username')) - obj.username = ApiClient.convertToType(data['username'], 'String'); - } - return obj; - } -} - -/** - * @member {Number} id - */ -IssueAssignee.prototype.id = undefined; - -/** - * @member {String} login - */ -IssueAssignee.prototype.login = undefined; - -/** - * @member {String} fullName - */ -IssueAssignee.prototype.fullName = undefined; - -/** - * @member {String} avatarUrl - */ -IssueAssignee.prototype.avatarUrl = undefined; - -/** - * @member {String} username - */ -IssueAssignee.prototype.username = undefined; - diff --git a/JavaScript/src/model/IssueLabels.js b/JavaScript/src/model/IssueLabels.js deleted file mode 100644 index f0dbcf9..0000000 --- a/JavaScript/src/model/IssueLabels.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The IssueLabels model module. - * @module model/IssueLabels - * @version 1.0.2 - */ -export class IssueLabels { - /** - * Constructs a new IssueLabels. - * @alias module:model/IssueLabels - * @class - */ - constructor() { - } - - /** - * Constructs a IssueLabels from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/IssueLabels} obj Optional instance to populate. - * @return {module:model/IssueLabels} The populated IssueLabels instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new IssueLabels(); - if (data.hasOwnProperty('id')) - obj.id = ApiClient.convertToType(data['id'], 'Number'); - if (data.hasOwnProperty('name')) - obj.name = ApiClient.convertToType(data['name'], 'String'); - if (data.hasOwnProperty('color')) - obj.color = ApiClient.convertToType(data['color'], 'String'); - if (data.hasOwnProperty('url')) - obj.url = ApiClient.convertToType(data['url'], 'String'); - } - return obj; - } -} - -/** - * @member {Number} id - */ -IssueLabels.prototype.id = undefined; - -/** - * @member {String} name - */ -IssueLabels.prototype.name = undefined; - -/** - * @member {String} color - */ -IssueLabels.prototype.color = undefined; - -/** - * @member {String} url - */ -IssueLabels.prototype.url = undefined; - diff --git a/JavaScript/src/model/IssueMilestone.js b/JavaScript/src/model/IssueMilestone.js deleted file mode 100644 index b03038a..0000000 --- a/JavaScript/src/model/IssueMilestone.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The IssueMilestone model module. - * @module model/IssueMilestone - * @version 1.0.2 - */ -export class IssueMilestone { - /** - * Constructs a new IssueMilestone. - * @alias module:model/IssueMilestone - * @class - */ - constructor() { - } - - /** - * Constructs a IssueMilestone from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/IssueMilestone} obj Optional instance to populate. - * @return {module:model/IssueMilestone} The populated IssueMilestone instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new IssueMilestone(); - if (data.hasOwnProperty('id')) - obj.id = ApiClient.convertToType(data['id'], 'Number'); - if (data.hasOwnProperty('title')) - obj.title = ApiClient.convertToType(data['title'], 'String'); - if (data.hasOwnProperty('description')) - obj.description = ApiClient.convertToType(data['description'], 'String'); - if (data.hasOwnProperty('state')) - obj.state = ApiClient.convertToType(data['state'], 'String'); - if (data.hasOwnProperty('open_issues')) - obj.openIssues = ApiClient.convertToType(data['open_issues'], 'Number'); - if (data.hasOwnProperty('closed_issues')) - obj.closedIssues = ApiClient.convertToType(data['closed_issues'], 'Number'); - if (data.hasOwnProperty('closed_at')) - obj.closedAt = ApiClient.convertToType(data['closed_at'], 'String'); - if (data.hasOwnProperty('due_on')) - obj.dueOn = ApiClient.convertToType(data['due_on'], 'String'); - } - return obj; - } -} - -/** - * @member {Number} id - */ -IssueMilestone.prototype.id = undefined; - -/** - * @member {String} title - */ -IssueMilestone.prototype.title = undefined; - -/** - * @member {String} description - */ -IssueMilestone.prototype.description = undefined; - -/** - * @member {String} state - */ -IssueMilestone.prototype.state = undefined; - -/** - * @member {Number} openIssues - */ -IssueMilestone.prototype.openIssues = undefined; - -/** - * @member {Number} closedIssues - */ -IssueMilestone.prototype.closedIssues = undefined; - -/** - * @member {String} closedAt - */ -IssueMilestone.prototype.closedAt = undefined; - -/** - * @member {String} dueOn - */ -IssueMilestone.prototype.dueOn = undefined; - diff --git a/JavaScript/src/model/Issues.js b/JavaScript/src/model/Issues.js index ffd4a2b..08392bf 100644 --- a/JavaScript/src/model/Issues.js +++ b/JavaScript/src/model/Issues.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -13,12 +13,12 @@ * */ import {ApiClient} from '../ApiClient'; -import {Issue} from './Issue'; +import {ComponentsschemasIssueYaml} from './ComponentsschemasIssueYaml'; /** * The Issues model module. * @module model/Issues - * @version 1.0.2 + * @version 1.0.3 */ export class Issues extends Array { /** @@ -41,7 +41,7 @@ export class Issues extends Array { static constructFromObject(data, obj) { if (data) { obj = obj || new Issues(); - ApiClient.constructFromObject(data, obj, 'Issue'); + ApiClient.constructFromObject(data, obj, 'ComponentsschemasIssueYaml'); } return obj; } diff --git a/JavaScript/src/model/Labels.js b/JavaScript/src/model/Labels.js deleted file mode 100644 index b7313ba..0000000 --- a/JavaScript/src/model/Labels.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The Labels model module. - * @module model/Labels - * @version 1.0.2 - */ -export class Labels extends Array { - /** - * Constructs a new Labels. - * Labels **ID** to associate with this issue. **Note:** Only users with write access can set labels for new issues. Labels are silently dropped otherwise. - * @alias module:model/Labels - * @class - * @extends Array - */ - constructor() { - super(); - } - - /** - * Constructs a Labels from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Labels} obj Optional instance to populate. - * @return {module:model/Labels} The populated Labels instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Labels(); - ApiClient.constructFromObject(data, obj, 'Number'); - } - return obj; - } -} diff --git a/JavaScript/src/model/MigrateRepo.js b/JavaScript/src/model/MigrateRepo.js deleted file mode 100644 index c0096df..0000000 --- a/JavaScript/src/model/MigrateRepo.js +++ /dev/null @@ -1,133 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The MigrateRepo model module. - * @module model/MigrateRepo - * @version 1.0.2 - */ -export class MigrateRepo { - /** - * Constructs a new MigrateRepo. - * @alias module:model/MigrateRepo - * @class - * @param cloneAddr {String} Remote Git address (HTTP/HTTPS URL or local path) - * @param userId {Number} User ID who takes ownership of this repository - */ - constructor(cloneAddr, userId) { - this.cloneAddr = cloneAddr; - this.userId = userId; - } - - /** - * Constructs a MigrateRepo from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/MigrateRepo} obj Optional instance to populate. - * @return {module:model/MigrateRepo} The populated MigrateRepo instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new MigrateRepo(); - if (data.hasOwnProperty('clone_addr')) - obj.cloneAddr = ApiClient.convertToType(data['clone_addr'], 'String'); - if (data.hasOwnProperty('auth_username')) - obj.authUsername = ApiClient.convertToType(data['auth_username'], 'String'); - if (data.hasOwnProperty('auth_password')) - obj.authPassword = ApiClient.convertToType(data['auth_password'], 'String'); - if (data.hasOwnProperty('user_id')) - obj.userId = ApiClient.convertToType(data['user_id'], 'Number'); - if (data.hasOwnProperty('repo_name')) - obj.repoName = ApiClient.convertToType(data['repo_name'], 'String'); - if (data.hasOwnProperty('mirror')) - obj.mirror = ApiClient.convertToType(data['mirror'], 'Boolean'); - if (data.hasOwnProperty('visibility')) - obj.visibility = ApiClient.convertToType(data['visibility'], 'String'); - if (data.hasOwnProperty('description')) - obj.description = ApiClient.convertToType(data['description'], 'String'); - } - return obj; - } -} - -/** - * Remote Git address (HTTP/HTTPS URL or local path) - * @member {String} cloneAddr - */ -MigrateRepo.prototype.cloneAddr = undefined; - -/** - * Authorization username - * @member {String} authUsername - */ -MigrateRepo.prototype.authUsername = undefined; - -/** - * Authorization password - * @member {String} authPassword - */ -MigrateRepo.prototype.authPassword = undefined; - -/** - * User ID who takes ownership of this repository - * @member {Number} userId - */ -MigrateRepo.prototype.userId = undefined; - -/** - * Name of the repository - * @member {String} repoName - */ -MigrateRepo.prototype.repoName = undefined; - -/** - * Repository will be a mirror (connected repository). - * @member {Boolean} mirror - * @default false - */ -MigrateRepo.prototype.mirror = false; - -/** - * Allowed values for the visibility property. - * @enum {String} - * @readonly - */ -MigrateRepo.VisibilityEnum = { - /** - * value: "private" - * @const - */ - _private: "private", - - /** - * value: "public" - * @const - */ - _public: "public" -}; -/** - * Repository will be private or public. - * @member {module:model/MigrateRepo.VisibilityEnum} visibility - * @default 'false' - */ -MigrateRepo.prototype.visibility = 'false'; - -/** - * Description of the repository - * @member {String} description - */ -MigrateRepo.prototype.description = undefined; - diff --git a/JavaScript/src/model/Milestone.js b/JavaScript/src/model/Milestone.js deleted file mode 100644 index 950d394..0000000 --- a/JavaScript/src/model/Milestone.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The Milestone model module. - * @module model/Milestone - * @version 1.0.2 - */ -export class Milestone { - /** - * Constructs a new Milestone. - * The **ID** of the milestone to associate this issue with. **Note:** Only users with write access can set the milestone for new issues. The milestone is silently dropped otherwise. - * @alias module:model/Milestone - * @class - */ - constructor() { - } - - /** - * Constructs a Milestone from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Milestone} obj Optional instance to populate. - * @return {module:model/Milestone} The populated Milestone instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Milestone(); - } - return obj; - } -} diff --git a/JavaScript/src/model/PatchIssue.js b/JavaScript/src/model/PatchIssue.js index 8e1abcb..8fd9984 100644 --- a/JavaScript/src/model/PatchIssue.js +++ b/JavaScript/src/model/PatchIssue.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -13,16 +13,16 @@ * */ import {ApiClient} from '../ApiClient'; -import {Assignee} from './Assignee'; -import {Body} from './Body'; -import {Milestone} from './Milestone'; -import {State} from './State'; -import {Title} from './Title'; +import {ComponentsschemasAssigneeYaml} from './ComponentsschemasAssigneeYaml'; +import {ComponentsschemasBodyYaml} from './ComponentsschemasBodyYaml'; +import {ComponentsschemasMilestoneYaml} from './ComponentsschemasMilestoneYaml'; +import {ComponentsschemasStateYaml} from './ComponentsschemasStateYaml'; +import {ComponentsschemasTitleYaml} from './ComponentsschemasTitleYaml'; /** * The PatchIssue model module. * @module model/PatchIssue - * @version 1.0.2 + * @version 1.0.3 */ export class PatchIssue { /** @@ -44,42 +44,42 @@ export class PatchIssue { if (data) { obj = obj || new PatchIssue(); if (data.hasOwnProperty('title')) - obj.title = Title.constructFromObject(data['title']); + obj.title = ComponentsschemasTitleYaml.constructFromObject(data['title']); if (data.hasOwnProperty('body')) - obj.body = Body.constructFromObject(data['body']); + obj.body = ComponentsschemasBodyYaml.constructFromObject(data['body']); if (data.hasOwnProperty('assignee')) - obj.assignee = Assignee.constructFromObject(data['assignee']); + obj.assignee = ComponentsschemasAssigneeYaml.constructFromObject(data['assignee']); if (data.hasOwnProperty('milestone')) - obj.milestone = Milestone.constructFromObject(data['milestone']); + obj.milestone = ComponentsschemasMilestoneYaml.constructFromObject(data['milestone']); if (data.hasOwnProperty('state')) - obj.state = State.constructFromObject(data['state']); + obj.state = ComponentsschemasStateYaml.constructFromObject(data['state']); } return obj; } } /** - * @member {module:model/Title} title + * @member {module:model/ComponentsschemasTitleYaml} title */ PatchIssue.prototype.title = undefined; /** - * @member {module:model/Body} body + * @member {module:model/ComponentsschemasBodyYaml} body */ PatchIssue.prototype.body = undefined; /** - * @member {module:model/Assignee} assignee + * @member {module:model/ComponentsschemasAssigneeYaml} assignee */ PatchIssue.prototype.assignee = undefined; /** - * @member {module:model/Milestone} milestone + * @member {module:model/ComponentsschemasMilestoneYaml} milestone */ PatchIssue.prototype.milestone = undefined; /** - * @member {module:model/State} state + * @member {module:model/ComponentsschemasStateYaml} state */ PatchIssue.prototype.state = undefined; diff --git a/JavaScript/src/model/PostIssue.js b/JavaScript/src/model/PostIssue.js index 056ff80..de66557 100644 --- a/JavaScript/src/model/PostIssue.js +++ b/JavaScript/src/model/PostIssue.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -13,17 +13,17 @@ * */ import {ApiClient} from '../ApiClient'; -import {Assignee} from './Assignee'; -import {Body} from './Body'; -import {Closed} from './Closed'; -import {Labels} from './Labels'; -import {Milestone} from './Milestone'; -import {Title} from './Title'; +import {ComponentsschemasAssigneeYaml} from './ComponentsschemasAssigneeYaml'; +import {ComponentsschemasBodyYaml} from './ComponentsschemasBodyYaml'; +import {ComponentsschemasClosedYaml} from './ComponentsschemasClosedYaml'; +import {ComponentsschemasLabelsYaml} from './ComponentsschemasLabelsYaml'; +import {ComponentsschemasMilestoneYaml} from './ComponentsschemasMilestoneYaml'; +import {ComponentsschemasTitleYaml} from './ComponentsschemasTitleYaml'; /** * The PostIssue model module. * @module model/PostIssue - * @version 1.0.2 + * @version 1.0.3 */ export class PostIssue { /** @@ -45,49 +45,49 @@ export class PostIssue { if (data) { obj = obj || new PostIssue(); if (data.hasOwnProperty('title')) - obj.title = Title.constructFromObject(data['title']); + obj.title = ComponentsschemasTitleYaml.constructFromObject(data['title']); if (data.hasOwnProperty('body')) - obj.body = Body.constructFromObject(data['body']); + obj.body = ComponentsschemasBodyYaml.constructFromObject(data['body']); if (data.hasOwnProperty('assignee')) - obj.assignee = Assignee.constructFromObject(data['assignee']); + obj.assignee = ComponentsschemasAssigneeYaml.constructFromObject(data['assignee']); if (data.hasOwnProperty('milestone')) - obj.milestone = Milestone.constructFromObject(data['milestone']); + obj.milestone = ComponentsschemasMilestoneYaml.constructFromObject(data['milestone']); if (data.hasOwnProperty('labels')) - obj.labels = Labels.constructFromObject(data['labels']); + obj.labels = ComponentsschemasLabelsYaml.constructFromObject(data['labels']); if (data.hasOwnProperty('closed')) - obj.closed = Closed.constructFromObject(data['closed']); + obj.closed = ComponentsschemasClosedYaml.constructFromObject(data['closed']); } return obj; } } /** - * @member {module:model/Title} title + * @member {module:model/ComponentsschemasTitleYaml} title */ PostIssue.prototype.title = undefined; /** - * @member {module:model/Body} body + * @member {module:model/ComponentsschemasBodyYaml} body */ PostIssue.prototype.body = undefined; /** - * @member {module:model/Assignee} assignee + * @member {module:model/ComponentsschemasAssigneeYaml} assignee */ PostIssue.prototype.assignee = undefined; /** - * @member {module:model/Milestone} milestone + * @member {module:model/ComponentsschemasMilestoneYaml} milestone */ PostIssue.prototype.milestone = undefined; /** - * @member {module:model/Labels} labels + * @member {module:model/ComponentsschemasLabelsYaml} labels */ PostIssue.prototype.labels = undefined; /** - * @member {module:model/Closed} closed + * @member {module:model/ComponentsschemasClosedYaml} closed */ PostIssue.prototype.closed = undefined; diff --git a/JavaScript/src/model/PutFile.js b/JavaScript/src/model/PutFile.js index aeeae19..c1ce37c 100644 --- a/JavaScript/src/model/PutFile.js +++ b/JavaScript/src/model/PutFile.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The PutFile model module. * @module model/PutFile - * @version 1.0.2 + * @version 1.0.3 */ export class PutFile { /** diff --git a/JavaScript/src/model/RepoHooksBody.js b/JavaScript/src/model/RepoHooksBody.js deleted file mode 100644 index f938f1c..0000000 --- a/JavaScript/src/model/RepoHooksBody.js +++ /dev/null @@ -1,103 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; -import {WebhookConfig} from './WebhookConfig'; -import {WebhookEvents} from './WebhookEvents'; - -/** - * The RepoHooksBody model module. - * @module model/RepoHooksBody - * @version 1.0.2 - */ -export class RepoHooksBody { - /** - * Constructs a new RepoHooksBody. - * @alias module:model/RepoHooksBody - * @class - * @param type {module:model/RepoHooksBody.TypeEnum} The type of webhook - * @param config {module:model/WebhookConfig} - */ - constructor(type, config) { - this.type = type; - this.config = config; - } - - /** - * Constructs a RepoHooksBody from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/RepoHooksBody} obj Optional instance to populate. - * @return {module:model/RepoHooksBody} The populated RepoHooksBody instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new RepoHooksBody(); - if (data.hasOwnProperty('type')) - obj.type = ApiClient.convertToType(data['type'], 'String'); - if (data.hasOwnProperty('config')) - obj.config = WebhookConfig.constructFromObject(data['config']); - if (data.hasOwnProperty('events')) - obj.events = WebhookEvents.constructFromObject(data['events']); - } - return obj; - } -} - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -RepoHooksBody.TypeEnum = { - /** - * value: "dagshub" - * @const - */ - dagshub: "dagshub", - - /** - * value: "slack" - * @const - */ - slack: "slack", - - /** - * value: "discord" - * @const - */ - discord: "discord", - - /** - * value: "dingtalk" - * @const - */ - dingtalk: "dingtalk" -}; -/** - * The type of webhook - * @member {module:model/RepoHooksBody.TypeEnum} type - */ -RepoHooksBody.prototype.type = undefined; - -/** - * @member {module:model/WebhookConfig} config - */ -RepoHooksBody.prototype.config = undefined; - -/** - * @member {module:model/WebhookEvents} events - */ -RepoHooksBody.prototype.events = undefined; - diff --git a/JavaScript/src/model/State.js b/JavaScript/src/model/State.js deleted file mode 100644 index a05c448..0000000 --- a/JavaScript/src/model/State.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * Enum class State. - * @enum {String} - * @readonly - */ -const State = { - /** - * value: "open" - * @const - */ - open: "open", - - /** - * value: "closed" - * @const - */ - closed: "closed", - - /** - * Returns a State enum value from a JavaScript object name. - * @param {Object} data The plain JavaScript object containing the name of the enum value. - * @return {module:model/State} The enum State value. - */ - constructFromObject: function(object) { - return object; - } -}; - -export {State}; \ No newline at end of file diff --git a/JavaScript/src/model/Title.js b/JavaScript/src/model/Title.js deleted file mode 100644 index 4498fec..0000000 --- a/JavaScript/src/model/Title.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The Title model module. - * @module model/Title - * @version 1.0.2 - */ -export class Title { - /** - * Constructs a new Title. - * The title of the issue - * @alias module:model/Title - * @class - */ - constructor() { - } - - /** - * Constructs a Title from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Title} obj Optional instance to populate. - * @return {module:model/Title} The populated Title instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Title(); - } - return obj; - } -} diff --git a/JavaScript/src/model/User.js b/JavaScript/src/model/User.js index 9971b6e..abdbe82 100644 --- a/JavaScript/src/model/User.js +++ b/JavaScript/src/model/User.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The User model module. * @module model/User - * @version 1.0.2 + * @version 1.0.3 */ export class User { /** @@ -42,12 +42,20 @@ export class User { obj.id = ApiClient.convertToType(data['id'], 'Number'); if (data.hasOwnProperty('login')) obj.login = ApiClient.convertToType(data['login'], 'String'); + if (data.hasOwnProperty('username')) + obj.username = ApiClient.convertToType(data['username'], 'String'); if (data.hasOwnProperty('full_name')) obj.fullName = ApiClient.convertToType(data['full_name'], 'String'); if (data.hasOwnProperty('avatar_url')) obj.avatarUrl = ApiClient.convertToType(data['avatar_url'], 'String'); - if (data.hasOwnProperty('username')) - obj.username = ApiClient.convertToType(data['username'], 'String'); + if (data.hasOwnProperty('public_email')) + obj.publicEmail = ApiClient.convertToType(data['public_email'], 'String'); + if (data.hasOwnProperty('website')) + obj.website = ApiClient.convertToType(data['website'], 'String'); + if (data.hasOwnProperty('company')) + obj.company = ApiClient.convertToType(data['company'], 'String'); + if (data.hasOwnProperty('description')) + obj.description = ApiClient.convertToType(data['description'], 'String'); } return obj; } @@ -63,6 +71,12 @@ User.prototype.id = undefined; */ User.prototype.login = undefined; +/** + * Alias for login (legacy compatibility) + * @member {String} username + */ +User.prototype.username = undefined; + /** * @member {String} fullName */ @@ -74,7 +88,22 @@ User.prototype.fullName = undefined; User.prototype.avatarUrl = undefined; /** - * @member {String} username + * @member {String} publicEmail */ -User.prototype.username = undefined; +User.prototype.publicEmail = undefined; + +/** + * @member {String} website + */ +User.prototype.website = undefined; + +/** + * @member {String} company + */ +User.prototype.company = undefined; + +/** + * @member {String} description + */ +User.prototype.description = undefined; diff --git a/JavaScript/src/model/WebhookConfig.js b/JavaScript/src/model/WebhookConfig.js deleted file mode 100644 index 1347622..0000000 --- a/JavaScript/src/model/WebhookConfig.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The WebhookConfig model module. - * @module model/WebhookConfig - * @version 1.0.2 - */ -export class WebhookConfig { - /** - * Constructs a new WebhookConfig. - * Key/value pairs to provide settings for this hook - * @alias module:model/WebhookConfig - * @class - * @param url {String} A string defining the URL to which the payloads will be delivered. - * @param contentType {module:model/WebhookConfig.ContentTypeEnum} A string defining the media type used to serialize the payloads. - */ - constructor(url, contentType) { - this.url = url; - this.contentType = contentType; - } - - /** - * Constructs a WebhookConfig from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/WebhookConfig} obj Optional instance to populate. - * @return {module:model/WebhookConfig} The populated WebhookConfig instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new WebhookConfig(); - if (data.hasOwnProperty('url')) - obj.url = ApiClient.convertToType(data['url'], 'String'); - if (data.hasOwnProperty('content_type')) - obj.contentType = ApiClient.convertToType(data['content_type'], 'String'); - if (data.hasOwnProperty('secret')) - obj.secret = ApiClient.convertToType(data['secret'], 'String'); - } - return obj; - } -} - -/** - * A string defining the URL to which the payloads will be delivered. - * @member {String} url - */ -WebhookConfig.prototype.url = undefined; - -/** - * Allowed values for the contentType property. - * @enum {String} - * @readonly - */ -WebhookConfig.ContentTypeEnum = { - /** - * value: "json" - * @const - */ - json: "json", - - /** - * value: "form" - * @const - */ - form: "form" -}; -/** - * A string defining the media type used to serialize the payloads. - * @member {module:model/WebhookConfig.ContentTypeEnum} contentType - */ -WebhookConfig.prototype.contentType = undefined; - -/** - * An optional string that's passed with the HTTP requests body. - * @member {String} secret - */ -WebhookConfig.prototype.secret = undefined; - diff --git a/JavaScript/src/model/WebhookEvents.js b/JavaScript/src/model/WebhookEvents.js deleted file mode 100644 index 769afa8..0000000 --- a/JavaScript/src/model/WebhookEvents.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -import {ApiClient} from '../ApiClient'; - -/** - * The WebhookEvents model module. - * @module model/WebhookEvents - * @version 1.0.2 - */ -export class WebhookEvents extends Array { - /** - * Constructs a new WebhookEvents. - * Determines what events the hook is triggered format. - * @alias module:model/WebhookEvents - * @class - * @extends Array - */ - constructor() { - super(); - } - - /** - * Constructs a WebhookEvents from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/WebhookEvents} obj Optional instance to populate. - * @return {module:model/WebhookEvents} The populated WebhookEvents instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new WebhookEvents(); - ApiClient.constructFromObject(data, obj, 'String'); - } - return obj; - } -} diff --git a/JavaScript/test/api/BranchesApi.spec.js b/JavaScript/test/api/BranchesApi.spec.js deleted file mode 100644 index 2c0cd24..0000000 --- a/JavaScript/test/api/BranchesApi.spec.js +++ /dev/null @@ -1,76 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.BranchesApi(); - }); - - describe('(package)', function() { - describe('BranchesApi', function() { - describe('getBranch', function() { - it('should call getBranch successfully', function(done) { - // TODO: uncomment, update parameter values for getBranch call - /* - - instance.getBranch(owner, repo, branch, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('listBranches', function() { - it('should call listBranches successfully', function(done) { - // TODO: uncomment, update parameter values for listBranches call - /* - - instance.listBranches(owner, repo, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/api/CollaboratorsApi.spec.js b/JavaScript/test/api/CollaboratorsApi.spec.js deleted file mode 100644 index 981f8b5..0000000 --- a/JavaScript/test/api/CollaboratorsApi.spec.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.CollaboratorsApi(); - }); - - describe('(package)', function() { - describe('CollaboratorsApi', function() { - describe('addCollaborator', function() { - it('should call addCollaborator successfully', function(done) { - // TODO: uncomment, update parameter values for addCollaborator call - /* - var opts = {}; - - instance.addCollaborator(owner, repo, collaborator, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('getCollaborators', function() { - it('should call getCollaborators successfully', function(done) { - // TODO: uncomment, update parameter values for getCollaborators call - /* - - instance.getCollaborators(owner, repo, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('removeCollaborator', function() { - it('should call removeCollaborator successfully', function(done) { - // TODO: uncomment, update parameter values for removeCollaborator call - /* - - instance.removeCollaborator(owner, repo, collaborator, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/api/CommitsApi.spec.js b/JavaScript/test/api/CommitsApi.spec.js deleted file mode 100644 index 11e18df..0000000 --- a/JavaScript/test/api/CommitsApi.spec.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.CommitsApi(); - }); - - describe('(package)', function() { - describe('CommitsApi', function() { - describe('getCommit', function() { - it('should call getCommit successfully', function(done) { - // TODO: uncomment, update parameter values for getCommit call - /* - - instance.getCommit(owner, repo, sha, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/api/ContentApi.spec.js b/JavaScript/test/api/ContentApi.spec.js deleted file mode 100644 index f04fa4d..0000000 --- a/JavaScript/test/api/ContentApi.spec.js +++ /dev/null @@ -1,116 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.ContentApi(); - }); - - describe('(package)', function() { - describe('ContentApi', function() { - describe('getArchive', function() { - it('should call getArchive successfully', function(done) { - // TODO: uncomment, update parameter values for getArchive call - /* - - instance.getArchive(owner, repo, ref, format, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('getContent', function() { - it('should call getContent successfully', function(done) { - // TODO: uncomment, update parameter values for getContent call and complete the assertions - /* - var opts = {}; - - instance.getContent(owner, repo, branch, path, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - // TODO: update response assertions - expect(data).to.be.a(DagsHubApi.Files); - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('getRaw', function() { - it('should call getRaw successfully', function(done) { - // TODO: uncomment, update parameter values for getRaw call - /* - - instance.getRaw(owner, repo, ref, path, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('uploadContent', function() { - it('should call uploadContent successfully', function(done) { - // TODO: uncomment, update parameter values for uploadContent call - /* - var opts = {}; - - instance.uploadContent(owner, repo, branch, path, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/api/ExperimentsApi.spec.js b/JavaScript/test/api/ExperimentsApi.spec.js deleted file mode 100644 index 84aadad..0000000 --- a/JavaScript/test/api/ExperimentsApi.spec.js +++ /dev/null @@ -1,150 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.ExperimentsApi(); - }); - - describe('(package)', function() { - describe('ExperimentsApi', function() { - describe('addExperimentLabel', function() { - it('should call addExperimentLabel successfully', function(done) { - // TODO: uncomment, update parameter values for addExperimentLabel call - /* - - instance.addExperimentLabel(owner, repo, experimentKey, experimentLabel, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('deleteExperiment', function() { - it('should call deleteExperiment successfully', function(done) { - // TODO: uncomment, update parameter values for deleteExperiment call - /* - - instance.deleteExperiment(owner, repo, experimentKey, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('deleteExperimentLabel', function() { - it('should call deleteExperimentLabel successfully', function(done) { - // TODO: uncomment, update parameter values for deleteExperimentLabel call - /* - - instance.deleteExperimentLabel(owner, repo, experimentKey, experimentLabel, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('editExperiment', function() { - it('should call editExperiment successfully', function(done) { - // TODO: uncomment, update parameter values for editExperiment call - /* - var opts = {}; - - instance.editExperiment(owner, repo, experimentKey, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('getExperimentMetrics', function() { - it('should call getExperimentMetrics successfully', function(done) { - // TODO: uncomment, update parameter values for getExperimentMetrics call - /* - var opts = {}; - - instance.getExperimentMetrics(owner, repo, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('getExperiments', function() { - it('should call getExperiments successfully', function(done) { - // TODO: uncomment, update parameter values for getExperiments call - /* - - instance.getExperiments(owner, repo, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/api/IssuesApi.spec.js b/JavaScript/test/api/IssuesApi.spec.js deleted file mode 100644 index 7a42b4a..0000000 --- a/JavaScript/test/api/IssuesApi.spec.js +++ /dev/null @@ -1,122 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.IssuesApi(); - }); - - describe('(package)', function() { - describe('IssuesApi', function() { - describe('createIssue', function() { - it('should call createIssue successfully', function(done) { - // TODO: uncomment, update parameter values for createIssue call and complete the assertions - /* - var opts = {}; - - instance.createIssue(owner, repo, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - // TODO: update response assertions - expect(data).to.be.a(DagsHubApi.Issue); - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('editIssue', function() { - it('should call editIssue successfully', function(done) { - // TODO: uncomment, update parameter values for editIssue call and complete the assertions - /* - var opts = {}; - - instance.editIssue(owner, repo, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - // TODO: update response assertions - expect(data).to.be.a(DagsHubApi.Issue); - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('getIssue', function() { - it('should call getIssue successfully', function(done) { - // TODO: uncomment, update parameter values for getIssue call and complete the assertions - /* - - instance.getIssue(owner, repo, index, function(error, data, response) { - if (error) { - done(error); - return; - } - // TODO: update response assertions - expect(data).to.be.a(DagsHubApi.Issue); - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('listRepoIssues', function() { - it('should call listRepoIssues successfully', function(done) { - // TODO: uncomment, update parameter values for listRepoIssues call and complete the assertions - /* - - instance.listRepoIssues(owner, repo, function(error, data, response) { - if (error) { - done(error); - return; - } - // TODO: update response assertions - expect(data).to.be.a(DagsHubApi.Issues); - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/api/ReleasesApi.spec.js b/JavaScript/test/api/ReleasesApi.spec.js deleted file mode 100644 index 5d5690d..0000000 --- a/JavaScript/test/api/ReleasesApi.spec.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.ReleasesApi(); - }); - - describe('(package)', function() { - describe('ReleasesApi', function() { - describe('listReleases', function() { - it('should call listReleases successfully', function(done) { - // TODO: uncomment, update parameter values for listReleases call - /* - - instance.listReleases(owner, repo, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/api/RepositoryApi.spec.js b/JavaScript/test/api/RepositoryApi.spec.js deleted file mode 100644 index e9bf72a..0000000 --- a/JavaScript/test/api/RepositoryApi.spec.js +++ /dev/null @@ -1,194 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.RepositoryApi(); - }); - - describe('(package)', function() { - describe('RepositoryApi', function() { - describe('createOrgRepo', function() { - it('should call createOrgRepo successfully', function(done) { - // TODO: uncomment, update parameter values for createOrgRepo call - /* - var opts = {}; - - instance.createOrgRepo(orgname, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('createRepo', function() { - it('should call createRepo successfully', function(done) { - // TODO: uncomment, update parameter values for createRepo call - /* - var opts = {}; - - instance.createRepo(opts, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('getRepo', function() { - it('should call getRepo successfully', function(done) { - // TODO: uncomment, update parameter values for getRepo call - /* - - instance.getRepo(owner, repo, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('listMyRepos', function() { - it('should call listMyRepos successfully', function(done) { - // TODO: uncomment listMyRepos call and complete the assertions - /* - - instance.listMyRepos(function(error, data, response) { - if (error) { - done(error); - return; - } - // TODO: update response assertions - expect(data).to.be.a(Object); - // expect(data).to.be(null); - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('listOrgRepos', function() { - it('should call listOrgRepos successfully', function(done) { - // TODO: uncomment, update parameter values for listOrgRepos call - /* - - instance.listOrgRepos(orgname, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('listUserRepos', function() { - it('should call listUserRepos successfully', function(done) { - // TODO: uncomment, update parameter values for listUserRepos call - /* - - instance.listUserRepos(username, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('migrateRepo', function() { - it('should call migrateRepo successfully', function(done) { - // TODO: uncomment, update parameter values for migrateRepo call - /* - var opts = {}; - - instance.migrateRepo(opts, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('search', function() { - it('should call search successfully', function(done) { - // TODO: uncomment, update parameter values for search call and complete the assertions - /* - var opts = {}; - - instance.search(q, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - // TODO: update response assertions - expect(data).to.be.a(Object); - // expect(data).to.be(null); - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/api/StorageIntegrationsApi.spec.js b/JavaScript/test/api/StorageIntegrationsApi.spec.js deleted file mode 100644 index 6a3f67e..0000000 --- a/JavaScript/test/api/StorageIntegrationsApi.spec.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.StorageIntegrationsApi(); - }); - - describe('(package)', function() { - describe('StorageIntegrationsApi', function() { - describe('getBucketContent', function() { - it('should call getBucketContent successfully', function(done) { - // TODO: uncomment, update parameter values for getBucketContent call and complete the assertions - /* - var opts = {}; - - instance.getBucketContent(owner, repo, protocol, bucket, path, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - // TODO: update response assertions - expect(data).to.be.a(DagsHubApi.Files1); - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('getBucketFile', function() { - it('should call getBucketFile successfully', function(done) { - // TODO: uncomment, update parameter values for getBucketFile call - /* - - instance.getBucketFile(owner, repo, protocol, bucket, path, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('getBuckets', function() { - it('should call getBuckets successfully', function(done) { - // TODO: uncomment, update parameter values for getBuckets call and complete the assertions - /* - - instance.getBuckets(owner, repo, function(error, data, response) { - if (error) { - done(error); - return; - } - // TODO: update response assertions - expect(data).to.be.a(DagsHubApi.Integration); - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/api/UserApi.spec.js b/JavaScript/test/api/UserApi.spec.js deleted file mode 100644 index 1d18711..0000000 --- a/JavaScript/test/api/UserApi.spec.js +++ /dev/null @@ -1,76 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.UserApi(); - }); - - describe('(package)', function() { - describe('UserApi', function() { - describe('getAuthenticatedUser', function() { - it('should call getAuthenticatedUser successfully', function(done) { - // TODO: uncomment getAuthenticatedUser call - /* - - instance.getAuthenticatedUser(function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('getUser', function() { - it('should call getUser successfully', function(done) { - // TODO: uncomment, update parameter values for getUser call - /* - - instance.getUser(username, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/api/WebhooksApi.spec.js b/JavaScript/test/api/WebhooksApi.spec.js deleted file mode 100644 index 8193752..0000000 --- a/JavaScript/test/api/WebhooksApi.spec.js +++ /dev/null @@ -1,114 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new DagsHubApi.WebhooksApi(); - }); - - describe('(package)', function() { - describe('WebhooksApi', function() { - describe('createHook', function() { - it('should call createHook successfully', function(done) { - // TODO: uncomment, update parameter values for createHook call - /* - var opts = {}; - - instance.createHook(owner, repo, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('deleteHook', function() { - it('should call deleteHook successfully', function(done) { - // TODO: uncomment, update parameter values for deleteHook call - /* - - instance.deleteHook(owner, repo, id, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('editHook', function() { - it('should call editHook successfully', function(done) { - // TODO: uncomment, update parameter values for editHook call - /* - var opts = {}; - - instance.editHook(owner, repo, id, opts, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - describe('listHooks', function() { - it('should call listHooks successfully', function(done) { - // TODO: uncomment, update parameter values for listHooks call - /* - - instance.listHooks(owner, repo, function(error, data, response) { - if (error) { - done(error); - return; - } - - done(); - }); - */ - // TODO: uncomment and complete method invocation above, then delete this line and the next: - done(); - }); - }); - }); - }); - -})); diff --git a/JavaScript/test/assert-equals.js b/JavaScript/test/assert-equals.js deleted file mode 100644 index b95cd5f..0000000 --- a/JavaScript/test/assert-equals.js +++ /dev/null @@ -1,81 +0,0 @@ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(); - } else { - // Browser globals (root is window) - root.assertEquals = factory(); - } -}(this, function() { - 'use strict'; - - var assertEquals = function(expected, actual, ptr) { - if (!ptr) - ptr = ""; - if (actual === expected) - return; - if (expected instanceof Date || actual instanceof Date) { - expected = toISODateString(expected); - actual = toISODateString(actual); - if (actual !== expected) - fail(expected, actual, ptr, "date value incorrect;"); - } - if (!expected || !actual || typeof expected != 'object' && typeof actual != 'object') { - if (typeof actual != typeof expected) - fail(typeof expected, typeof actual, ptr, "value type incorrect;"); - if (actual != expected) - fail(expected, actual, ptr, "value incorrect;"); - } - return checkObject(expected, actual, ptr); - } - - function toISODateString(value) { - if (value instanceof Date) { - // JavaScript's ISO string contains a milliseconds component that must be stripped out. - value = value.toISOString().replace('.000', ''); - } - return value; - } - - function checkObject(expected, actual, ptr) { - if (undefOrNull(expected) || undefOrNull(actual)) - fail(expected, actual, ptr, "missing value;"); - if (typeof expected !== typeof actual) - fail(typeof expected, typeof actual, ptr, "wrong type;"); - if (expected.prototype !== actual.prototype) - fail(expected.prototype, actual.prototype, ptr, "wrong prototype;"); - try { - var expectedKeys = Object.keys(expected); - var actualKeys = Object.keys(actual); - } catch (e) { - fail(expectedKeys, actualKeys, ptr, "wrong keys;"); - } - if (actualKeys.length != expectedKeys.length) - fail(expectedKeys.length, actualKeys.length, ptr, "key count incorrect;"); - expectedKeys.sort(); - actualKeys.sort(); - for (var i = 0; i < expectedKeys.length; i++) { - if (actualKeys[i] != expectedKeys[i]) - fail(expectedKeys, actualKeys, ptr, "wrong keys;"); - } - for (i = 0; i < expectedKeys.length; i++) { - var key = expectedKeys[i]; - assertEquals(expected[key], actual[key], ptr + '/' + key); - } - } - - function undefOrNull(v) { - return v === undefined || v === null; - } - - function fail(expected, actual, ptr, msg) { - var text = ptr + ' ' + msg + " expected: " + expected + ", actual: " + actual; - console.log(text); - throw new Error(text); - } - - return assertEquals; -})); diff --git a/JavaScript/test/model/Assignee.spec.js b/JavaScript/test/model/Assignee.spec.js deleted file mode 100644 index 60fd680..0000000 --- a/JavaScript/test/model/Assignee.spec.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('Assignee', function() { - beforeEach(function() { - instance = new DagsHubApi.Assignee(); - }); - - it('should create an instance of Assignee', function() { - // TODO: update the code to test Assignee - expect(instance).to.be.a(DagsHubApi.Assignee); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/Closed.spec.js b/JavaScript/test/model/Closed.spec.js deleted file mode 100644 index f9ac10d..0000000 --- a/JavaScript/test/model/Closed.spec.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('Closed', function() { - beforeEach(function() { - instance = new DagsHubApi.Closed(); - }); - - it('should create an instance of Closed', function() { - // TODO: update the code to test Closed - expect(instance).to.be.a(DagsHubApi.Closed); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/CollaboratorsCollaboratorBody.spec.js b/JavaScript/test/model/CollaboratorsCollaboratorBody.spec.js deleted file mode 100644 index 10d62f6..0000000 --- a/JavaScript/test/model/CollaboratorsCollaboratorBody.spec.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('CollaboratorsCollaboratorBody', function() { - beforeEach(function() { - instance = new DagsHubApi.CollaboratorsCollaboratorBody(); - }); - - it('should create an instance of CollaboratorsCollaboratorBody', function() { - // TODO: update the code to test CollaboratorsCollaboratorBody - expect(instance).to.be.a(DagsHubApi.CollaboratorsCollaboratorBody); - }); - - it('should have the property permission (base name: "permission")', function() { - // TODO: update the code to test the property permission - expect(instance).to.have.property('permission'); - // expect(instance.permission).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/CreateRepo.spec.js b/JavaScript/test/model/CreateRepo.spec.js deleted file mode 100644 index b1602f7..0000000 --- a/JavaScript/test/model/CreateRepo.spec.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('CreateRepo', function() { - beforeEach(function() { - instance = new DagsHubApi.CreateRepo(); - }); - - it('should create an instance of CreateRepo', function() { - // TODO: update the code to test CreateRepo - expect(instance).to.be.a(DagsHubApi.CreateRepo); - }); - - it('should have the property name (base name: "name")', function() { - // TODO: update the code to test the property name - expect(instance).to.have.property('name'); - // expect(instance.name).to.be(expectedValueLiteral); - }); - - it('should have the property description (base name: "description")', function() { - // TODO: update the code to test the property description - expect(instance).to.have.property('description'); - // expect(instance.description).to.be(expectedValueLiteral); - }); - - it('should have the property _private (base name: "private")', function() { - // TODO: update the code to test the property _private - expect(instance).to.have.property('_private'); - // expect(instance._private).to.be(expectedValueLiteral); - }); - - it('should have the property autoInit (base name: "auto_init")', function() { - // TODO: update the code to test the property autoInit - expect(instance).to.have.property('autoInit'); - // expect(instance.autoInit).to.be(expectedValueLiteral); - }); - - it('should have the property projectTemplate (base name: "project_template")', function() { - // TODO: update the code to test the property projectTemplate - expect(instance).to.have.property('projectTemplate'); - // expect(instance.projectTemplate).to.be(expectedValueLiteral); - }); - - it('should have the property gitignores (base name: "gitignores")', function() { - // TODO: update the code to test the property gitignores - expect(instance).to.have.property('gitignores'); - // expect(instance.gitignores).to.be(expectedValueLiteral); - }); - - it('should have the property license (base name: "license")', function() { - // TODO: update the code to test the property license - expect(instance).to.have.property('license'); - // expect(instance.license).to.be(expectedValueLiteral); - }); - - it('should have the property readme (base name: "readme")', function() { - // TODO: update the code to test the property readme - expect(instance).to.have.property('readme'); - // expect(instance.readme).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/EditExperimentPost.spec.js b/JavaScript/test/model/EditExperimentPost.spec.js deleted file mode 100644 index 1239f3c..0000000 --- a/JavaScript/test/model/EditExperimentPost.spec.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('EditExperimentPost', function() { - beforeEach(function() { - instance = new DagsHubApi.EditExperimentPost(); - }); - - it('should create an instance of EditExperimentPost', function() { - // TODO: update the code to test EditExperimentPost - expect(instance).to.be.a(DagsHubApi.EditExperimentPost); - }); - - it('should have the property name (base name: "name")', function() { - // TODO: update the code to test the property name - expect(instance).to.have.property('name'); - // expect(instance.name).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/ExperimentKeys.spec.js b/JavaScript/test/model/ExperimentKeys.spec.js index 48062aa..11f166d 100644 --- a/JavaScript/test/model/ExperimentKeys.spec.js +++ b/JavaScript/test/model/ExperimentKeys.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Body.spec.js b/JavaScript/test/model/ExperimentMetricsResponse.spec.js similarity index 75% rename from JavaScript/test/model/Body.spec.js rename to JavaScript/test/model/ExperimentMetricsResponse.spec.js index 300231d..d3826b1 100644 --- a/JavaScript/test/model/Body.spec.js +++ b/JavaScript/test/model/ExperimentMetricsResponse.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -29,14 +29,14 @@ var instance; describe('(package)', function() { - describe('Body', function() { + describe('ExperimentMetricsResponse', function() { beforeEach(function() { - instance = new DagsHubApi.Body(); + instance = new DagsHubApi.ExperimentMetricsResponse(); }); - it('should create an instance of Body', function() { - // TODO: update the code to test Body - expect(instance).to.be.a(DagsHubApi.Body); + it('should create an instance of ExperimentMetricsResponse', function() { + // TODO: update the code to test ExperimentMetricsResponse + expect(instance).to.be.a(DagsHubApi.ExperimentMetricsResponse); }); }); diff --git a/JavaScript/test/model/WebhookConfig.spec.js b/JavaScript/test/model/ExperimentsResponse.spec.js similarity index 50% rename from JavaScript/test/model/WebhookConfig.spec.js rename to JavaScript/test/model/ExperimentsResponse.spec.js index 0a3f7a2..b3a9545 100644 --- a/JavaScript/test/model/WebhookConfig.spec.js +++ b/JavaScript/test/model/ExperimentsResponse.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -29,32 +29,32 @@ var instance; describe('(package)', function() { - describe('WebhookConfig', function() { + describe('ExperimentsResponse', function() { beforeEach(function() { - instance = new DagsHubApi.WebhookConfig(); + instance = new DagsHubApi.ExperimentsResponse(); }); - it('should create an instance of WebhookConfig', function() { - // TODO: update the code to test WebhookConfig - expect(instance).to.be.a(DagsHubApi.WebhookConfig); + it('should create an instance of ExperimentsResponse', function() { + // TODO: update the code to test ExperimentsResponse + expect(instance).to.be.a(DagsHubApi.ExperimentsResponse); }); - it('should have the property url (base name: "url")', function() { - // TODO: update the code to test the property url - expect(instance).to.have.property('url'); - // expect(instance.url).to.be(expectedValueLiteral); + it('should have the property experiments (base name: "experiments")', function() { + // TODO: update the code to test the property experiments + expect(instance).to.have.property('experiments'); + // expect(instance.experiments).to.be(expectedValueLiteral); }); - it('should have the property contentType (base name: "content_type")', function() { - // TODO: update the code to test the property contentType - expect(instance).to.have.property('contentType'); - // expect(instance.contentType).to.be(expectedValueLiteral); + it('should have the property isEditor (base name: "isEditor")', function() { + // TODO: update the code to test the property isEditor + expect(instance).to.have.property('isEditor'); + // expect(instance.isEditor).to.be(expectedValueLiteral); }); - it('should have the property secret (base name: "secret")', function() { - // TODO: update the code to test the property secret - expect(instance).to.have.property('secret'); - // expect(instance.secret).to.be(expectedValueLiteral); + it('should have the property nextPageToken (base name: "nextPageToken")', function() { + // TODO: update the code to test the property nextPageToken + expect(instance).to.have.property('nextPageToken'); + // expect(instance.nextPageToken).to.be(expectedValueLiteral); }); }); diff --git a/JavaScript/test/model/File.spec.js b/JavaScript/test/model/File.spec.js deleted file mode 100644 index e4b8384..0000000 --- a/JavaScript/test/model/File.spec.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('File', function() { - beforeEach(function() { - instance = new DagsHubApi.File(); - }); - - it('should create an instance of File', function() { - // TODO: update the code to test File - expect(instance).to.be.a(DagsHubApi.File); - }); - - it('should have the property path (base name: "path")', function() { - // TODO: update the code to test the property path - expect(instance).to.have.property('path'); - // expect(instance.path).to.be(expectedValueLiteral); - }); - - it('should have the property type (base name: "type")', function() { - // TODO: update the code to test the property type - expect(instance).to.have.property('type'); - // expect(instance.type).to.be(expectedValueLiteral); - }); - - it('should have the property size (base name: "size")', function() { - // TODO: update the code to test the property size - expect(instance).to.have.property('size'); - // expect(instance.size).to.be(expectedValueLiteral); - }); - - it('should have the property hash (base name: "hash")', function() { - // TODO: update the code to test the property hash - expect(instance).to.have.property('hash'); - // expect(instance.hash).to.be(expectedValueLiteral); - }); - - it('should have the property versioning (base name: "versioning")', function() { - // TODO: update the code to test the property versioning - expect(instance).to.have.property('versioning'); - // expect(instance.versioning).to.be(expectedValueLiteral); - }); - - it('should have the property downloadUrl (base name: "download_url")', function() { - // TODO: update the code to test the property downloadUrl - expect(instance).to.have.property('downloadUrl'); - // expect(instance.downloadUrl).to.be(expectedValueLiteral); - }); - - it('should have the property contentUrl (base name: "content_url")', function() { - // TODO: update the code to test the property contentUrl - expect(instance).to.have.property('contentUrl'); - // expect(instance.contentUrl).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/Files.spec.js b/JavaScript/test/model/Files.spec.js index d93c939..ec365eb 100644 --- a/JavaScript/test/model/Files.spec.js +++ b/JavaScript/test/model/Files.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Files1.spec.js b/JavaScript/test/model/Files1.spec.js index c40ab51..7c245b9 100644 --- a/JavaScript/test/model/Files1.spec.js +++ b/JavaScript/test/model/Files1.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -45,12 +45,6 @@ // expect(instance.entries).to.be(expectedValueLiteral); }); - it('should have the property limit (base name: "limit")', function() { - // TODO: update the code to test the property limit - expect(instance).to.have.property('limit'); - // expect(instance.limit).to.be(expectedValueLiteral); - }); - it('should have the property nextToken (base name: "next_token")', function() { // TODO: update the code to test the property nextToken expect(instance).to.have.property('nextToken'); diff --git a/JavaScript/test/model/HooksIdBody.spec.js b/JavaScript/test/model/HooksIdBody.spec.js deleted file mode 100644 index 1137459..0000000 --- a/JavaScript/test/model/HooksIdBody.spec.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('HooksIdBody', function() { - beforeEach(function() { - instance = new DagsHubApi.HooksIdBody(); - }); - - it('should create an instance of HooksIdBody', function() { - // TODO: update the code to test HooksIdBody - expect(instance).to.be.a(DagsHubApi.HooksIdBody); - }); - - it('should have the property config (base name: "config")', function() { - // TODO: update the code to test the property config - expect(instance).to.have.property('config'); - // expect(instance.config).to.be(expectedValueLiteral); - }); - - it('should have the property events (base name: "events")', function() { - // TODO: update the code to test the property events - expect(instance).to.have.property('events'); - // expect(instance.events).to.be(expectedValueLiteral); - }); - - it('should have the property active (base name: "active")', function() { - // TODO: update the code to test the property active - expect(instance).to.have.property('active'); - // expect(instance.active).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/Integration.spec.js b/JavaScript/test/model/Integration.spec.js index acdbd14..f95272e 100644 --- a/JavaScript/test/model/Integration.spec.js +++ b/JavaScript/test/model/Integration.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/IntegrationInner.spec.js b/JavaScript/test/model/IntegrationInner.spec.js deleted file mode 100644 index 472eaef..0000000 --- a/JavaScript/test/model/IntegrationInner.spec.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('IntegrationInner', function() { - beforeEach(function() { - instance = new DagsHubApi.IntegrationInner(); - }); - - it('should create an instance of IntegrationInner', function() { - // TODO: update the code to test IntegrationInner - expect(instance).to.be.a(DagsHubApi.IntegrationInner); - }); - - it('should have the property name (base name: "name")', function() { - // TODO: update the code to test the property name - expect(instance).to.have.property('name'); - // expect(instance.name).to.be(expectedValueLiteral); - }); - - it('should have the property protocol (base name: "protocol")', function() { - // TODO: update the code to test the property protocol - expect(instance).to.have.property('protocol'); - // expect(instance.protocol).to.be(expectedValueLiteral); - }); - - it('should have the property listPath (base name: "list_path")', function() { - // TODO: update the code to test the property listPath - expect(instance).to.have.property('listPath'); - // expect(instance.listPath).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/Issue.spec.js b/JavaScript/test/model/Issue.spec.js index 2fba05d..49dfd90 100644 --- a/JavaScript/test/model/Issue.spec.js +++ b/JavaScript/test/model/Issue.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -117,12 +117,6 @@ // expect(instance.pullRequest).to.be(expectedValueLiteral); }); - it('should have the property closed (base name: "closed")', function() { - // TODO: update the code to test the property closed - expect(instance).to.have.property('closed'); - // expect(instance.closed).to.be(expectedValueLiteral); - }); - }); }); diff --git a/JavaScript/test/model/IssueAssignee.spec.js b/JavaScript/test/model/IssueAssignee.spec.js deleted file mode 100644 index 2fa5009..0000000 --- a/JavaScript/test/model/IssueAssignee.spec.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('IssueAssignee', function() { - beforeEach(function() { - instance = new DagsHubApi.IssueAssignee(); - }); - - it('should create an instance of IssueAssignee', function() { - // TODO: update the code to test IssueAssignee - expect(instance).to.be.a(DagsHubApi.IssueAssignee); - }); - - it('should have the property id (base name: "id")', function() { - // TODO: update the code to test the property id - expect(instance).to.have.property('id'); - // expect(instance.id).to.be(expectedValueLiteral); - }); - - it('should have the property login (base name: "login")', function() { - // TODO: update the code to test the property login - expect(instance).to.have.property('login'); - // expect(instance.login).to.be(expectedValueLiteral); - }); - - it('should have the property fullName (base name: "full_name")', function() { - // TODO: update the code to test the property fullName - expect(instance).to.have.property('fullName'); - // expect(instance.fullName).to.be(expectedValueLiteral); - }); - - it('should have the property avatarUrl (base name: "avatar_url")', function() { - // TODO: update the code to test the property avatarUrl - expect(instance).to.have.property('avatarUrl'); - // expect(instance.avatarUrl).to.be(expectedValueLiteral); - }); - - it('should have the property username (base name: "username")', function() { - // TODO: update the code to test the property username - expect(instance).to.have.property('username'); - // expect(instance.username).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/IssueLabels.spec.js b/JavaScript/test/model/IssueLabels.spec.js deleted file mode 100644 index a671685..0000000 --- a/JavaScript/test/model/IssueLabels.spec.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('IssueLabels', function() { - beforeEach(function() { - instance = new DagsHubApi.IssueLabels(); - }); - - it('should create an instance of IssueLabels', function() { - // TODO: update the code to test IssueLabels - expect(instance).to.be.a(DagsHubApi.IssueLabels); - }); - - it('should have the property id (base name: "id")', function() { - // TODO: update the code to test the property id - expect(instance).to.have.property('id'); - // expect(instance.id).to.be(expectedValueLiteral); - }); - - it('should have the property name (base name: "name")', function() { - // TODO: update the code to test the property name - expect(instance).to.have.property('name'); - // expect(instance.name).to.be(expectedValueLiteral); - }); - - it('should have the property color (base name: "color")', function() { - // TODO: update the code to test the property color - expect(instance).to.have.property('color'); - // expect(instance.color).to.be(expectedValueLiteral); - }); - - it('should have the property url (base name: "url")', function() { - // TODO: update the code to test the property url - expect(instance).to.have.property('url'); - // expect(instance.url).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/IssueMilestone.spec.js b/JavaScript/test/model/IssueMilestone.spec.js deleted file mode 100644 index 1b2d85a..0000000 --- a/JavaScript/test/model/IssueMilestone.spec.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('IssueMilestone', function() { - beforeEach(function() { - instance = new DagsHubApi.IssueMilestone(); - }); - - it('should create an instance of IssueMilestone', function() { - // TODO: update the code to test IssueMilestone - expect(instance).to.be.a(DagsHubApi.IssueMilestone); - }); - - it('should have the property id (base name: "id")', function() { - // TODO: update the code to test the property id - expect(instance).to.have.property('id'); - // expect(instance.id).to.be(expectedValueLiteral); - }); - - it('should have the property title (base name: "title")', function() { - // TODO: update the code to test the property title - expect(instance).to.have.property('title'); - // expect(instance.title).to.be(expectedValueLiteral); - }); - - it('should have the property description (base name: "description")', function() { - // TODO: update the code to test the property description - expect(instance).to.have.property('description'); - // expect(instance.description).to.be(expectedValueLiteral); - }); - - it('should have the property state (base name: "state")', function() { - // TODO: update the code to test the property state - expect(instance).to.have.property('state'); - // expect(instance.state).to.be(expectedValueLiteral); - }); - - it('should have the property openIssues (base name: "open_issues")', function() { - // TODO: update the code to test the property openIssues - expect(instance).to.have.property('openIssues'); - // expect(instance.openIssues).to.be(expectedValueLiteral); - }); - - it('should have the property closedIssues (base name: "closed_issues")', function() { - // TODO: update the code to test the property closedIssues - expect(instance).to.have.property('closedIssues'); - // expect(instance.closedIssues).to.be(expectedValueLiteral); - }); - - it('should have the property closedAt (base name: "closed_at")', function() { - // TODO: update the code to test the property closedAt - expect(instance).to.have.property('closedAt'); - // expect(instance.closedAt).to.be(expectedValueLiteral); - }); - - it('should have the property dueOn (base name: "due_on")', function() { - // TODO: update the code to test the property dueOn - expect(instance).to.have.property('dueOn'); - // expect(instance.dueOn).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/Issues.spec.js b/JavaScript/test/model/Issues.spec.js index 1c47d3b..865ab4a 100644 --- a/JavaScript/test/model/Issues.spec.js +++ b/JavaScript/test/model/Issues.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Labels.spec.js b/JavaScript/test/model/Labels.spec.js deleted file mode 100644 index 71e213b..0000000 --- a/JavaScript/test/model/Labels.spec.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('Labels', function() { - beforeEach(function() { - instance = new DagsHubApi.Labels(); - }); - - it('should create an instance of Labels', function() { - // TODO: update the code to test Labels - expect(instance).to.be.a(DagsHubApi.Labels); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/MigrateRepo.spec.js b/JavaScript/test/model/MigrateRepo.spec.js deleted file mode 100644 index b00e3c3..0000000 --- a/JavaScript/test/model/MigrateRepo.spec.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('MigrateRepo', function() { - beforeEach(function() { - instance = new DagsHubApi.MigrateRepo(); - }); - - it('should create an instance of MigrateRepo', function() { - // TODO: update the code to test MigrateRepo - expect(instance).to.be.a(DagsHubApi.MigrateRepo); - }); - - it('should have the property cloneAddr (base name: "clone_addr")', function() { - // TODO: update the code to test the property cloneAddr - expect(instance).to.have.property('cloneAddr'); - // expect(instance.cloneAddr).to.be(expectedValueLiteral); - }); - - it('should have the property authUsername (base name: "auth_username")', function() { - // TODO: update the code to test the property authUsername - expect(instance).to.have.property('authUsername'); - // expect(instance.authUsername).to.be(expectedValueLiteral); - }); - - it('should have the property authPassword (base name: "auth_password")', function() { - // TODO: update the code to test the property authPassword - expect(instance).to.have.property('authPassword'); - // expect(instance.authPassword).to.be(expectedValueLiteral); - }); - - it('should have the property userId (base name: "user_id")', function() { - // TODO: update the code to test the property userId - expect(instance).to.have.property('userId'); - // expect(instance.userId).to.be(expectedValueLiteral); - }); - - it('should have the property repoName (base name: "repo_name")', function() { - // TODO: update the code to test the property repoName - expect(instance).to.have.property('repoName'); - // expect(instance.repoName).to.be(expectedValueLiteral); - }); - - it('should have the property mirror (base name: "mirror")', function() { - // TODO: update the code to test the property mirror - expect(instance).to.have.property('mirror'); - // expect(instance.mirror).to.be(expectedValueLiteral); - }); - - it('should have the property visibility (base name: "visibility")', function() { - // TODO: update the code to test the property visibility - expect(instance).to.have.property('visibility'); - // expect(instance.visibility).to.be(expectedValueLiteral); - }); - - it('should have the property description (base name: "description")', function() { - // TODO: update the code to test the property description - expect(instance).to.have.property('description'); - // expect(instance.description).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/Milestone.spec.js b/JavaScript/test/model/Milestone.spec.js deleted file mode 100644 index a1643b7..0000000 --- a/JavaScript/test/model/Milestone.spec.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('Milestone', function() { - beforeEach(function() { - instance = new DagsHubApi.Milestone(); - }); - - it('should create an instance of Milestone', function() { - // TODO: update the code to test Milestone - expect(instance).to.be.a(DagsHubApi.Milestone); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/PatchIssue.spec.js b/JavaScript/test/model/PatchIssue.spec.js index 1a172ce..5a93765 100644 --- a/JavaScript/test/model/PatchIssue.spec.js +++ b/JavaScript/test/model/PatchIssue.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/PostIssue.spec.js b/JavaScript/test/model/PostIssue.spec.js index e2543cb..590f1b2 100644 --- a/JavaScript/test/model/PostIssue.spec.js +++ b/JavaScript/test/model/PostIssue.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/PutFile.spec.js b/JavaScript/test/model/PutFile.spec.js index e42a54f..60d9d1d 100644 --- a/JavaScript/test/model/PutFile.spec.js +++ b/JavaScript/test/model/PutFile.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/RepoHooksBody.spec.js b/JavaScript/test/model/RepoHooksBody.spec.js deleted file mode 100644 index bcd26ac..0000000 --- a/JavaScript/test/model/RepoHooksBody.spec.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('RepoHooksBody', function() { - beforeEach(function() { - instance = new DagsHubApi.RepoHooksBody(); - }); - - it('should create an instance of RepoHooksBody', function() { - // TODO: update the code to test RepoHooksBody - expect(instance).to.be.a(DagsHubApi.RepoHooksBody); - }); - - it('should have the property type (base name: "type")', function() { - // TODO: update the code to test the property type - expect(instance).to.have.property('type'); - // expect(instance.type).to.be(expectedValueLiteral); - }); - - it('should have the property config (base name: "config")', function() { - // TODO: update the code to test the property config - expect(instance).to.have.property('config'); - // expect(instance.config).to.be(expectedValueLiteral); - }); - - it('should have the property events (base name: "events")', function() { - // TODO: update the code to test the property events - expect(instance).to.have.property('events'); - // expect(instance.events).to.be(expectedValueLiteral); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/State.spec.js b/JavaScript/test/model/State.spec.js deleted file mode 100644 index 1fc33b1..0000000 --- a/JavaScript/test/model/State.spec.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('State', function() { - beforeEach(function() { - instance = DagsHubApi.State; - }); - - it('should create an instance of State', function() { - // TODO: update the code to test State - expect(instance).to.be.a('object'); - }); - - it('should have the property open', function() { - expect(instance).to.have.property('open'); - expect(instance.open).to.be("open"); - }); - - it('should have the property closed', function() { - expect(instance).to.have.property('closed'); - expect(instance.closed).to.be("closed"); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/Title.spec.js b/JavaScript/test/model/Title.spec.js deleted file mode 100644 index 6083cbe..0000000 --- a/JavaScript/test/model/Title.spec.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('Title', function() { - beforeEach(function() { - instance = new DagsHubApi.Title(); - }); - - it('should create an instance of Title', function() { - // TODO: update the code to test Title - expect(instance).to.be.a(DagsHubApi.Title); - }); - - }); - }); - -})); diff --git a/JavaScript/test/model/User.spec.js b/JavaScript/test/model/User.spec.js index 3491c74..c8f26e6 100644 --- a/JavaScript/test/model/User.spec.js +++ b/JavaScript/test/model/User.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -51,6 +51,12 @@ // expect(instance.login).to.be(expectedValueLiteral); }); + it('should have the property username (base name: "username")', function() { + // TODO: update the code to test the property username + expect(instance).to.have.property('username'); + // expect(instance.username).to.be(expectedValueLiteral); + }); + it('should have the property fullName (base name: "full_name")', function() { // TODO: update the code to test the property fullName expect(instance).to.have.property('fullName'); @@ -63,10 +69,28 @@ // expect(instance.avatarUrl).to.be(expectedValueLiteral); }); - it('should have the property username (base name: "username")', function() { - // TODO: update the code to test the property username - expect(instance).to.have.property('username'); - // expect(instance.username).to.be(expectedValueLiteral); + it('should have the property publicEmail (base name: "public_email")', function() { + // TODO: update the code to test the property publicEmail + expect(instance).to.have.property('publicEmail'); + // expect(instance.publicEmail).to.be(expectedValueLiteral); + }); + + it('should have the property website (base name: "website")', function() { + // TODO: update the code to test the property website + expect(instance).to.have.property('website'); + // expect(instance.website).to.be(expectedValueLiteral); + }); + + it('should have the property company (base name: "company")', function() { + // TODO: update the code to test the property company + expect(instance).to.have.property('company'); + // expect(instance.company).to.be(expectedValueLiteral); + }); + + it('should have the property description (base name: "description")', function() { + // TODO: update the code to test the property description + expect(instance).to.have.property('description'); + // expect(instance.description).to.be(expectedValueLiteral); }); }); diff --git a/JavaScript/test/model/WebhookEvents.spec.js b/JavaScript/test/model/WebhookEvents.spec.js deleted file mode 100644 index ceb937f..0000000 --- a/JavaScript/test/model/WebhookEvents.spec.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 3.0.35 - * - * Do not edit the class manually. - * - */ -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.DagsHubApi); - } -}(this, function(expect, DagsHubApi) { - 'use strict'; - - var instance; - - describe('(package)', function() { - describe('WebhookEvents', function() { - beforeEach(function() { - instance = new DagsHubApi.WebhookEvents(); - }); - - it('should create an instance of WebhookEvents', function() { - // TODO: update the code to test WebhookEvents - expect(instance).to.be.a(DagsHubApi.WebhookEvents); - }); - - }); - }); - -})); diff --git a/Kotlin/.swagger-codegen-ignore b/Kotlin/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/Kotlin/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/Kotlin/.swagger-codegen/VERSION b/Kotlin/.swagger-codegen/VERSION deleted file mode 100644 index 053a355..0000000 --- a/Kotlin/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.35 \ No newline at end of file diff --git a/Kotlin/README.md b/Kotlin/README.md deleted file mode 100644 index 9a5d4cd..0000000 --- a/Kotlin/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# dagshub_api - Kotlin client library for DagsHub API - -## Requires - -* Kotlin 1.4.30 -* Gradle 5.3 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in Swagger definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *https://dagshub.com/api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*BranchesApi* | [**getBranch**](docs/BranchesApi.md#getbranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -*BranchesApi* | [**listBranches**](docs/BranchesApi.md#listbranches) | **GET** /repos/{owner}/{repo}/branches | List Branches -*CollaboratorsApi* | [**addCollaborator**](docs/CollaboratorsApi.md#addcollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -*CollaboratorsApi* | [**getCollaborators**](docs/CollaboratorsApi.md#getcollaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -*CollaboratorsApi* | [**removeCollaborator**](docs/CollaboratorsApi.md#removecollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator -*CommitsApi* | [**getCommit**](docs/CommitsApi.md#getcommit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit -*ContentApi* | [**getArchive**](docs/ContentApi.md#getarchive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -*ContentApi* | [**getContent**](docs/ContentApi.md#getcontent) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -*ContentApi* | [**getRaw**](docs/ContentApi.md#getraw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -*ContentApi* | [**uploadContent**](docs/ContentApi.md#uploadcontent) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository -*ExperimentsApi* | [**addExperimentLabel**](docs/ExperimentsApi.md#addexperimentlabel) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -*ExperimentsApi* | [**deleteExperiment**](docs/ExperimentsApi.md#deleteexperiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -*ExperimentsApi* | [**deleteExperimentLabel**](docs/ExperimentsApi.md#deleteexperimentlabel) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -*ExperimentsApi* | [**editExperiment**](docs/ExperimentsApi.md#editexperiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -*ExperimentsApi* | [**getExperimentMetrics**](docs/ExperimentsApi.md#getexperimentmetrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -*ExperimentsApi* | [**getExperiments**](docs/ExperimentsApi.md#getexperiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments -*IssuesApi* | [**createIssue**](docs/IssuesApi.md#createissue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -*IssuesApi* | [**editIssue**](docs/IssuesApi.md#editissue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -*IssuesApi* | [**getIssue**](docs/IssuesApi.md#getissue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -*IssuesApi* | [**listRepoIssues**](docs/IssuesApi.md#listrepoissues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository -*ReleasesApi* | [**listReleases**](docs/ReleasesApi.md#listreleases) | **GET** /repos/{owner}/{repo}/releases | List Releases -*RepositoryApi* | [**createOrgRepo**](docs/RepositoryApi.md#createorgrepo) | **POST** /org/{orgname}/repos | Create in organization -*RepositoryApi* | [**createRepo**](docs/RepositoryApi.md#createrepo) | **POST** /user/repos | Create -*RepositoryApi* | [**getRepo**](docs/RepositoryApi.md#getrepo) | **GET** /repos/{owner}/{repo} | Get repository information -*RepositoryApi* | [**listMyRepos**](docs/RepositoryApi.md#listmyrepos) | **GET** /user/repos | List your repositories -*RepositoryApi* | [**listOrgRepos**](docs/RepositoryApi.md#listorgrepos) | **GET** /orgs/{orgname}/repos | List organization repositories -*RepositoryApi* | [**listUserRepos**](docs/RepositoryApi.md#listuserrepos) | **GET** /users/{username}/repos | List user repositories -*RepositoryApi* | [**migrateRepo**](docs/RepositoryApi.md#migraterepo) | **POST** /repos/migrate | Migrate repository -*RepositoryApi* | [**search**](docs/RepositoryApi.md#search) | **GET** /repos/search | Search repositories -*StorageIntegrationsApi* | [**getBucketContent**](docs/StorageIntegrationsApi.md#getbucketcontent) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -*StorageIntegrationsApi* | [**getBucketFile**](docs/StorageIntegrationsApi.md#getbucketfile) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -*StorageIntegrationsApi* | [**getBuckets**](docs/StorageIntegrationsApi.md#getbuckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository -*UserApi* | [**getAuthenticatedUser**](docs/UserApi.md#getauthenticateduser) | **GET** /user | Get authenticated user information -*UserApi* | [**getUser**](docs/UserApi.md#getuser) | **GET** /users/{username} | Get information about a user -*WebhooksApi* | [**createHook**](docs/WebhooksApi.md#createhook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -*WebhooksApi* | [**deleteHook**](docs/WebhooksApi.md#deletehook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -*WebhooksApi* | [**editHook**](docs/WebhooksApi.md#edithook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -*WebhooksApi* | [**listHooks**](docs/WebhooksApi.md#listhooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - - -## Documentation for Models - - - [io.swagger.client.models.Assignee](docs/Assignee.md) - - [io.swagger.client.models.Body](docs/Body.md) - - [io.swagger.client.models.Closed](docs/Closed.md) - - [io.swagger.client.models.CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) - - [io.swagger.client.models.CreateRepo](docs/CreateRepo.md) - - [io.swagger.client.models.EditExperimentPost](docs/EditExperimentPost.md) - - [io.swagger.client.models.ExperimentKeys](docs/ExperimentKeys.md) - - [io.swagger.client.models.Files](docs/Files.md) - - [io.swagger.client.models.Files1](docs/Files1.md) - - [io.swagger.client.models.HooksIdBody](docs/HooksIdBody.md) - - [io.swagger.client.models.Integration](docs/Integration.md) - - [io.swagger.client.models.IntegrationInner](docs/IntegrationInner.md) - - [io.swagger.client.models.Issue](docs/Issue.md) - - [io.swagger.client.models.IssueAssignee](docs/IssueAssignee.md) - - [io.swagger.client.models.IssueLabels](docs/IssueLabels.md) - - [io.swagger.client.models.IssueMilestone](docs/IssueMilestone.md) - - [io.swagger.client.models.Issues](docs/Issues.md) - - [io.swagger.client.models.Labels](docs/Labels.md) - - [io.swagger.client.models.MigrateRepo](docs/MigrateRepo.md) - - [io.swagger.client.models.Milestone](docs/Milestone.md) - - [io.swagger.client.models.PatchIssue](docs/PatchIssue.md) - - [io.swagger.client.models.PostIssue](docs/PostIssue.md) - - [io.swagger.client.models.PutFile](docs/PutFile.md) - - [io.swagger.client.models.RepoHooksBody](docs/RepoHooksBody.md) - - [io.swagger.client.models.State](docs/State.md) - - [io.swagger.client.models.Title](docs/Title.md) - - [io.swagger.client.models.User](docs/User.md) - - [io.swagger.client.models.WebhookConfig](docs/WebhookConfig.md) - - [io.swagger.client.models.WebhookEvents](docs/WebhookEvents.md) - - -## Documentation for Authorization - - -### basicAuth - -- **Type**: HTTP basic authentication - - -### tokenAuth - - diff --git a/Kotlin/build.gradle b/Kotlin/build.gradle deleted file mode 100644 index c7dd3c3..0000000 --- a/Kotlin/build.gradle +++ /dev/null @@ -1,33 +0,0 @@ -group 'io.swagger' -version '1.0.0' - -wrapper { - gradleVersion = '5.3' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.4.30' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.11.0" - compile "com.squareup.moshi:moshi-adapters:1.11.0" - compile "com.squareup.okhttp3:okhttp:4.9.0" - testCompile "io.kotlintest:kotlintest:2.0.7" -} \ No newline at end of file diff --git a/Kotlin/docs/Assignee.md b/Kotlin/docs/Assignee.md deleted file mode 100644 index 564f663..0000000 --- a/Kotlin/docs/Assignee.md +++ /dev/null @@ -1,5 +0,0 @@ -# Assignee - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/Kotlin/docs/Body.md b/Kotlin/docs/Body.md deleted file mode 100644 index 3b6b040..0000000 --- a/Kotlin/docs/Body.md +++ /dev/null @@ -1,5 +0,0 @@ -# Body - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/Kotlin/docs/BranchesApi.md b/Kotlin/docs/BranchesApi.md deleted file mode 100644 index 6a8ac2b..0000000 --- a/Kotlin/docs/BranchesApi.md +++ /dev/null @@ -1,103 +0,0 @@ -# BranchesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getBranch**](BranchesApi.md#getBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -[**listBranches**](BranchesApi.md#listBranches) | **GET** /repos/{owner}/{repo}/branches | List Branches - - -# **getBranch** -> getBranch(owner, repo, branch) - -Get Branch - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = BranchesApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val branch : kotlin.String = branch_example // kotlin.String | branch of the repository -try { - apiInstance.getBranch(owner, repo, branch) -} catch (e: ClientException) { - println("4xx response calling BranchesApi#getBranch") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling BranchesApi#getBranch") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **branch** | **kotlin.String**| branch of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **listBranches** -> listBranches(owner, repo) - -List Branches - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = BranchesApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -try { - apiInstance.listBranches(owner, repo) -} catch (e: ClientException) { - println("4xx response calling BranchesApi#listBranches") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling BranchesApi#listBranches") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Kotlin/docs/Closed.md b/Kotlin/docs/Closed.md deleted file mode 100644 index 7bc451a..0000000 --- a/Kotlin/docs/Closed.md +++ /dev/null @@ -1,5 +0,0 @@ -# Closed - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/Kotlin/docs/CollaboratorsApi.md b/Kotlin/docs/CollaboratorsApi.md deleted file mode 100644 index 828381e..0000000 --- a/Kotlin/docs/CollaboratorsApi.md +++ /dev/null @@ -1,154 +0,0 @@ -# CollaboratorsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addCollaborator**](CollaboratorsApi.md#addCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -[**getCollaborators**](CollaboratorsApi.md#getCollaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -[**removeCollaborator**](CollaboratorsApi.md#removeCollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator - - -# **addCollaborator** -> addCollaborator(owner, repo, collaborator, body) - -Add user as a collaborator - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = CollaboratorsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val collaborator : kotlin.String = collaborator_example // kotlin.String | collaborator username -val body : CollaboratorsCollaboratorBody = // CollaboratorsCollaboratorBody | -try { - apiInstance.addCollaborator(owner, repo, collaborator, body) -} catch (e: ClientException) { - println("4xx response calling CollaboratorsApi#addCollaborator") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling CollaboratorsApi#addCollaborator") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **collaborator** | **kotlin.String**| collaborator username | - **body** | [**CollaboratorsCollaboratorBody**](CollaboratorsCollaboratorBody.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **getCollaborators** -> getCollaborators(owner, repo) - -Get collaborators - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = CollaboratorsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -try { - apiInstance.getCollaborators(owner, repo) -} catch (e: ClientException) { - println("4xx response calling CollaboratorsApi#getCollaborators") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling CollaboratorsApi#getCollaborators") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **removeCollaborator** -> removeCollaborator(owner, repo, collaborator) - -Delete collaborator - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = CollaboratorsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val collaborator : kotlin.String = collaborator_example // kotlin.String | collaborator username -try { - apiInstance.removeCollaborator(owner, repo, collaborator) -} catch (e: ClientException) { - println("4xx response calling CollaboratorsApi#removeCollaborator") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling CollaboratorsApi#removeCollaborator") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **collaborator** | **kotlin.String**| collaborator username | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - diff --git a/Kotlin/docs/Collaborators_collaborator_body.md b/Kotlin/docs/Collaborators_collaborator_body.md deleted file mode 100644 index b0ef414..0000000 --- a/Kotlin/docs/Collaborators_collaborator_body.md +++ /dev/null @@ -1,6 +0,0 @@ -# CollaboratorsCollaboratorBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**permission** | [**kotlin.String**](.md) | The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. | [optional] diff --git a/Kotlin/docs/CommitsApi.md b/Kotlin/docs/CommitsApi.md deleted file mode 100644 index d1d0878..0000000 --- a/Kotlin/docs/CommitsApi.md +++ /dev/null @@ -1,56 +0,0 @@ -# CommitsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getCommit**](CommitsApi.md#getCommit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit - - -# **getCommit** -> getCommit(owner, repo, sha) - -Get a single commit - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = CommitsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val sha : kotlin.String = sha_example // kotlin.String | a SHA1 of a commit -try { - apiInstance.getCommit(owner, repo, sha) -} catch (e: ClientException) { - println("4xx response calling CommitsApi#getCommit") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling CommitsApi#getCommit") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **sha** | **kotlin.String**| a SHA1 of a commit | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Kotlin/docs/ContentApi.md b/Kotlin/docs/ContentApi.md deleted file mode 100644 index dadc340..0000000 --- a/Kotlin/docs/ContentApi.md +++ /dev/null @@ -1,234 +0,0 @@ -# ContentApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getArchive**](ContentApi.md#getArchive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -[**getContent**](ContentApi.md#getContent) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -[**getRaw**](ContentApi.md#getRaw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -[**uploadContent**](ContentApi.md#uploadContent) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository - - -# **getArchive** -> getArchive(owner, repo, ref, format) - -Download archive - -This method returns archive by given format. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ContentApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val ref : kotlin.String = ref_example // kotlin.String | The name of the commit/branch/tag -val format : kotlin.String = format_example // kotlin.String | The format of archive, either .zip or .tar.gz -try { - apiInstance.getArchive(owner, repo, ref, format) -} catch (e: ClientException) { - println("4xx response calling ContentApi#getArchive") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ContentApi#getArchive") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **ref** | **kotlin.String**| The name of the commit/branch/tag | - **format** | **kotlin.String**| The format of archive, either .zip or .tar.gz | [enum: .zip, .tar.gz] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **getContent** -> Files getContent(owner, repo, branch, path, includeSize) - -List data in a repository folder - -List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ContentApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val branch : kotlin.String = branch_example // kotlin.String | branch of the repository -val path : kotlin.String = path_example // kotlin.String | path of a folder in the repository -val includeSize : kotlin.Boolean = true // kotlin.Boolean | -try { - val result : Files = apiInstance.getContent(owner, repo, branch, path, includeSize) - println(result) -} catch (e: ClientException) { - println("4xx response calling ContentApi#getContent") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ContentApi#getContent") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **branch** | **kotlin.String**| branch of the repository | - **path** | **kotlin.String**| path of a folder in the repository | - **includeSize** | **kotlin.Boolean**| | [optional] [default to false] - -### Return type - -[**Files**](Files.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **getRaw** -> getRaw(owner, repo, ref, path) - -Download raw content - -This method returns the raw content of a file. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ContentApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val ref : kotlin.String = ref_example // kotlin.String | The name of the commit/branch/tag -val path : kotlin.String = path_example // kotlin.String | The content path -try { - apiInstance.getRaw(owner, repo, ref, path) -} catch (e: ClientException) { - println("4xx response calling ContentApi#getRaw") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ContentApi#getRaw") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **ref** | **kotlin.String**| The name of the commit/branch/tag | - **path** | **kotlin.String**| The content path | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **uploadContent** -> uploadContent(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files) - -Upload data to a repository - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ContentApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val branch : kotlin.String = branch_example // kotlin.String | branch of the repository -val path : kotlin.String = path_example // kotlin.String | path of a folder in the repository -val commitSummary : kotlin.String = commitSummary_example // kotlin.String | -val commitMessage : kotlin.String = commitMessage_example // kotlin.String | -val commitChoice : kotlin.String = commitChoice_example // kotlin.String | -val lastCommit : kotlin.String = lastCommit_example // kotlin.String | -val newBranchName : kotlin.String = newBranchName_example // kotlin.String | -val versioning : kotlin.String = versioning_example // kotlin.String | -val files : kotlin.String = files_example // kotlin.String | -try { - apiInstance.uploadContent(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files) -} catch (e: ClientException) { - println("4xx response calling ContentApi#uploadContent") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ContentApi#uploadContent") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **branch** | **kotlin.String**| branch of the repository | - **path** | **kotlin.String**| path of a folder in the repository | - **commitSummary** | **kotlin.String**| | [optional] - **commitMessage** | **kotlin.String**| | [optional] - **commitChoice** | **kotlin.String**| | [optional] [enum: direct, commit-to-new-branch] - **lastCommit** | **kotlin.String**| | [optional] - **newBranchName** | **kotlin.String**| | [optional] - **versioning** | **kotlin.String**| | [optional] [enum: auto, dvc, git, bucket] - **files** | **kotlin.String**| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: Not defined - diff --git a/Kotlin/docs/CreateRepo.md b/Kotlin/docs/CreateRepo.md deleted file mode 100644 index cce3f30..0000000 --- a/Kotlin/docs/CreateRepo.md +++ /dev/null @@ -1,25 +0,0 @@ -# CreateRepo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | [**kotlin.String**](.md) | name of the repository | -**description** | [**kotlin.String**](.md) | A short description of the repository | [optional] -**`private`** | [**kotlin.Boolean**](.md) | Either true to create a private repository, or false to create a public one. | [optional] -**autoInit** | [**kotlin.Boolean**](.md) | Pass true to create an initial commit with README, .gitignore and LICENSE. | [optional] -**projectTemplate** | [**inline**](#ProjectTemplateEnum) | Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. | [optional] -**gitignores** | [**kotlin.String**](.md) | Desired language .gitignore templates to apply. Use the name of the templates. | [optional] -**license** | [**inline**](#LicenseEnum) | Desired LICENSE template to apply. Use the name of the template. | [optional] -**readme** | [**kotlin.String**](.md) | Desired README template to apply. Use the name of the template. | [optional] - - -## Enum: project_template -Name | Value ----- | ----- -projectTemplate | cookiecutter-dagshub-dvc, custom, none, notebook-template - - -## Enum: license -Name | Value ----- | ----- -license | Apache License 2.0, MIT License, Abstyles License, Academic Free License v1.1, Academic Free License v1.2, Academic Free License v2.0, Academic Free License v2.1, Academic Free License v3.0, Affero General Public License v1.0, Apache License 1.0, Apache License 1.1, Artistic License 1.0, Artistic License 2.0, BSD 2-clause License, BSD 3-clause License, BSD 4-clause License, Creative Commons CC0 1.0 Universal, Eclipse Public License 1.0, Educational Community License v1.0, Educational Community License v2.0, GNU Affero General Public License v3.0, GNU Free Documentation License v1.1, GNU Free Documentation License v1.2, GNU Free Documentation License v1.3, GNU General Public License v1.0, GNU General Public License v2.0, GNU General Public License v3.0, GNU Lesser General Public License v2.1, GNU Lesser General Public License v3.0, GNU Library General Public License v2.0, ISC license, Mozilla Public License 1.0, Mozilla Public License 1.1, Mozilla Public License 2.03 diff --git a/Kotlin/docs/EditExperimentPost.md b/Kotlin/docs/EditExperimentPost.md deleted file mode 100644 index c033c1a..0000000 --- a/Kotlin/docs/EditExperimentPost.md +++ /dev/null @@ -1,6 +0,0 @@ -# EditExperimentPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | [**kotlin.String**](.md) | | diff --git a/JavaScript/docs/Assignee.md b/Kotlin/docs/ExperimentMetricsResponse.md similarity index 79% rename from JavaScript/docs/Assignee.md rename to Kotlin/docs/ExperimentMetricsResponse.md index d9c7530..8c90cd3 100644 --- a/JavaScript/docs/Assignee.md +++ b/Kotlin/docs/ExperimentMetricsResponse.md @@ -1,4 +1,4 @@ -# DagsHubApi.Assignee +# ExperimentMetricsResponse ## Properties Name | Type | Description | Notes diff --git a/Kotlin/docs/ExperimentsApi.md b/Kotlin/docs/ExperimentsApi.md deleted file mode 100644 index f3bfa35..0000000 --- a/Kotlin/docs/ExperimentsApi.md +++ /dev/null @@ -1,311 +0,0 @@ -# ExperimentsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addExperimentLabel**](ExperimentsApi.md#addExperimentLabel) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -[**deleteExperiment**](ExperimentsApi.md#deleteExperiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -[**deleteExperimentLabel**](ExperimentsApi.md#deleteExperimentLabel) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -[**editExperiment**](ExperimentsApi.md#editExperiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -[**getExperimentMetrics**](ExperimentsApi.md#getExperimentMetrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -[**getExperiments**](ExperimentsApi.md#getExperiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments - - -# **addExperimentLabel** -> addExperimentLabel(owner, repo, experimentKey, experimentLabel) - -Add label to experiment - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ExperimentsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val experimentKey : kotlin.String = experimentKey_example // kotlin.String | a valid experiment key -val experimentLabel : kotlin.String = experimentLabel_example // kotlin.String | A label for the experiment, max 128 characters. -try { - apiInstance.addExperimentLabel(owner, repo, experimentKey, experimentLabel) -} catch (e: ClientException) { - println("4xx response calling ExperimentsApi#addExperimentLabel") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ExperimentsApi#addExperimentLabel") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **experimentKey** | **kotlin.String**| a valid experiment key | - **experimentLabel** | **kotlin.String**| A label for the experiment, max 128 characters. | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **deleteExperiment** -> deleteExperiment(owner, repo, experimentKey) - -Delete experiment - -Support both git and MLflow experiments - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ExperimentsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val experimentKey : kotlin.String = experimentKey_example // kotlin.String | a valid experiment key -try { - apiInstance.deleteExperiment(owner, repo, experimentKey) -} catch (e: ClientException) { - println("4xx response calling ExperimentsApi#deleteExperiment") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ExperimentsApi#deleteExperiment") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **experimentKey** | **kotlin.String**| a valid experiment key | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **deleteExperimentLabel** -> deleteExperimentLabel(owner, repo, experimentKey, experimentLabel) - -Delete experiment label - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ExperimentsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val experimentKey : kotlin.String = experimentKey_example // kotlin.String | a valid experiment key -val experimentLabel : kotlin.String = experimentLabel_example // kotlin.String | A label for the experiment, max 128 characters. -try { - apiInstance.deleteExperimentLabel(owner, repo, experimentKey, experimentLabel) -} catch (e: ClientException) { - println("4xx response calling ExperimentsApi#deleteExperimentLabel") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ExperimentsApi#deleteExperimentLabel") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **experimentKey** | **kotlin.String**| a valid experiment key | - **experimentLabel** | **kotlin.String**| A label for the experiment, max 128 characters. | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **editExperiment** -> editExperiment(owner, repo, experimentKey, body) - -Edit experiment info - -Edit experiment info, currently supports just changing experiment name. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ExperimentsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val experimentKey : kotlin.String = experimentKey_example // kotlin.String | a valid experiment key -val body : EditExperimentPost = // EditExperimentPost | -try { - apiInstance.editExperiment(owner, repo, experimentKey, body) -} catch (e: ClientException) { - println("4xx response calling ExperimentsApi#editExperiment") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ExperimentsApi#editExperiment") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **experimentKey** | **kotlin.String**| a valid experiment key | - **body** | [**EditExperimentPost**](EditExperimentPost.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **getExperimentMetrics** -> getExperimentMetrics(owner, repo, body) - -Get experiment metrics for experiment - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ExperimentsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val body : ExperimentKeys = // ExperimentKeys | -try { - apiInstance.getExperimentMetrics(owner, repo, body) -} catch (e: ClientException) { - println("4xx response calling ExperimentsApi#getExperimentMetrics") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ExperimentsApi#getExperimentMetrics") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **body** | [**ExperimentKeys**](ExperimentKeys.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **getExperiments** -> getExperiments(owner, repo) - -List Experiments - -Get a list of experiments in the given repository - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ExperimentsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -try { - apiInstance.getExperiments(owner, repo) -} catch (e: ClientException) { - println("4xx response calling ExperimentsApi#getExperiments") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ExperimentsApi#getExperiments") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Kotlin/docs/ExperimentsResponse.md b/Kotlin/docs/ExperimentsResponse.md new file mode 100644 index 0000000..03e92fa --- /dev/null +++ b/Kotlin/docs/ExperimentsResponse.md @@ -0,0 +1,8 @@ +# ExperimentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**experiments** | [**kotlin.collections.Map<kotlin.String, SlashcomponentsSlashschemasSlashExperimentyaml>**](SlashcomponentsSlashschemasSlashExperimentyaml.md) | Map of experiment ID to experiment details | [optional] +**isEditor** | [**kotlin.Boolean**](.md) | Whether the authenticated user can edit experiments in this repo | [optional] +**nextPageToken** | [**kotlin.String**](.md) | Pagination token for the next page of results (empty string when no more pages) | [optional] diff --git a/Kotlin/docs/Files_1.md b/Kotlin/docs/Files_1.md index d2c0740..bdf0b8a 100644 --- a/Kotlin/docs/Files_1.md +++ b/Kotlin/docs/Files_1.md @@ -3,6 +3,5 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**entries** | [**kotlin.Array<java.io.File>**](java.io.File.md) | | [optional] -**limit** | [**kotlin.Int**](.md) | | [optional] -**nextToken** | [**kotlin.String**](.md) | | [optional] +**entries** | [**kotlin.Array<SlashcomponentsSlashschemasSlashFileyaml>**](SlashcomponentsSlashschemasSlashFileyaml.md) | | [optional] +**nextToken** | [**kotlin.String**](.md) | Next token to continue pagination from | [optional] diff --git a/Kotlin/docs/Hooks_id_body.md b/Kotlin/docs/Hooks_id_body.md deleted file mode 100644 index 1ac9868..0000000 --- a/Kotlin/docs/Hooks_id_body.md +++ /dev/null @@ -1,8 +0,0 @@ -# HooksIdBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**config** | [**WebhookConfig**](WebhookConfig.md) | | [optional] -**events** | [**WebhookEvents**](WebhookEvents.md) | | [optional] -**active** | [**kotlin.Boolean**](.md) | Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. | [optional] diff --git a/Kotlin/docs/Integration_inner.md b/Kotlin/docs/Integration_inner.md deleted file mode 100644 index 4f72d79..0000000 --- a/Kotlin/docs/Integration_inner.md +++ /dev/null @@ -1,14 +0,0 @@ -# IntegrationInner - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | [**kotlin.String**](.md) | Name/path of the bucket | [optional] -**protocol** | [**inline**](#ProtocolEnum) | Protocol used by the integration | [optional] -**listPath** | [**kotlin.String**](.md) | URL to list the root of this bucket | [optional] - - -## Enum: protocol -Name | Value ----- | ----- -protocol | s3, gs diff --git a/Kotlin/docs/Issue.md b/Kotlin/docs/Issue.md index 9b76410..8a006cf 100644 --- a/Kotlin/docs/Issue.md +++ b/Kotlin/docs/Issue.md @@ -3,17 +3,22 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | [**kotlin.Int**](.md) | | [optional] -**number** | [**kotlin.Int**](.md) | | [optional] -**user** | [**User**](User.md) | | [optional] -**title** | [**Title**](Title.md) | | -**body** | [**Body**](Body.md) | | -**labels** | [**kotlin.Array<IssueLabels>**](IssueLabels.md) | | -**milestone** | [**IssueMilestone**](IssueMilestone.md) | | -**assignee** | [**IssueAssignee**](IssueAssignee.md) | | -**state** | [**kotlin.String**](.md) | | [optional] +**id** | [**kotlin.Long**](.md) | | [optional] +**number** | [**kotlin.Long**](.md) | Issue index within the repository | [optional] +**user** | [**SlashcomponentsSlashschemasSlashUseryaml**](SlashcomponentsSlashschemasSlashUseryaml.md) | | [optional] +**title** | [**kotlin.String**](.md) | | [optional] +**body** | [**kotlin.String**](.md) | | [optional] +**labels** | [**kotlin.Array<kotlin.Any>**](.md) | | [optional] +**milestone** | [**kotlin.Any**](.md) | | [optional] +**assignee** | [**SlashcomponentsSlashschemasSlashUseryaml**](SlashcomponentsSlashschemasSlashUseryaml.md) | | [optional] +**state** | [**inline**](#StateEnum) | | [optional] **comments** | [**kotlin.Int**](.md) | | [optional] -**createdAt** | [**kotlin.String**](.md) | | [optional] -**updatedAt** | [**kotlin.String**](.md) | | [optional] -**pullRequest** | [**kotlin.Any**](.md) | | [optional] -**closed** | [**kotlin.Boolean**](.md) | | +**createdAt** | [**java.time.LocalDateTime**](java.time.LocalDateTime.md) | | [optional] +**updatedAt** | [**java.time.LocalDateTime**](java.time.LocalDateTime.md) | | [optional] +**pullRequest** | [**kotlin.Any**](.md) | Present when the issue is associated with a pull request | [optional] + + +## Enum: state +Name | Value +---- | ----- +state | open, closed diff --git a/Kotlin/docs/Issue_assignee.md b/Kotlin/docs/Issue_assignee.md deleted file mode 100644 index db570ba..0000000 --- a/Kotlin/docs/Issue_assignee.md +++ /dev/null @@ -1,10 +0,0 @@ -# IssueAssignee - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | [**kotlin.Int**](.md) | | [optional] -**login** | [**kotlin.String**](.md) | | [optional] -**fullName** | [**kotlin.String**](.md) | | [optional] -**avatarUrl** | [**kotlin.String**](.md) | | [optional] -**username** | [**kotlin.String**](.md) | | [optional] diff --git a/Kotlin/docs/Issue_labels.md b/Kotlin/docs/Issue_labels.md deleted file mode 100644 index 701e325..0000000 --- a/Kotlin/docs/Issue_labels.md +++ /dev/null @@ -1,9 +0,0 @@ -# IssueLabels - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | [**kotlin.Int**](.md) | | [optional] -**name** | [**kotlin.String**](.md) | | [optional] -**color** | [**kotlin.String**](.md) | | [optional] -**url** | [**kotlin.String**](.md) | | [optional] diff --git a/Kotlin/docs/Issue_milestone.md b/Kotlin/docs/Issue_milestone.md deleted file mode 100644 index 223455f..0000000 --- a/Kotlin/docs/Issue_milestone.md +++ /dev/null @@ -1,13 +0,0 @@ -# IssueMilestone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | [**kotlin.Int**](.md) | | [optional] -**title** | [**kotlin.String**](.md) | | [optional] -**description** | [**kotlin.String**](.md) | | [optional] -**state** | [**kotlin.String**](.md) | | [optional] -**openIssues** | [**kotlin.Int**](.md) | | [optional] -**closedIssues** | [**kotlin.Int**](.md) | | [optional] -**closedAt** | [**kotlin.String**](.md) | | [optional] -**dueOn** | [**kotlin.String**](.md) | | [optional] diff --git a/Kotlin/docs/IssuesApi.md b/Kotlin/docs/IssuesApi.md deleted file mode 100644 index bce0e7d..0000000 --- a/Kotlin/docs/IssuesApi.md +++ /dev/null @@ -1,211 +0,0 @@ -# IssuesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createIssue**](IssuesApi.md#createIssue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -[**editIssue**](IssuesApi.md#editIssue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -[**getIssue**](IssuesApi.md#getIssue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -[**listRepoIssues**](IssuesApi.md#listRepoIssues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository - - -# **createIssue** -> Issue createIssue(owner, repo, body) - -Create an issue - -Any user with read access to a repository can create an issue. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = IssuesApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val body : PostIssue = // PostIssue | -try { - val result : Issue = apiInstance.createIssue(owner, repo, body) - println(result) -} catch (e: ClientException) { - println("4xx response calling IssuesApi#createIssue") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling IssuesApi#createIssue") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **body** | [**PostIssue**](PostIssue.md)| | [optional] - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **editIssue** -> Issue editIssue(owner, repo, body) - -Edit an issue - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = IssuesApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val body : PatchIssue = // PatchIssue | -try { - val result : Issue = apiInstance.editIssue(owner, repo, body) - println(result) -} catch (e: ClientException) { - println("4xx response calling IssuesApi#editIssue") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling IssuesApi#editIssue") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **body** | [**PatchIssue**](PatchIssue.md)| | [optional] - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **getIssue** -> Issue getIssue(owner, repo, index) - -Get a single issue - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = IssuesApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val index : kotlin.Int = 56 // kotlin.Int | the index of an issue or a pull request -try { - val result : Issue = apiInstance.getIssue(owner, repo, index) - println(result) -} catch (e: ClientException) { - println("4xx response calling IssuesApi#getIssue") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling IssuesApi#getIssue") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **index** | **kotlin.Int**| the index of an issue or a pull request | - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **listRepoIssues** -> Issues listRepoIssues(owner, repo) - -List issues for a repository - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = IssuesApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -try { - val result : Issues = apiInstance.listRepoIssues(owner, repo) - println(result) -} catch (e: ClientException) { - println("4xx response calling IssuesApi#listRepoIssues") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling IssuesApi#listRepoIssues") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - -### Return type - -[**Issues**](Issues.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Kotlin/docs/Labels.md b/Kotlin/docs/Labels.md deleted file mode 100644 index 30705f5..0000000 --- a/Kotlin/docs/Labels.md +++ /dev/null @@ -1,5 +0,0 @@ -# Labels - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/Kotlin/docs/MigrateRepo.md b/Kotlin/docs/MigrateRepo.md deleted file mode 100644 index e1a252d..0000000 --- a/Kotlin/docs/MigrateRepo.md +++ /dev/null @@ -1,19 +0,0 @@ -# MigrateRepo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cloneAddr** | [**kotlin.String**](.md) | Remote Git address (HTTP/HTTPS URL or local path) | -**authUsername** | [**kotlin.String**](.md) | Authorization username | [optional] -**authPassword** | [**kotlin.String**](.md) | Authorization password | [optional] -**userId** | [**kotlin.Int**](.md) | User ID who takes ownership of this repository | -**repoName** | [**kotlin.String**](.md) | Name of the repository | [optional] -**mirror** | [**kotlin.Boolean**](.md) | Repository will be a mirror (connected repository). | [optional] -**visibility** | [**inline**](#VisibilityEnum) | Repository will be private or public. | [optional] -**description** | [**kotlin.String**](.md) | Description of the repository | [optional] - - -## Enum: visibility -Name | Value ----- | ----- -visibility | private, public diff --git a/Kotlin/docs/Milestone.md b/Kotlin/docs/Milestone.md deleted file mode 100644 index 04ad810..0000000 --- a/Kotlin/docs/Milestone.md +++ /dev/null @@ -1,5 +0,0 @@ -# Milestone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/Kotlin/docs/PatchIssue.md b/Kotlin/docs/PatchIssue.md index d1fb606..f9d0c4d 100644 --- a/Kotlin/docs/PatchIssue.md +++ b/Kotlin/docs/PatchIssue.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | [**Title**](Title.md) | | [optional] -**body** | [**Body**](Body.md) | | [optional] -**assignee** | [**Assignee**](Assignee.md) | | [optional] -**milestone** | [**Milestone**](Milestone.md) | | [optional] -**state** | [**State**](State.md) | | [optional] +**title** | [**SlashcomponentsSlashschemasSlashTitleyaml**](SlashcomponentsSlashschemasSlashTitleyaml.md) | | [optional] +**body** | [**SlashcomponentsSlashschemasSlashBodyyaml**](SlashcomponentsSlashschemasSlashBodyyaml.md) | | [optional] +**assignee** | [**SlashcomponentsSlashschemasSlashAssigneeyaml**](SlashcomponentsSlashschemasSlashAssigneeyaml.md) | | [optional] +**milestone** | [**SlashcomponentsSlashschemasSlashMilestoneyaml**](SlashcomponentsSlashschemasSlashMilestoneyaml.md) | | [optional] +**state** | [**SlashcomponentsSlashschemasSlashStateyaml**](SlashcomponentsSlashschemasSlashStateyaml.md) | | [optional] diff --git a/Kotlin/docs/PostIssue.md b/Kotlin/docs/PostIssue.md index 31876c2..90943de 100644 --- a/Kotlin/docs/PostIssue.md +++ b/Kotlin/docs/PostIssue.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | [**Title**](Title.md) | | [optional] -**body** | [**Body**](Body.md) | | [optional] -**assignee** | [**Assignee**](Assignee.md) | | [optional] -**milestone** | [**Milestone**](Milestone.md) | | [optional] -**labels** | [**Labels**](Labels.md) | | [optional] -**closed** | [**Closed**](Closed.md) | | [optional] +**title** | [**SlashcomponentsSlashschemasSlashTitleyaml**](SlashcomponentsSlashschemasSlashTitleyaml.md) | | [optional] +**body** | [**SlashcomponentsSlashschemasSlashBodyyaml**](SlashcomponentsSlashschemasSlashBodyyaml.md) | | [optional] +**assignee** | [**SlashcomponentsSlashschemasSlashAssigneeyaml**](SlashcomponentsSlashschemasSlashAssigneeyaml.md) | | [optional] +**milestone** | [**SlashcomponentsSlashschemasSlashMilestoneyaml**](SlashcomponentsSlashschemasSlashMilestoneyaml.md) | | [optional] +**labels** | [**SlashcomponentsSlashschemasSlashLabelsyaml**](SlashcomponentsSlashschemasSlashLabelsyaml.md) | | [optional] +**closed** | [**SlashcomponentsSlashschemasSlashClosedyaml**](SlashcomponentsSlashschemasSlashClosedyaml.md) | | [optional] diff --git a/Kotlin/docs/ReleasesApi.md b/Kotlin/docs/ReleasesApi.md deleted file mode 100644 index 7dca119..0000000 --- a/Kotlin/docs/ReleasesApi.md +++ /dev/null @@ -1,54 +0,0 @@ -# ReleasesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**listReleases**](ReleasesApi.md#listReleases) | **GET** /repos/{owner}/{repo}/releases | List Releases - - -# **listReleases** -> listReleases(owner, repo) - -List Releases - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = ReleasesApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -try { - apiInstance.listReleases(owner, repo) -} catch (e: ClientException) { - println("4xx response calling ReleasesApi#listReleases") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling ReleasesApi#listReleases") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Kotlin/docs/Repo_hooks_body.md b/Kotlin/docs/Repo_hooks_body.md deleted file mode 100644 index 5495ef4..0000000 --- a/Kotlin/docs/Repo_hooks_body.md +++ /dev/null @@ -1,14 +0,0 @@ -# RepoHooksBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**inline**](#TypeEnum) | The type of webhook | -**config** | [**WebhookConfig**](WebhookConfig.md) | | -**events** | [**WebhookEvents**](WebhookEvents.md) | | [optional] - - -## Enum: type -Name | Value ----- | ----- -type | dagshub, slack, discord, dingtalk diff --git a/Kotlin/docs/RepositoryApi.md b/Kotlin/docs/RepositoryApi.md deleted file mode 100644 index 3543680..0000000 --- a/Kotlin/docs/RepositoryApi.md +++ /dev/null @@ -1,387 +0,0 @@ -# RepositoryApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createOrgRepo**](RepositoryApi.md#createOrgRepo) | **POST** /org/{orgname}/repos | Create in organization -[**createRepo**](RepositoryApi.md#createRepo) | **POST** /user/repos | Create -[**getRepo**](RepositoryApi.md#getRepo) | **GET** /repos/{owner}/{repo} | Get repository information -[**listMyRepos**](RepositoryApi.md#listMyRepos) | **GET** /user/repos | List your repositories -[**listOrgRepos**](RepositoryApi.md#listOrgRepos) | **GET** /orgs/{orgname}/repos | List organization repositories -[**listUserRepos**](RepositoryApi.md#listUserRepos) | **GET** /users/{username}/repos | List user repositories -[**migrateRepo**](RepositoryApi.md#migrateRepo) | **POST** /repos/migrate | Migrate repository -[**search**](RepositoryApi.md#search) | **GET** /repos/search | Search repositories - - -# **createOrgRepo** -> createOrgRepo(orgname, body) - -Create in organization - -Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = RepositoryApi() -val orgname : kotlin.String = orgname_example // kotlin.String | A DagsHub organization name -val body : CreateRepo = // CreateRepo | -try { - apiInstance.createOrgRepo(orgname, body) -} catch (e: ClientException) { - println("4xx response calling RepositoryApi#createOrgRepo") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling RepositoryApi#createOrgRepo") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgname** | **kotlin.String**| A DagsHub organization name | - **body** | [**CreateRepo**](CreateRepo.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **createRepo** -> createRepo(body) - -Create - -Create a new repository for the authenticated user. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = RepositoryApi() -val body : CreateRepo = // CreateRepo | -try { - apiInstance.createRepo(body) -} catch (e: ClientException) { - println("4xx response calling RepositoryApi#createRepo") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling RepositoryApi#createRepo") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateRepo**](CreateRepo.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **getRepo** -> getRepo(owner, repo) - -Get repository information - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = RepositoryApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -try { - apiInstance.getRepo(owner, repo) -} catch (e: ClientException) { - println("4xx response calling RepositoryApi#getRepo") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling RepositoryApi#getRepo") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **listMyRepos** -> kotlin.Any listMyRepos() - -List your repositories - -List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = RepositoryApi() -try { - val result : kotlin.Any = apiInstance.listMyRepos() - println(result) -} catch (e: ClientException) { - println("4xx response calling RepositoryApi#listMyRepos") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling RepositoryApi#listMyRepos") - e.printStackTrace() -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**kotlin.Any** - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **listOrgRepos** -> listOrgRepos(orgname) - -List organization repositories - -List repositories that are accessible to the authenticated user. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = RepositoryApi() -val orgname : kotlin.String = orgname_example // kotlin.String | A DagsHub organization name -try { - apiInstance.listOrgRepos(orgname) -} catch (e: ClientException) { - println("4xx response calling RepositoryApi#listOrgRepos") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling RepositoryApi#listOrgRepos") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgname** | **kotlin.String**| A DagsHub organization name | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **listUserRepos** -> listUserRepos(username) - -List user repositories - -List public repositories for the specified user. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = RepositoryApi() -val username : kotlin.String = username_example // kotlin.String | A DagsHub username or organization name -try { - apiInstance.listUserRepos(username) -} catch (e: ClientException) { - println("4xx response calling RepositoryApi#listUserRepos") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling RepositoryApi#listUserRepos") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **kotlin.String**| A DagsHub username or organization name | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **migrateRepo** -> migrateRepo(body) - -Migrate repository - -Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = RepositoryApi() -val body : MigrateRepo = // MigrateRepo | -try { - apiInstance.migrateRepo(body) -} catch (e: ClientException) { - println("4xx response calling RepositoryApi#migrateRepo") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling RepositoryApi#migrateRepo") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**MigrateRepo**](MigrateRepo.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -# **search** -> kotlin.Any search(q, uid, limit, page) - -Search repositories - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = RepositoryApi() -val q : kotlin.String = q_example // kotlin.String | -val uid : kotlin.Int = 56 // kotlin.Int | User ID to specify search whose repositories. Default is 0 and search all repositories -val limit : kotlin.Int = 56 // kotlin.Int | Maximum number of repositories in search results. -val page : kotlin.Int = 56 // kotlin.Int | Page number. Default is 1. -try { - val result : kotlin.Any = apiInstance.search(q, uid, limit, page) - println(result) -} catch (e: ClientException) { - println("4xx response calling RepositoryApi#search") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling RepositoryApi#search") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **q** | **kotlin.String**| | - **uid** | **kotlin.Int**| User ID to specify search whose repositories. Default is 0 and search all repositories | [optional] [default to 0] - **limit** | **kotlin.Int**| Maximum number of repositories in search results. | [optional] [default to 10] - **page** | **kotlin.Int**| Page number. Default is 1. | [optional] [default to 1] - -### Return type - -**kotlin.Any** - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Kotlin/docs/State.md b/Kotlin/docs/State.md deleted file mode 100644 index 915a102..0000000 --- a/Kotlin/docs/State.md +++ /dev/null @@ -1,6 +0,0 @@ -# State - -## Enum - - * `OPEN` (value: `"open"`) - * `CLOSED` (value: `"closed"`) diff --git a/Kotlin/docs/StorageIntegrationsApi.md b/Kotlin/docs/StorageIntegrationsApi.md deleted file mode 100644 index bd1125d..0000000 --- a/Kotlin/docs/StorageIntegrationsApi.md +++ /dev/null @@ -1,168 +0,0 @@ -# StorageIntegrationsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getBucketContent**](StorageIntegrationsApi.md#getBucketContent) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -[**getBucketFile**](StorageIntegrationsApi.md#getBucketFile) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -[**getBuckets**](StorageIntegrationsApi.md#getBuckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository - - -# **getBucketContent** -> Files1 getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken) - -List contents in the path - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = StorageIntegrationsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val protocol : kotlin.String = protocol_example // kotlin.String | protocol of the storage integration -val bucket : kotlin.String = bucket_example // kotlin.String | name and prefix of the bucket integration -val path : kotlin.String = path_example // kotlin.String | path of a folder in the repository -val includeSize : kotlin.Boolean = true // kotlin.Boolean | -val limit : kotlin.Int = 56 // kotlin.Int | Maximum amount of items to return -val fromToken : kotlin.String = fromToken_example // kotlin.String | Token, from which to continue iteration -try { - val result : Files1 = apiInstance.getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken) - println(result) -} catch (e: ClientException) { - println("4xx response calling StorageIntegrationsApi#getBucketContent") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling StorageIntegrationsApi#getBucketContent") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **protocol** | **kotlin.String**| protocol of the storage integration | [enum: gs, s3] - **bucket** | **kotlin.String**| name and prefix of the bucket integration | - **path** | **kotlin.String**| path of a folder in the repository | - **includeSize** | **kotlin.Boolean**| | [optional] [default to false] - **limit** | **kotlin.Int**| Maximum amount of items to return | [optional] [default to 100] - **fromToken** | **kotlin.String**| Token, from which to continue iteration | [optional] - -### Return type - -[**Files1**](Files1.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **getBucketFile** -> getBucketFile(owner, repo, protocol, bucket, path) - -Get file in the bucket - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = StorageIntegrationsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val protocol : kotlin.String = protocol_example // kotlin.String | protocol of the storage integration -val bucket : kotlin.String = bucket_example // kotlin.String | name and prefix of the bucket integration -val path : kotlin.String = path_example // kotlin.String | The content path -try { - apiInstance.getBucketFile(owner, repo, protocol, bucket, path) -} catch (e: ClientException) { - println("4xx response calling StorageIntegrationsApi#getBucketFile") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling StorageIntegrationsApi#getBucketFile") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **protocol** | **kotlin.String**| protocol of the storage integration | [enum: gs, s3] - **bucket** | **kotlin.String**| name and prefix of the bucket integration | - **path** | **kotlin.String**| The content path | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **getBuckets** -> Integration getBuckets(owner, repo) - -List integrated storages in the repository - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = StorageIntegrationsApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -try { - val result : Integration = apiInstance.getBuckets(owner, repo) - println(result) -} catch (e: ClientException) { - println("4xx response calling StorageIntegrationsApi#getBuckets") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling StorageIntegrationsApi#getBuckets") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - -### Return type - -[**Integration**](Integration.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Kotlin/docs/Title.md b/Kotlin/docs/Title.md deleted file mode 100644 index 50cc112..0000000 --- a/Kotlin/docs/Title.md +++ /dev/null @@ -1,5 +0,0 @@ -# Title - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/Kotlin/docs/User.md b/Kotlin/docs/User.md index 95b41c8..cfa950c 100644 --- a/Kotlin/docs/User.md +++ b/Kotlin/docs/User.md @@ -3,8 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | [**kotlin.Int**](.md) | | [optional] +**id** | [**kotlin.Long**](.md) | | [optional] **login** | [**kotlin.String**](.md) | | [optional] +**username** | [**kotlin.String**](.md) | Alias for login (legacy compatibility) | [optional] **fullName** | [**kotlin.String**](.md) | | [optional] **avatarUrl** | [**kotlin.String**](.md) | | [optional] -**username** | [**kotlin.String**](.md) | | [optional] +**publicEmail** | [**kotlin.String**](.md) | | [optional] +**website** | [**kotlin.String**](.md) | | [optional] +**company** | [**kotlin.String**](.md) | | [optional] +**description** | [**kotlin.String**](.md) | | [optional] diff --git a/Kotlin/docs/UserApi.md b/Kotlin/docs/UserApi.md deleted file mode 100644 index 752b227..0000000 --- a/Kotlin/docs/UserApi.md +++ /dev/null @@ -1,93 +0,0 @@ -# UserApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getAuthenticatedUser**](UserApi.md#getAuthenticatedUser) | **GET** /user | Get authenticated user information -[**getUser**](UserApi.md#getUser) | **GET** /users/{username} | Get information about a user - - -# **getAuthenticatedUser** -> getAuthenticatedUser() - -Get authenticated user information - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = UserApi() -try { - apiInstance.getAuthenticatedUser() -} catch (e: ClientException) { - println("4xx response calling UserApi#getAuthenticatedUser") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling UserApi#getAuthenticatedUser") - e.printStackTrace() -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -# **getUser** -> getUser(username) - -Get information about a user - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = UserApi() -val username : kotlin.String = username_example // kotlin.String | A DagsHub username or organization name -try { - apiInstance.getUser(username) -} catch (e: ClientException) { - println("4xx response calling UserApi#getUser") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling UserApi#getUser") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **kotlin.String**| A DagsHub username or organization name | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Kotlin/docs/WebhookConfig.md b/Kotlin/docs/WebhookConfig.md deleted file mode 100644 index e6845bb..0000000 --- a/Kotlin/docs/WebhookConfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# WebhookConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | [**kotlin.String**](.md) | A string defining the URL to which the payloads will be delivered. | -**contentType** | [**inline**](#ContentTypeEnum) | A string defining the media type used to serialize the payloads. | -**secret** | [**kotlin.String**](.md) | An optional string that's passed with the HTTP requests body. | [optional] - - -## Enum: content_type -Name | Value ----- | ----- -contentType | json, form diff --git a/Kotlin/docs/WebhookEvents.md b/Kotlin/docs/WebhookEvents.md deleted file mode 100644 index d28724b..0000000 --- a/Kotlin/docs/WebhookEvents.md +++ /dev/null @@ -1,5 +0,0 @@ -# WebhookEvents - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/Kotlin/docs/WebhooksApi.md b/Kotlin/docs/WebhooksApi.md deleted file mode 100644 index 6581622..0000000 --- a/Kotlin/docs/WebhooksApi.md +++ /dev/null @@ -1,203 +0,0 @@ -# WebhooksApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createHook**](WebhooksApi.md#createHook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -[**deleteHook**](WebhooksApi.md#deleteHook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -[**editHook**](WebhooksApi.md#editHook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -[**listHooks**](WebhooksApi.md#listHooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - - -# **createHook** -> createHook(owner, repo, body) - -Create a hook - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = WebhooksApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val body : RepoHooksBody = // RepoHooksBody | -try { - apiInstance.createHook(owner, repo, body) -} catch (e: ClientException) { - println("4xx response calling WebhooksApi#createHook") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling WebhooksApi#createHook") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **body** | [**RepoHooksBody**](RepoHooksBody.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **deleteHook** -> deleteHook(owner, repo, id) - -Delete a hook - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = WebhooksApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val id : kotlin.Int = 56 // kotlin.Int | -try { - apiInstance.deleteHook(owner, repo, id) -} catch (e: ClientException) { - println("4xx response calling WebhooksApi#deleteHook") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling WebhooksApi#deleteHook") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **id** | **kotlin.Int**| | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **editHook** -> editHook(owner, repo, id, body) - -Edit a hook - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = WebhooksApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -val id : kotlin.Int = 56 // kotlin.Int | -val body : HooksIdBody = // HooksIdBody | -try { - apiInstance.editHook(owner, repo, id, body) -} catch (e: ClientException) { - println("4xx response calling WebhooksApi#editHook") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling WebhooksApi#editHook") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - **id** | **kotlin.Int**| | - **body** | [**HooksIdBody**](HooksIdBody.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **listHooks** -> listHooks(owner, repo) - -List hooks - -### Example -```kotlin -// Import classes: -//import dagshub_api.infrastructure.* -//import io.swagger.client.models.*; - -val apiInstance = WebhooksApi() -val owner : kotlin.String = owner_example // kotlin.String | owner of the repository -val repo : kotlin.String = repo_example // kotlin.String | name of the repository -try { - apiInstance.listHooks(owner, repo) -} catch (e: ClientException) { - println("4xx response calling WebhooksApi#listHooks") - e.printStackTrace() -} catch (e: ServerException) { - println("5xx response calling WebhooksApi#listHooks") - e.printStackTrace() -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **kotlin.String**| owner of the repository | - **repo** | **kotlin.String**| name of the repository | - -### Return type - -null (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - diff --git a/Kotlin/settings.gradle b/Kotlin/settings.gradle deleted file mode 100644 index 50b05be..0000000 --- a/Kotlin/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApiAbstractions.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ddae59a..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,20 +0,0 @@ -package dagshub_api.infrastructure - -typealias MultiValueMap = Map> - -fun collectionDelimiter(collectionFormat: String) = when (collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipes" -> "|" - "ssv" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: List, collectionFormat: String, map: (item: Any?) -> String = defaultMultiValueConverter): List { - return when (collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.map(map).joinToString(separator = collectionDelimiter(collectionFormat))) - } -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApiClient.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApiClient.kt deleted file mode 100644 index e3cd35d..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApiClient.kt +++ /dev/null @@ -1,127 +0,0 @@ -package dagshub_api.infrastructure - -import okhttp3.* -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import java.io.File - -open class ApiClient(val baseUrl: String) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val XmlMediaType = "application/xml" - - @JvmStatic - val client: OkHttpClient = OkHttpClient() - - @JvmStatic - var defaultHeaders: Map by ApplicationDelegates.setOnce(mapOf(ContentType to JsonMediaType, Accept to JsonMediaType)) - - @JvmStatic - val jsonHeaders: Map = mapOf(ContentType to JsonMediaType, Accept to JsonMediaType) - } - - protected inline fun requestBody(content: T, mediaType: String = JsonMediaType): RequestBody = - when { - content is File -> RequestBody.create(mediaType.toMediaTypeOrNull(), content) - - mediaType == FormDataMediaType -> { - var builder = FormBody.Builder() - // content's type *must* be Map - @Suppress("UNCHECKED_CAST") - (content as Map).forEach { key, value -> - builder = builder.add(key, value) - } - builder.build() - } - mediaType == JsonMediaType -> RequestBody.create( - mediaType.toMediaTypeOrNull(), Serializer.moshi.adapter(T::class.java).toJson(content) - ) - mediaType == XmlMediaType -> TODO("xml not currently supported.") - - // TODO: this should be extended with other serializers - else -> TODO("requestBody currently only supports JSON body and File body.") - } - - protected inline fun responseBody(body: ResponseBody?, mediaType: String = JsonMediaType): T? { - if (body == null) return null - return when (mediaType) { - JsonMediaType -> Serializer.moshi.adapter(T::class.java).fromJson(body.source()) - else -> TODO() - } - } - - protected inline fun request(requestConfig: RequestConfig, body: Any? = null): ApiInfrastructureResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - var urlBuilder = httpUrl.newBuilder() - .addPathSegments(requestConfig.path.trimStart('/')) - - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - urlBuilder = urlBuilder.addQueryParameter(query.key, queryValue) - } - } - - val url = urlBuilder.build() - val headers = requestConfig.headers + defaultHeaders - - if (headers[ContentType] ?: "" == "") { - throw kotlin.IllegalStateException("Missing Content-Type header. This is required.") - } - - if (headers[Accept] ?: "" == "") { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - // TODO: support multiple contentType,accept options here. - val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() - val accept = (headers[Accept] as String).substringBefore(";").toLowerCase() - - var request: Request.Builder = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete() - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - } - - headers.forEach { header -> request = request.addHeader(header.key, header.value.toString()) } - - val realRequest = request.build() - val response = client.newCall(realRequest).execute() - - // TODO: handle specific mapping types. e.g. Map> - when { - response.isRedirect -> return Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> return Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> return Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> return ClientError( - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> return ServerError( - null, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApiInfrastructureResponse.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApiInfrastructureResponse.kt deleted file mode 100644 index 99e8503..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApiInfrastructureResponse.kt +++ /dev/null @@ -1,40 +0,0 @@ -package dagshub_api.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -abstract class ApiInfrastructureResponse(val responseType: ResponseType) { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiInfrastructureResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiInfrastructureResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiInfrastructureResponse(ResponseType.Redirection) - -class ClientError( - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiInfrastructureResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -) : ApiInfrastructureResponse(ResponseType.ServerError) \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApplicationDelegates.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApplicationDelegates.kt deleted file mode 100644 index 33e6954..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ApplicationDelegates.kt +++ /dev/null @@ -1,29 +0,0 @@ -package dagshub_api.infrastructure - -import kotlin.properties.ReadWriteProperty -import kotlin.reflect.KProperty - -object ApplicationDelegates { - /** - * Provides a property delegate, allowing the property to be set once and only once. - * - * If unset (no default value), a get on the property will throw [IllegalStateException]. - */ - fun setOnce(defaultValue: T? = null): ReadWriteProperty = SetOnce(defaultValue) - - private class SetOnce(defaultValue: T? = null) : ReadWriteProperty { - private var isSet = false - private var value: T? = defaultValue - - override fun getValue(thisRef: Any?, property: KProperty<*>): T { - return value ?: throw IllegalStateException("${property.name} not initialized") - } - - override fun setValue(thisRef: Any?, property: KProperty<*>, value: T) = synchronized(this) { - if (!isSet) { - this.value = value - isSet = true - } - } - } -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/Errors.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/Errors.kt deleted file mode 100644 index cdfbfbc..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/Errors.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("unused") -package dagshub_api.infrastructure - -import java.lang.RuntimeException - -open class ClientException : RuntimeException { - - /** - * Constructs an [ClientException] with no detail message. - */ - constructor() : super() - - /** - * Constructs an [ClientException] with the specified detail message. - - * @param message the detail message. - */ - constructor(message: kotlin.String) : super(message) - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException : RuntimeException { - - /** - * Constructs an [ServerException] with no detail message. - */ - constructor() : super() - - /** - * Constructs an [ServerException] with the specified detail message. - - * @param message the detail message. - */ - constructor(message: kotlin.String) : super(message) - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/LocalDateAdapter.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index 024a057..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,18 +0,0 @@ -package dagshub_api.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/LocalDateTimeAdapter.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index 89dead5..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package dagshub_api.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/RequestConfig.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/RequestConfig.kt deleted file mode 100644 index 18ce9c1..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,16 +0,0 @@ -package dagshub_api.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: Map = mapOf(), - val query: Map> = mapOf() -) \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/RequestMethod.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/RequestMethod.kt deleted file mode 100644 index 366557c..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package dagshub_api.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ResponseExtensions.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 8eca691..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package dagshub_api.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational: Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -val Response.isRedirect: Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError: Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError: Boolean get() = this.code in 500..999 \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/Serializer.kt b/Kotlin/src/main/kotlin/dagshub_api/infrastructure/Serializer.kt deleted file mode 100644 index 53ff523..0000000 --- a/Kotlin/src/main/kotlin/dagshub_api/infrastructure/Serializer.kt +++ /dev/null @@ -1,16 +0,0 @@ -package dagshub_api.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory -import java.util.Date - -object Serializer { - @JvmStatic - val moshi: Moshi = Moshi.Builder() - .add(KotlinJsonAdapterFactory()) - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .build() -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/BranchesApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/BranchesApi.kt deleted file mode 100644 index ffc96d1..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/BranchesApi.kt +++ /dev/null @@ -1,70 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - - -import dagshub_api.infrastructure.* - -class BranchesApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * Get Branch - * - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @return void - */ - fun getBranch(owner: kotlin.String, repo: kotlin.String, branch: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/branches/{branch}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "branch" + "}", "$branch"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * List Branches - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - fun listBranches(owner: kotlin.String, repo: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/branches".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/CollaboratorsApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/CollaboratorsApi.kt deleted file mode 100644 index 2d023ad..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/CollaboratorsApi.kt +++ /dev/null @@ -1,99 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - -import io.swagger.client.models.CollaboratorsCollaboratorBody - -import dagshub_api.infrastructure.* - -class CollaboratorsApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * Add user as a collaborator - * - * @param owner owner of the repository - * @param repo name of the repository - * @param collaborator collaborator username - * @param body (optional) - * @return void - */ - fun addCollaborator(owner: kotlin.String, repo: kotlin.String, collaborator: kotlin.String, body: CollaboratorsCollaboratorBody? = null): Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/repos/{owner}/{repo}/collaborators/{collaborator}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "collaborator" + "}", "$collaborator"), query = localVariableQuery - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Get collaborators - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - fun getCollaborators(owner: kotlin.String, repo: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/collaborators".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Delete collaborator - * - * @param owner owner of the repository - * @param repo name of the repository - * @param collaborator collaborator username - * @return void - */ - fun removeCollaborator(owner: kotlin.String, repo: kotlin.String, collaborator: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/repos/{owner}/{repo}/collaborators/{collaborator}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "collaborator" + "}", "$collaborator"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/CommitsApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/CommitsApi.kt deleted file mode 100644 index d7c15bc..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/CommitsApi.kt +++ /dev/null @@ -1,45 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - - -import dagshub_api.infrastructure.* - -class CommitsApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * Get a single commit - * - * @param owner owner of the repository - * @param repo name of the repository - * @param sha a SHA1 of a commit - * @return void - */ - fun getCommit(owner: kotlin.String, repo: kotlin.String, sha: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/commits/{sha}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "sha" + "}", "$sha"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/ContentApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/ContentApi.kt deleted file mode 100644 index bf13ee2..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/ContentApi.kt +++ /dev/null @@ -1,139 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - -import io.swagger.client.models.Files - -import dagshub_api.infrastructure.* - -class ContentApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * Download archive - * This method returns archive by given format. - * @param owner owner of the repository - * @param repo name of the repository - * @param ref The name of the commit/branch/tag - * @param format The format of archive, either .zip or .tar.gz - * @return void - */ - fun getArchive(owner: kotlin.String, repo: kotlin.String, ref: kotlin.String, format: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/archive/{ref}{format}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "ref" + "}", "$ref").replace("{" + "format" + "}", "$format"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * List data in a repository folder - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @param path path of a folder in the repository - * @param includeSize (optional, default to false) - * @return Files - */ - @Suppress("UNCHECKED_CAST") - fun getContent(owner: kotlin.String, repo: kotlin.String, branch: kotlin.String, path: kotlin.String, includeSize: kotlin.Boolean? = null): Files { - val localVariableQuery: MultiValueMap = mapOf("include_size" to listOf("$includeSize")) - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/content/{branch}/{path}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "branch" + "}", "$branch").replace("{" + "path" + "}", "$path"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as Files - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Download raw content - * This method returns the raw content of a file. - * @param owner owner of the repository - * @param repo name of the repository - * @param ref The name of the commit/branch/tag - * @param path The content path - * @return void - */ - fun getRaw(owner: kotlin.String, repo: kotlin.String, ref: kotlin.String, path: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/raw/{ref}/{path}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "ref" + "}", "$ref").replace("{" + "path" + "}", "$path"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Upload data to a repository - * - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @param path path of a folder in the repository - * @param commitSummary (optional) - * @param commitMessage (optional) - * @param commitChoice (optional) - * @param lastCommit (optional) - * @param newBranchName (optional) - * @param versioning (optional) - * @param files (optional) - * @return void - */ - fun uploadContent(owner: kotlin.String, repo: kotlin.String, branch: kotlin.String, path: kotlin.String, commitSummary: kotlin.String? = null, commitMessage: kotlin.String? = null, commitChoice: kotlin.String? = null, lastCommit: kotlin.String? = null, newBranchName: kotlin.String? = null, versioning: kotlin.String? = null, files: kotlin.String? = null): Unit { - val localVariableBody: kotlin.Any? = mapOf("commit_summary" to "$commitSummary", "commit_message" to "$commitMessage", "commit_choice" to "$commitChoice", "last_commit" to "$lastCommit", "new_branch_name" to "$newBranchName", "versioning" to "$versioning", "files" to "$files") - val localVariableQuery: MultiValueMap = mapOf() - val localVariableHeaders: kotlin.collections.Map = mapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/repos/{owner}/{repo}/content/{branch}/{path}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "branch" + "}", "$branch").replace("{" + "path" + "}", "$path"), query = localVariableQuery, headers = localVariableHeaders - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/ExperimentsApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/ExperimentsApi.kt deleted file mode 100644 index 78d6c8e..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/ExperimentsApi.kt +++ /dev/null @@ -1,181 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - -import io.swagger.client.models.EditExperimentPost -import io.swagger.client.models.ExperimentKeys - -import dagshub_api.infrastructure.* - -class ExperimentsApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * Add label to experiment - * - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param experimentLabel A label for the experiment, max 128 characters. - * @return void - */ - fun addExperimentLabel(owner: kotlin.String, repo: kotlin.String, experimentKey: kotlin.String, experimentLabel: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "experimentKey" + "}", "$experimentKey").replace("{" + "experimentLabel" + "}", "$experimentLabel"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Delete experiment - * Support both git and MLflow experiments - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @return void - */ - fun deleteExperiment(owner: kotlin.String, repo: kotlin.String, experimentKey: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "experimentKey" + "}", "$experimentKey"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Delete experiment label - * - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param experimentLabel A label for the experiment, max 128 characters. - * @return void - */ - fun deleteExperimentLabel(owner: kotlin.String, repo: kotlin.String, experimentKey: kotlin.String, experimentLabel: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "experimentKey" + "}", "$experimentKey").replace("{" + "experimentLabel" + "}", "$experimentLabel"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Edit experiment info - * Edit experiment info, currently supports just changing experiment name. - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param body (optional) - * @return void - */ - fun editExperiment(owner: kotlin.String, repo: kotlin.String, experimentKey: kotlin.String, body: EditExperimentPost? = null): Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "experimentKey" + "}", "$experimentKey"), query = localVariableQuery - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Get experiment metrics for experiment - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return void - */ - fun getExperimentMetrics(owner: kotlin.String, repo: kotlin.String, body: ExperimentKeys? = null): Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/repos/{owner}/{repo}/experiments/metricsForExperiments".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * List Experiments - * Get a list of experiments in the given repository - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - fun getExperiments(owner: kotlin.String, repo: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/experiments".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/IssuesApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/IssuesApi.kt deleted file mode 100644 index 73be0af..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/IssuesApi.kt +++ /dev/null @@ -1,132 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - -import io.swagger.client.models.Issue -import io.swagger.client.models.Issues -import io.swagger.client.models.PatchIssue -import io.swagger.client.models.PostIssue - -import dagshub_api.infrastructure.* - -class IssuesApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * Create an issue - * Any user with read access to a repository can create an issue. - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return Issue - */ - @Suppress("UNCHECKED_CAST") - fun createIssue(owner: kotlin.String, repo: kotlin.String, body: PostIssue? = null): Issue { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/repos/{owner}/{repo}/issues".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as Issue - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Edit an issue - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return Issue - */ - @Suppress("UNCHECKED_CAST") - fun editIssue(owner: kotlin.String, repo: kotlin.String, body: PatchIssue? = null): Issue { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PATCH, - "/repos/{owner}/{repo}/issues".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as Issue - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Get a single issue - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param owner owner of the repository - * @param repo name of the repository - * @param index the index of an issue or a pull request - * @return Issue - */ - @Suppress("UNCHECKED_CAST") - fun getIssue(owner: kotlin.String, repo: kotlin.String, index: kotlin.Int): Issue { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/issues/{index}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "index" + "}", "$index"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as Issue - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * List issues for a repository - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @param owner owner of the repository - * @param repo name of the repository - * @return Issues - */ - @Suppress("UNCHECKED_CAST") - fun listRepoIssues(owner: kotlin.String, repo: kotlin.String): Issues { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/issues".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as Issues - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/ReleasesApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/ReleasesApi.kt deleted file mode 100644 index 45a93b9..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/ReleasesApi.kt +++ /dev/null @@ -1,44 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - - -import dagshub_api.infrastructure.* - -class ReleasesApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * List Releases - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - fun listReleases(owner: kotlin.String, repo: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/releases".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/RepositoryApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/RepositoryApi.kt deleted file mode 100644 index eeb9d52..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/RepositoryApi.kt +++ /dev/null @@ -1,222 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - -import io.swagger.client.models.CreateRepo -import io.swagger.client.models.MigrateRepo - -import dagshub_api.infrastructure.* - -class RepositoryApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * Create in organization - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * @param orgname A DagsHub organization name - * @param body (optional) - * @return void - */ - fun createOrgRepo(orgname: kotlin.String, body: CreateRepo? = null): Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/org/{orgname}/repos".replace("{" + "orgname" + "}", "$orgname"), query = localVariableQuery - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Create - * Create a new repository for the authenticated user. - * @param body (optional) - * @return void - */ - fun createRepo(body: CreateRepo? = null): Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/repos", query = localVariableQuery - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Get repository information - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - fun getRepo(owner: kotlin.String, repo: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * List your repositories - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * @return kotlin.Any - */ - @Suppress("UNCHECKED_CAST") - fun listMyRepos(): kotlin.Any { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/repos", query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Any - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * List organization repositories - * List repositories that are accessible to the authenticated user. - * @param orgname A DagsHub organization name - * @return void - */ - fun listOrgRepos(orgname: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/orgs/{orgname}/repos".replace("{" + "orgname" + "}", "$orgname"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * List user repositories - * List public repositories for the specified user. - * @param username A DagsHub username or organization name - * @return void - */ - fun listUserRepos(username: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/users/{username}/repos".replace("{" + "username" + "}", "$username"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Migrate repository - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * @param body (optional) - * @return void - */ - fun migrateRepo(body: MigrateRepo? = null): Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/repos/migrate", query = localVariableQuery - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Search repositories - * - * @param q - * @param uid User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - * @param limit Maximum number of repositories in search results. (optional, default to 10) - * @param page Page number. Default is 1. (optional, default to 1) - * @return kotlin.Any - */ - @Suppress("UNCHECKED_CAST") - fun search(q: kotlin.String, uid: kotlin.Int? = null, limit: kotlin.Int? = null, page: kotlin.Int? = null): kotlin.Any { - val localVariableQuery: MultiValueMap = mapOf("q" to listOf("$q"), "uid" to listOf("$uid"), "limit" to listOf("$limit"), "page" to listOf("$page")) - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/search", query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Any - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/StorageIntegrationsApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/StorageIntegrationsApi.kt deleted file mode 100644 index b11f49d..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/StorageIntegrationsApi.kt +++ /dev/null @@ -1,107 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - -import io.swagger.client.models.Files1 -import io.swagger.client.models.Integration - -import dagshub_api.infrastructure.* - -class StorageIntegrationsApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * List contents in the path - * - * @param owner owner of the repository - * @param repo name of the repository - * @param protocol protocol of the storage integration - * @param bucket name and prefix of the bucket integration - * @param path path of a folder in the repository - * @param includeSize (optional, default to false) - * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) - * @return Files1 - */ - @Suppress("UNCHECKED_CAST") - fun getBucketContent(owner: kotlin.String, repo: kotlin.String, protocol: kotlin.String, bucket: kotlin.String, path: kotlin.String, includeSize: kotlin.Boolean? = null, limit: kotlin.Int? = null, fromToken: kotlin.String? = null): Files1 { - val localVariableQuery: MultiValueMap = mapOf("include_size" to listOf("$includeSize"), "limit" to listOf("$limit"), "from_token" to listOf("$fromToken")) - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "protocol" + "}", "$protocol").replace("{" + "bucket" + "}", "$bucket").replace("{" + "path" + "}", "$path"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as Files1 - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Get file in the bucket - * - * @param owner owner of the repository - * @param repo name of the repository - * @param protocol protocol of the storage integration - * @param bucket name and prefix of the bucket integration - * @param path The content path - * @return void - */ - fun getBucketFile(owner: kotlin.String, repo: kotlin.String, protocol: kotlin.String, bucket: kotlin.String, path: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "protocol" + "}", "$protocol").replace("{" + "bucket" + "}", "$bucket").replace("{" + "path" + "}", "$path"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * List integrated storages in the repository - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Integration - */ - @Suppress("UNCHECKED_CAST") - fun getBuckets(owner: kotlin.String, repo: kotlin.String): Integration { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/storage".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as Integration - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/UserApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/UserApi.kt deleted file mode 100644 index 651c65a..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/UserApi.kt +++ /dev/null @@ -1,66 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - - -import dagshub_api.infrastructure.* - -class UserApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * Get authenticated user information - * - * @return void - */ - fun getAuthenticatedUser(): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user", query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Get information about a user - * - * @param username A DagsHub username or organization name - * @return void - */ - fun getUser(username: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/users/{username}".replace("{" + "username" + "}", "$username"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/WebhooksApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/WebhooksApi.kt deleted file mode 100644 index 3cfa75b..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/WebhooksApi.kt +++ /dev/null @@ -1,127 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.apis - -import io.swagger.client.models.HooksIdBody -import io.swagger.client.models.RepoHooksBody - -import dagshub_api.infrastructure.* - -class WebhooksApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { - - /** - * Create a hook - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return void - */ - fun createHook(owner: kotlin.String, repo: kotlin.String, body: RepoHooksBody? = null): Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/repos/{owner}/{repo}/hooks".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Delete a hook - * - * @param owner owner of the repository - * @param repo name of the repository - * @param id - * @return void - */ - fun deleteHook(owner: kotlin.String, repo: kotlin.String, id: kotlin.Int): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/repos/{owner}/{repo}/hooks/{id}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "id" + "}", "$id"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * Edit a hook - * - * @param owner owner of the repository - * @param repo name of the repository - * @param id - * @param body (optional) - * @return void - */ - fun editHook(owner: kotlin.String, repo: kotlin.String, id: kotlin.Int, body: HooksIdBody? = null): Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PATCH, - "/repos/{owner}/{repo}/hooks/{id}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "id" + "}", "$id"), query = localVariableQuery - ) - val response = request( - localVariableConfig, localVariableBody - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } - /** - * List hooks - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - fun listHooks(owner: kotlin.String, repo: kotlin.String): Unit { - val localVariableQuery: MultiValueMap = mapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/repos/{owner}/{repo}/hooks".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery - ) - val response = request( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") - ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") - } - } -} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Assignee.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Assignee.kt deleted file mode 100644 index 3e11e1e..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Assignee.kt +++ /dev/null @@ -1,15 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -typealias Assignee = kotlin.String diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Body.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Body.kt deleted file mode 100644 index 47afab8..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Body.kt +++ /dev/null @@ -1,15 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -typealias Body = kotlin.String diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Closed.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Closed.kt deleted file mode 100644 index 8445901..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Closed.kt +++ /dev/null @@ -1,15 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -typealias Closed = kotlin.Boolean diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Collaborators_collaborator_body.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Collaborators_collaborator_body.kt deleted file mode 100644 index 4b19c19..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Collaborators_collaborator_body.kt +++ /dev/null @@ -1,24 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * - * @param permission The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. - */ -data class CollaboratorsCollaboratorBody ( - - /* The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. */ - val permission: kotlin.String? = null -) { -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/CreateRepo.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/CreateRepo.kt deleted file mode 100644 index ccc7e91..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/CreateRepo.kt +++ /dev/null @@ -1,95 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * - * @param name name of the repository - * @param description A short description of the repository - * @param `private` Either true to create a private repository, or false to create a public one. - * @param autoInit Pass true to create an initial commit with README, .gitignore and LICENSE. - * @param projectTemplate Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - * @param gitignores Desired language .gitignore templates to apply. Use the name of the templates. - * @param license Desired LICENSE template to apply. Use the name of the template. - * @param readme Desired README template to apply. Use the name of the template. - */ -data class CreateRepo ( - - /* name of the repository */ - val name: kotlin.String, - /* A short description of the repository */ - val description: kotlin.String? = null, - /* Either true to create a private repository, or false to create a public one. */ - val `private`: kotlin.Boolean? = null, - /* Pass true to create an initial commit with README, .gitignore and LICENSE. */ - val autoInit: kotlin.Boolean? = null, - /* Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. */ - val projectTemplate: CreateRepo.ProjectTemplate? = null, - /* Desired language .gitignore templates to apply. Use the name of the templates. */ - val gitignores: kotlin.String? = null, - /* Desired LICENSE template to apply. Use the name of the template. */ - val license: CreateRepo.License? = null, - /* Desired README template to apply. Use the name of the template. */ - val readme: kotlin.String? = null -) { - /** - * Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - * Values: COOKIECUTTERDAGSHUBDVC,CUSTOM,NONE,NOTEBOOKTEMPLATE - */ - enum class ProjectTemplate(val value: kotlin.String){ - COOKIECUTTERDAGSHUBDVC("cookiecutter-dagshub-dvc"), - CUSTOM("custom"), - NONE("none"), - NOTEBOOKTEMPLATE("notebook-template"); - } - /** - * Desired LICENSE template to apply. Use the name of the template. - * Values: APACHE_LICENSE_2PERIOD0,MIT_LICENSE,ABSTYLES_LICENSE,ACADEMIC_FREE_LICENSE_V1PERIOD1,ACADEMIC_FREE_LICENSE_V1PERIOD2,ACADEMIC_FREE_LICENSE_V2PERIOD0,ACADEMIC_FREE_LICENSE_V2PERIOD1,ACADEMIC_FREE_LICENSE_V3PERIOD0,AFFERO_GENERAL_PUBLIC_LICENSE_V1PERIOD0,APACHE_LICENSE_1PERIOD0,APACHE_LICENSE_1PERIOD1,ARTISTIC_LICENSE_1PERIOD0,ARTISTIC_LICENSE_2PERIOD0,BSD_2CLAUSE_LICENSE,BSD_3CLAUSE_LICENSE,BSD_4CLAUSE_LICENSE,CREATIVE_COMMONS_CC0_1PERIOD0_UNIVERSAL,ECLIPSE_PUBLIC_LICENSE_1PERIOD0,EDUCATIONAL_COMMUNITY_LICENSE_V1PERIOD0,EDUCATIONAL_COMMUNITY_LICENSE_V2PERIOD0,GNU_AFFERO_GENERAL_PUBLIC_LICENSE_V3PERIOD0,GNU_FREE_DOCUMENTATION_LICENSE_V1PERIOD1,GNU_FREE_DOCUMENTATION_LICENSE_V1PERIOD2,GNU_FREE_DOCUMENTATION_LICENSE_V1PERIOD3,GNU_GENERAL_PUBLIC_LICENSE_V1PERIOD0,GNU_GENERAL_PUBLIC_LICENSE_V2PERIOD0,GNU_GENERAL_PUBLIC_LICENSE_V3PERIOD0,GNU_LESSER_GENERAL_PUBLIC_LICENSE_V2PERIOD1,GNU_LESSER_GENERAL_PUBLIC_LICENSE_V3PERIOD0,GNU_LIBRARY_GENERAL_PUBLIC_LICENSE_V2PERIOD0,ISC_LICENSE,MOZILLA_PUBLIC_LICENSE_1PERIOD0,MOZILLA_PUBLIC_LICENSE_1PERIOD1,MOZILLA_PUBLIC_LICENSE_2PERIOD03 - */ - enum class License(val value: kotlin.String){ - APACHE_LICENSE_2PERIOD0("Apache License 2.0"), - MIT_LICENSE("MIT License"), - ABSTYLES_LICENSE("Abstyles License"), - ACADEMIC_FREE_LICENSE_V1PERIOD1("Academic Free License v1.1"), - ACADEMIC_FREE_LICENSE_V1PERIOD2("Academic Free License v1.2"), - ACADEMIC_FREE_LICENSE_V2PERIOD0("Academic Free License v2.0"), - ACADEMIC_FREE_LICENSE_V2PERIOD1("Academic Free License v2.1"), - ACADEMIC_FREE_LICENSE_V3PERIOD0("Academic Free License v3.0"), - AFFERO_GENERAL_PUBLIC_LICENSE_V1PERIOD0("Affero General Public License v1.0"), - APACHE_LICENSE_1PERIOD0("Apache License 1.0"), - APACHE_LICENSE_1PERIOD1("Apache License 1.1"), - ARTISTIC_LICENSE_1PERIOD0("Artistic License 1.0"), - ARTISTIC_LICENSE_2PERIOD0("Artistic License 2.0"), - BSD_2CLAUSE_LICENSE("BSD 2-clause License"), - BSD_3CLAUSE_LICENSE("BSD 3-clause License"), - BSD_4CLAUSE_LICENSE("BSD 4-clause License"), - CREATIVE_COMMONS_CC0_1PERIOD0_UNIVERSAL("Creative Commons CC0 1.0 Universal"), - ECLIPSE_PUBLIC_LICENSE_1PERIOD0("Eclipse Public License 1.0"), - EDUCATIONAL_COMMUNITY_LICENSE_V1PERIOD0("Educational Community License v1.0"), - EDUCATIONAL_COMMUNITY_LICENSE_V2PERIOD0("Educational Community License v2.0"), - GNU_AFFERO_GENERAL_PUBLIC_LICENSE_V3PERIOD0("GNU Affero General Public License v3.0"), - GNU_FREE_DOCUMENTATION_LICENSE_V1PERIOD1("GNU Free Documentation License v1.1"), - GNU_FREE_DOCUMENTATION_LICENSE_V1PERIOD2("GNU Free Documentation License v1.2"), - GNU_FREE_DOCUMENTATION_LICENSE_V1PERIOD3("GNU Free Documentation License v1.3"), - GNU_GENERAL_PUBLIC_LICENSE_V1PERIOD0("GNU General Public License v1.0"), - GNU_GENERAL_PUBLIC_LICENSE_V2PERIOD0("GNU General Public License v2.0"), - GNU_GENERAL_PUBLIC_LICENSE_V3PERIOD0("GNU General Public License v3.0"), - GNU_LESSER_GENERAL_PUBLIC_LICENSE_V2PERIOD1("GNU Lesser General Public License v2.1"), - GNU_LESSER_GENERAL_PUBLIC_LICENSE_V3PERIOD0("GNU Lesser General Public License v3.0"), - GNU_LIBRARY_GENERAL_PUBLIC_LICENSE_V2PERIOD0("GNU Library General Public License v2.0"), - ISC_LICENSE("ISC license"), - MOZILLA_PUBLIC_LICENSE_1PERIOD0("Mozilla Public License 1.0"), - MOZILLA_PUBLIC_LICENSE_1PERIOD1("Mozilla Public License 1.1"), - MOZILLA_PUBLIC_LICENSE_2PERIOD03("Mozilla Public License 2.03"); - } -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/EditExperimentPost.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/EditExperimentPost.kt deleted file mode 100644 index d045e81..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/EditExperimentPost.kt +++ /dev/null @@ -1,23 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * - * @param name - */ -data class EditExperimentPost ( - - val name: kotlin.String -) { -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentKeys.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentKeys.kt index c10bc75..a4c054c 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentKeys.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentKeys.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookEvents.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentMetricsResponse.kt similarity index 82% rename from Kotlin/src/main/kotlin/io/swagger/client/models/WebhookEvents.kt rename to Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentMetricsResponse.kt index 4ba5f4b..73f1b60 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookEvents.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentMetricsResponse.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -13,9 +13,9 @@ package io.swagger.client.models /** - * Determines what events the hook is triggered format. + * Map of experiment IDs to their metrics by path */ -class WebhookEvents ( +class ExperimentMetricsResponse ( ) { } \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentsResponse.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentsResponse.kt new file mode 100644 index 0000000..881350f --- /dev/null +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentsResponse.kt @@ -0,0 +1,31 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.models + +import io.swagger.client.models.SlashcomponentsSlashschemasSlashExperimentyaml + +/** + * + * @param experiments Map of experiment ID to experiment details + * @param isEditor Whether the authenticated user can edit experiments in this repo + * @param nextPageToken Pagination token for the next page of results (empty string when no more pages) + */ +data class ExperimentsResponse ( + + /* Map of experiment ID to experiment details */ + val experiments: kotlin.collections.Map? = null, + /* Whether the authenticated user can edit experiments in this repo */ + val isEditor: kotlin.Boolean? = null, + /* Pagination token for the next page of results (empty string when no more pages) */ + val nextPageToken: kotlin.String? = null +) { +} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Files.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Files.kt index e81a5da..ca9a473 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Files.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Files.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,6 +11,7 @@ */ package io.swagger.client.models +import io.swagger.client.models.SlashcomponentsSlashschemasSlashFileyaml /** * diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Files_1.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Files_1.kt index d04c64c..94d0c20 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Files_1.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Files_1.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,17 +11,17 @@ */ package io.swagger.client.models +import io.swagger.client.models.SlashcomponentsSlashschemasSlashFileyaml /** * * @param entries - * @param limit - * @param nextToken + * @param nextToken Next token to continue pagination from */ data class Files1 ( - val entries: kotlin.Array? = null, - val limit: kotlin.Int? = null, + val entries: kotlin.Array? = null, + /* Next token to continue pagination from */ val nextToken: kotlin.String? = null ) { } \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Hooks_id_body.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Hooks_id_body.kt deleted file mode 100644 index 7bf8099..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Hooks_id_body.kt +++ /dev/null @@ -1,30 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - -import io.swagger.client.models.WebhookConfig -import io.swagger.client.models.WebhookEvents - -/** - * - * @param config - * @param events - * @param active Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. - */ -data class HooksIdBody ( - - val config: WebhookConfig? = null, - val events: WebhookEvents? = null, - /* Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. */ - val active: kotlin.Boolean? = null -) { -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Integration.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Integration.kt index 40e3e47..97c2a22 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Integration.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Integration.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,7 +11,6 @@ */ package io.swagger.client.models -import io.swagger.client.models.IntegrationInner /** * diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Integration_inner.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Integration_inner.kt deleted file mode 100644 index acd6996..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Integration_inner.kt +++ /dev/null @@ -1,38 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * - * @param name Name/path of the bucket - * @param protocol Protocol used by the integration - * @param listPath URL to list the root of this bucket - */ -data class IntegrationInner ( - - /* Name/path of the bucket */ - val name: kotlin.String? = null, - /* Protocol used by the integration */ - val protocol: IntegrationInner.Protocol? = null, - /* URL to list the root of this bucket */ - val listPath: kotlin.String? = null -) { - /** - * Protocol used by the integration - * Values: S3,GS - */ - enum class Protocol(val value: kotlin.String){ - S3("s3"), - GS("gs"); - } -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue.kt index a30de7d..689bee9 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,17 +11,12 @@ */ package io.swagger.client.models -import io.swagger.client.models.Body -import io.swagger.client.models.IssueAssignee -import io.swagger.client.models.IssueLabels -import io.swagger.client.models.IssueMilestone -import io.swagger.client.models.Title -import io.swagger.client.models.User +import io.swagger.client.models.SlashcomponentsSlashschemasSlashUseryaml /** * * @param id - * @param number + * @param number Issue index within the repository * @param user * @param title * @param body @@ -32,24 +27,32 @@ import io.swagger.client.models.User * @param comments * @param createdAt * @param updatedAt - * @param pullRequest - * @param closed + * @param pullRequest Present when the issue is associated with a pull request */ data class Issue ( - val id: kotlin.Int? = null, - val number: kotlin.Int? = null, - val user: User? = null, - val title: Title, - val body: Body, - val labels: kotlin.Array, - val milestone: IssueMilestone, - val assignee: IssueAssignee, - val state: kotlin.String? = null, + val id: kotlin.Long? = null, + /* Issue index within the repository */ + val number: kotlin.Long? = null, + val user: SlashcomponentsSlashschemasSlashUseryaml? = null, + val title: kotlin.String? = null, + val body: kotlin.String? = null, + val labels: kotlin.Array? = null, + val milestone: kotlin.Any? = null, + val assignee: SlashcomponentsSlashschemasSlashUseryaml? = null, + val state: Issue.State? = null, val comments: kotlin.Int? = null, - val createdAt: kotlin.String? = null, - val updatedAt: kotlin.String? = null, - val pullRequest: kotlin.Any? = null, - val closed: kotlin.Boolean + val createdAt: java.time.LocalDateTime? = null, + val updatedAt: java.time.LocalDateTime? = null, + /* Present when the issue is associated with a pull request */ + val pullRequest: kotlin.Any? = null ) { + /** + * + * Values: OPEN,CLOSED + */ + enum class State(val value: kotlin.String){ + OPEN("open"), + CLOSED("closed"); + } } \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_assignee.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_assignee.kt deleted file mode 100644 index 090cd33..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_assignee.kt +++ /dev/null @@ -1,31 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * - * @param id - * @param login - * @param fullName - * @param avatarUrl - * @param username - */ -data class IssueAssignee ( - - val id: kotlin.Int? = null, - val login: kotlin.String? = null, - val fullName: kotlin.String? = null, - val avatarUrl: kotlin.String? = null, - val username: kotlin.String? = null -) { -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_labels.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_labels.kt deleted file mode 100644 index 0138cc8..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_labels.kt +++ /dev/null @@ -1,29 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * - * @param id - * @param name - * @param color - * @param url - */ -data class IssueLabels ( - - val id: kotlin.Int? = null, - val name: kotlin.String? = null, - val color: kotlin.String? = null, - val url: kotlin.String? = null -) { -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_milestone.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_milestone.kt deleted file mode 100644 index 4ad4633..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_milestone.kt +++ /dev/null @@ -1,37 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * - * @param id - * @param title - * @param description - * @param state - * @param openIssues - * @param closedIssues - * @param closedAt - * @param dueOn - */ -data class IssueMilestone ( - - val id: kotlin.Int? = null, - val title: kotlin.String? = null, - val description: kotlin.String? = null, - val state: kotlin.String? = null, - val openIssues: kotlin.Int? = null, - val closedIssues: kotlin.Int? = null, - val closedAt: kotlin.String? = null, - val dueOn: kotlin.String? = null -) { -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Issues.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Issues.kt index e3d4521..6ced3be 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Issues.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Issues.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,7 +11,7 @@ */ package io.swagger.client.models -import io.swagger.client.models.Issue +import io.swagger.client.models.SlashcomponentsSlashschemasSlashIssueyaml /** * diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Labels.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Labels.kt deleted file mode 100644 index 43de279..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Labels.kt +++ /dev/null @@ -1,21 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * Labels **ID** to associate with this issue. **Note:** Only users with write access can set labels for new issues. Labels are silently dropped otherwise. - */ -class Labels ( - -) { -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/MigrateRepo.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/MigrateRepo.kt deleted file mode 100644 index ac0c8f9..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/MigrateRepo.kt +++ /dev/null @@ -1,53 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * - * @param cloneAddr Remote Git address (HTTP/HTTPS URL or local path) - * @param authUsername Authorization username - * @param authPassword Authorization password - * @param userId User ID who takes ownership of this repository - * @param repoName Name of the repository - * @param mirror Repository will be a mirror (connected repository). - * @param visibility Repository will be private or public. - * @param description Description of the repository - */ -data class MigrateRepo ( - - /* Remote Git address (HTTP/HTTPS URL or local path) */ - val cloneAddr: kotlin.String, - /* Authorization username */ - val authUsername: kotlin.String? = null, - /* Authorization password */ - val authPassword: kotlin.String? = null, - /* User ID who takes ownership of this repository */ - val userId: kotlin.Int, - /* Name of the repository */ - val repoName: kotlin.String? = null, - /* Repository will be a mirror (connected repository). */ - val mirror: kotlin.Boolean? = null, - /* Repository will be private or public. */ - val visibility: MigrateRepo.Visibility? = null, - /* Description of the repository */ - val description: kotlin.String? = null -) { - /** - * Repository will be private or public. - * Values: PRIVATE,PUBLIC - */ - enum class Visibility(val value: kotlin.String){ - PRIVATE("private"), - PUBLIC("public"); - } -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Milestone.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Milestone.kt deleted file mode 100644 index 3d54032..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Milestone.kt +++ /dev/null @@ -1,15 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -typealias Milestone = kotlin.Int diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/PatchIssue.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/PatchIssue.kt index 4bba50e..1d5262b 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/PatchIssue.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/PatchIssue.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,11 +11,11 @@ */ package io.swagger.client.models -import io.swagger.client.models.Assignee -import io.swagger.client.models.Body -import io.swagger.client.models.Milestone -import io.swagger.client.models.State -import io.swagger.client.models.Title +import io.swagger.client.models.SlashcomponentsSlashschemasSlashAssigneeyaml +import io.swagger.client.models.SlashcomponentsSlashschemasSlashBodyyaml +import io.swagger.client.models.SlashcomponentsSlashschemasSlashMilestoneyaml +import io.swagger.client.models.SlashcomponentsSlashschemasSlashStateyaml +import io.swagger.client.models.SlashcomponentsSlashschemasSlashTitleyaml /** * @@ -27,10 +27,10 @@ import io.swagger.client.models.Title */ data class PatchIssue ( - val title: Title? = null, - val body: Body? = null, - val assignee: Assignee? = null, - val milestone: Milestone? = null, - val state: State? = null + val title: SlashcomponentsSlashschemasSlashTitleyaml? = null, + val body: SlashcomponentsSlashschemasSlashBodyyaml? = null, + val assignee: SlashcomponentsSlashschemasSlashAssigneeyaml? = null, + val milestone: SlashcomponentsSlashschemasSlashMilestoneyaml? = null, + val state: SlashcomponentsSlashschemasSlashStateyaml? = null ) { } \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/PostIssue.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/PostIssue.kt index 6e6caf0..0b11fbe 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/PostIssue.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/PostIssue.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,12 +11,12 @@ */ package io.swagger.client.models -import io.swagger.client.models.Assignee -import io.swagger.client.models.Body -import io.swagger.client.models.Closed -import io.swagger.client.models.Labels -import io.swagger.client.models.Milestone -import io.swagger.client.models.Title +import io.swagger.client.models.SlashcomponentsSlashschemasSlashAssigneeyaml +import io.swagger.client.models.SlashcomponentsSlashschemasSlashBodyyaml +import io.swagger.client.models.SlashcomponentsSlashschemasSlashClosedyaml +import io.swagger.client.models.SlashcomponentsSlashschemasSlashLabelsyaml +import io.swagger.client.models.SlashcomponentsSlashschemasSlashMilestoneyaml +import io.swagger.client.models.SlashcomponentsSlashschemasSlashTitleyaml /** * @@ -29,11 +29,11 @@ import io.swagger.client.models.Title */ data class PostIssue ( - val title: Title? = null, - val body: Body? = null, - val assignee: Assignee? = null, - val milestone: Milestone? = null, - val labels: Labels? = null, - val closed: Closed? = null + val title: SlashcomponentsSlashschemasSlashTitleyaml? = null, + val body: SlashcomponentsSlashschemasSlashBodyyaml? = null, + val assignee: SlashcomponentsSlashschemasSlashAssigneeyaml? = null, + val milestone: SlashcomponentsSlashschemasSlashMilestoneyaml? = null, + val labels: SlashcomponentsSlashschemasSlashLabelsyaml? = null, + val closed: SlashcomponentsSlashschemasSlashClosedyaml? = null ) { } \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/PutFile.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/PutFile.kt index 3c698a8..314e3c3 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/PutFile.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/PutFile.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Repo_hooks_body.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Repo_hooks_body.kt deleted file mode 100644 index 8f939ae..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Repo_hooks_body.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - -import io.swagger.client.models.WebhookConfig -import io.swagger.client.models.WebhookEvents - -/** - * - * @param type The type of webhook - * @param config - * @param events - */ -data class RepoHooksBody ( - - /* The type of webhook */ - val type: RepoHooksBody.Type, - val config: WebhookConfig, - val events: WebhookEvents? = null -) { - /** - * The type of webhook - * Values: DAGSHUB,SLACK,DISCORD,DINGTALK - */ - enum class Type(val value: kotlin.String){ - DAGSHUB("dagshub"), - SLACK("slack"), - DISCORD("discord"), - DINGTALK("dingtalk"); - } -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/State.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/State.kt deleted file mode 100644 index 5580d38..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/State.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * - * Values: OPEN,CLOSED - */ -enum class State(val value: kotlin.String){ - OPEN("open"),// :/ - CLOSED("closed");// :/ -} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Title.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Title.kt deleted file mode 100644 index 35b20be..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Title.kt +++ /dev/null @@ -1,15 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -typealias Title = kotlin.String diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/User.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/User.kt index 2fa4c2c..a12c78d 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/User.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/User.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -16,16 +16,25 @@ package io.swagger.client.models * * @param id * @param login + * @param username Alias for login (legacy compatibility) * @param fullName * @param avatarUrl - * @param username + * @param publicEmail + * @param website + * @param company + * @param description */ data class User ( - val id: kotlin.Int? = null, + val id: kotlin.Long? = null, val login: kotlin.String? = null, + /* Alias for login (legacy compatibility) */ + val username: kotlin.String? = null, val fullName: kotlin.String? = null, val avatarUrl: kotlin.String? = null, - val username: kotlin.String? = null + val publicEmail: kotlin.String? = null, + val website: kotlin.String? = null, + val company: kotlin.String? = null, + val description: kotlin.String? = null ) { } \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookConfig.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookConfig.kt deleted file mode 100644 index d8b056e..0000000 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookConfig.kt +++ /dev/null @@ -1,38 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.models - - -/** - * Key/value pairs to provide settings for this hook - * @param url A string defining the URL to which the payloads will be delivered. - * @param contentType A string defining the media type used to serialize the payloads. - * @param secret An optional string that's passed with the HTTP requests body. - */ -data class WebhookConfig ( - - /* A string defining the URL to which the payloads will be delivered. */ - val url: kotlin.String, - /* A string defining the media type used to serialize the payloads. */ - val contentType: WebhookConfig.ContentType, - /* An optional string that's passed with the HTTP requests body. */ - val secret: kotlin.String? = null -) { - /** - * A string defining the media type used to serialize the payloads. - * Values: JSON,FORM - */ - enum class ContentType(val value: kotlin.String){ - JSON("json"), - FORM("form"); - } -} \ No newline at end of file diff --git a/Python/.gitignore b/Python/.gitignore deleted file mode 100644 index a655050..0000000 --- a/Python/.gitignore +++ /dev/null @@ -1,64 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.python-version - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/Python/.swagger-codegen-ignore b/Python/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/Python/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/Python/.swagger-codegen/VERSION b/Python/.swagger-codegen/VERSION deleted file mode 100644 index 053a355..0000000 --- a/Python/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.35 \ No newline at end of file diff --git a/Python/.travis.yml b/Python/.travis.yml deleted file mode 100644 index dd6c445..0000000 --- a/Python/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.2" - - "3.3" - - "3.4" - - "3.5" - #- "3.5-dev" # 3.5 development branch - #- "nightly" # points to the latest development branch e.g. 3.6-dev -# command to install dependencies -install: "pip install -r requirements.txt" -# command to run tests -script: nosetests diff --git a/Python/README.md b/Python/README.md deleted file mode 100644 index e96adb5..0000000 --- a/Python/README.md +++ /dev/null @@ -1,190 +0,0 @@ -# dagshub-api -This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - -This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - -- API version: 1.0.2 -- Package version: 1.0.3 -- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen - -## Requirements. - -Python 2.7 and 3.4+ - -## Installation & Usage -### pip install - -If the python package is hosted on Github, you can install directly from Github - -```sh -pip install git+https://github.com/DagsHub/api-clients.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/DagsHub/api-clients.git`) - -Then import the package: -```python -import dagshub_api -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import dagshub_api -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.BranchesApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -branch = 'branch_example' # str | branch of the repository - -try: - # Get Branch - api_instance.get_branch(owner, repo, branch) -except ApiException as e: - print("Exception when calling BranchesApi->get_branch: %s\n" % e) -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.BranchesApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository - -try: - # List Branches - api_instance.list_branches(owner, repo) -except ApiException as e: - print("Exception when calling BranchesApi->list_branches: %s\n" % e) -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://dagshub.com/api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*BranchesApi* | [**get_branch**](docs/BranchesApi.md#get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -*BranchesApi* | [**list_branches**](docs/BranchesApi.md#list_branches) | **GET** /repos/{owner}/{repo}/branches | List Branches -*CollaboratorsApi* | [**add_collaborator**](docs/CollaboratorsApi.md#add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -*CollaboratorsApi* | [**get_collaborators**](docs/CollaboratorsApi.md#get_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -*CollaboratorsApi* | [**remove_collaborator**](docs/CollaboratorsApi.md#remove_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator -*CommitsApi* | [**get_commit**](docs/CommitsApi.md#get_commit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit -*ContentApi* | [**get_archive**](docs/ContentApi.md#get_archive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -*ContentApi* | [**get_content**](docs/ContentApi.md#get_content) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -*ContentApi* | [**get_raw**](docs/ContentApi.md#get_raw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -*ContentApi* | [**upload_content**](docs/ContentApi.md#upload_content) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository -*ExperimentsApi* | [**add_experiment_label**](docs/ExperimentsApi.md#add_experiment_label) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -*ExperimentsApi* | [**delete_experiment**](docs/ExperimentsApi.md#delete_experiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -*ExperimentsApi* | [**delete_experiment_label**](docs/ExperimentsApi.md#delete_experiment_label) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -*ExperimentsApi* | [**edit_experiment**](docs/ExperimentsApi.md#edit_experiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -*ExperimentsApi* | [**get_experiment_metrics**](docs/ExperimentsApi.md#get_experiment_metrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -*ExperimentsApi* | [**get_experiments**](docs/ExperimentsApi.md#get_experiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments -*IssuesApi* | [**create_issue**](docs/IssuesApi.md#create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -*IssuesApi* | [**edit_issue**](docs/IssuesApi.md#edit_issue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -*IssuesApi* | [**get_issue**](docs/IssuesApi.md#get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -*IssuesApi* | [**list_repo_issues**](docs/IssuesApi.md#list_repo_issues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository -*ReleasesApi* | [**list_releases**](docs/ReleasesApi.md#list_releases) | **GET** /repos/{owner}/{repo}/releases | List Releases -*RepositoryApi* | [**create_org_repo**](docs/RepositoryApi.md#create_org_repo) | **POST** /org/{orgname}/repos | Create in organization -*RepositoryApi* | [**create_repo**](docs/RepositoryApi.md#create_repo) | **POST** /user/repos | Create -*RepositoryApi* | [**get_repo**](docs/RepositoryApi.md#get_repo) | **GET** /repos/{owner}/{repo} | Get repository information -*RepositoryApi* | [**list_my_repos**](docs/RepositoryApi.md#list_my_repos) | **GET** /user/repos | List your repositories -*RepositoryApi* | [**list_org_repos**](docs/RepositoryApi.md#list_org_repos) | **GET** /orgs/{orgname}/repos | List organization repositories -*RepositoryApi* | [**list_user_repos**](docs/RepositoryApi.md#list_user_repos) | **GET** /users/{username}/repos | List user repositories -*RepositoryApi* | [**migrate_repo**](docs/RepositoryApi.md#migrate_repo) | **POST** /repos/migrate | Migrate repository -*RepositoryApi* | [**search**](docs/RepositoryApi.md#search) | **GET** /repos/search | Search repositories -*StorageIntegrationsApi* | [**get_bucket_content**](docs/StorageIntegrationsApi.md#get_bucket_content) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -*StorageIntegrationsApi* | [**get_bucket_file**](docs/StorageIntegrationsApi.md#get_bucket_file) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -*StorageIntegrationsApi* | [**get_buckets**](docs/StorageIntegrationsApi.md#get_buckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository -*UserApi* | [**get_authenticated_user**](docs/UserApi.md#get_authenticated_user) | **GET** /user | Get authenticated user information -*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **GET** /users/{username} | Get information about a user -*WebhooksApi* | [**create_hook**](docs/WebhooksApi.md#create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -*WebhooksApi* | [**delete_hook**](docs/WebhooksApi.md#delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -*WebhooksApi* | [**edit_hook**](docs/WebhooksApi.md#edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -*WebhooksApi* | [**list_hooks**](docs/WebhooksApi.md#list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - -## Documentation For Models - - - [Assignee](docs/Assignee.md) - - [Body](docs/Body.md) - - [Closed](docs/Closed.md) - - [CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) - - [CreateRepo](docs/CreateRepo.md) - - [EditExperimentPost](docs/EditExperimentPost.md) - - [ExperimentKeys](docs/ExperimentKeys.md) - - [File](docs/File.md) - - [Files](docs/Files.md) - - [Files1](docs/Files1.md) - - [HooksIdBody](docs/HooksIdBody.md) - - [Integration](docs/Integration.md) - - [IntegrationInner](docs/IntegrationInner.md) - - [Issue](docs/Issue.md) - - [IssueAssignee](docs/IssueAssignee.md) - - [IssueLabels](docs/IssueLabels.md) - - [IssueMilestone](docs/IssueMilestone.md) - - [Issues](docs/Issues.md) - - [Labels](docs/Labels.md) - - [MigrateRepo](docs/MigrateRepo.md) - - [Milestone](docs/Milestone.md) - - [PatchIssue](docs/PatchIssue.md) - - [PostIssue](docs/PostIssue.md) - - [PutFile](docs/PutFile.md) - - [RepoHooksBody](docs/RepoHooksBody.md) - - [State](docs/State.md) - - [Title](docs/Title.md) - - [User](docs/User.md) - - [WebhookConfig](docs/WebhookConfig.md) - - [WebhookEvents](docs/WebhookEvents.md) - -## Documentation For Authorization - - -## basicAuth - -- **Type**: HTTP basic authentication - -## tokenAuth - -- **Type**: API key -- **API key parameter name**: token -- **Location**: URL query string - - -## Author - - diff --git a/Python/dagshub_api/__init__.py b/Python/dagshub_api/__init__.py deleted file mode 100644 index 3e1e284..0000000 --- a/Python/dagshub_api/__init__.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from dagshub_api.api.branches_api import BranchesApi -from dagshub_api.api.collaborators_api import CollaboratorsApi -from dagshub_api.api.commits_api import CommitsApi -from dagshub_api.api.content_api import ContentApi -from dagshub_api.api.experiments_api import ExperimentsApi -from dagshub_api.api.issues_api import IssuesApi -from dagshub_api.api.releases_api import ReleasesApi -from dagshub_api.api.repository_api import RepositoryApi -from dagshub_api.api.storage_integrations_api import StorageIntegrationsApi -from dagshub_api.api.user_api import UserApi -from dagshub_api.api.webhooks_api import WebhooksApi -# import ApiClient -from dagshub_api.api_client import ApiClient -from dagshub_api.configuration import Configuration -# import models into sdk package -from dagshub_api.models.assignee import Assignee -from dagshub_api.models.body import Body -from dagshub_api.models.closed import Closed -from dagshub_api.models.collaborators_collaborator_body import CollaboratorsCollaboratorBody -from dagshub_api.models.create_repo import CreateRepo -from dagshub_api.models.edit_experiment_post import EditExperimentPost -from dagshub_api.models.experiment_keys import ExperimentKeys -from dagshub_api.models.file import File -from dagshub_api.models.files import Files -from dagshub_api.models.files1 import Files1 -from dagshub_api.models.hooks_id_body import HooksIdBody -from dagshub_api.models.integration import Integration -from dagshub_api.models.integration_inner import IntegrationInner -from dagshub_api.models.issue import Issue -from dagshub_api.models.issue_assignee import IssueAssignee -from dagshub_api.models.issue_labels import IssueLabels -from dagshub_api.models.issue_milestone import IssueMilestone -from dagshub_api.models.issues import Issues -from dagshub_api.models.labels import Labels -from dagshub_api.models.migrate_repo import MigrateRepo -from dagshub_api.models.milestone import Milestone -from dagshub_api.models.patch_issue import PatchIssue -from dagshub_api.models.post_issue import PostIssue -from dagshub_api.models.put_file import PutFile -from dagshub_api.models.repo_hooks_body import RepoHooksBody -from dagshub_api.models.state import State -from dagshub_api.models.title import Title -from dagshub_api.models.user import User -from dagshub_api.models.webhook_config import WebhookConfig -from dagshub_api.models.webhook_events import WebhookEvents diff --git a/Python/dagshub_api/api/__init__.py b/Python/dagshub_api/api/__init__.py deleted file mode 100644 index b7e9018..0000000 --- a/Python/dagshub_api/api/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from dagshub_api.api.branches_api import BranchesApi -from dagshub_api.api.collaborators_api import CollaboratorsApi -from dagshub_api.api.commits_api import CommitsApi -from dagshub_api.api.content_api import ContentApi -from dagshub_api.api.experiments_api import ExperimentsApi -from dagshub_api.api.issues_api import IssuesApi -from dagshub_api.api.releases_api import ReleasesApi -from dagshub_api.api.repository_api import RepositoryApi -from dagshub_api.api.storage_integrations_api import StorageIntegrationsApi -from dagshub_api.api.user_api import UserApi -from dagshub_api.api.webhooks_api import WebhooksApi diff --git a/Python/dagshub_api/api/branches_api.py b/Python/dagshub_api/api/branches_api.py deleted file mode 100644 index aceb09a..0000000 --- a/Python/dagshub_api/api/branches_api.py +++ /dev/null @@ -1,243 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class BranchesApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_branch(self, owner, repo, branch, **kwargs): # noqa: E501 - """Get Branch # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_branch(owner, repo, branch, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str branch: branch of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 - else: - (data) = self.get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 - return data - - def get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 - """Get Branch # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_branch_with_http_info(owner, repo, branch, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str branch: branch of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'branch'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_branch" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_branch`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_branch`") # noqa: E501 - # verify the required parameter 'branch' is set - if ('branch' not in params or - params['branch'] is None): - raise ValueError("Missing the required parameter `branch` when calling `get_branch`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'branch' in params: - path_params['branch'] = params['branch'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/branches/{branch}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_branches(self, owner, repo, **kwargs): # noqa: E501 - """List Branches # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_branches(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def list_branches_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """List Branches # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_branches_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_branches" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `list_branches`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `list_branches`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/branches', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/collaborators_api.py b/Python/dagshub_api/api/collaborators_api.py deleted file mode 100644 index 86fb00a..0000000 --- a/Python/dagshub_api/api/collaborators_api.py +++ /dev/null @@ -1,352 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class CollaboratorsApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def add_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 - """Add user as a collaborator # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_collaborator(owner, repo, collaborator, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str collaborator: collaborator username (required) - :param CollaboratorsCollaboratorBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 - else: - (data) = self.add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 - return data - - def add_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 - """Add user as a collaborator # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_collaborator_with_http_info(owner, repo, collaborator, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str collaborator: collaborator username (required) - :param CollaboratorsCollaboratorBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'collaborator', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method add_collaborator" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `add_collaborator`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `add_collaborator`") # noqa: E501 - # verify the required parameter 'collaborator' is set - if ('collaborator' not in params or - params['collaborator'] is None): - raise ValueError("Missing the required parameter `collaborator` when calling `add_collaborator`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'collaborator' in params: - path_params['collaborator'] = params['collaborator'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/collaborators/{collaborator}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_collaborators(self, owner, repo, **kwargs): # noqa: E501 - """Get collaborators # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_collaborators(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.get_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def get_collaborators_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Get collaborators # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_collaborators_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_collaborators" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_collaborators`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_collaborators`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/collaborators', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def remove_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 - """Delete collaborator # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_collaborator(owner, repo, collaborator, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str collaborator: collaborator username (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.remove_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 - else: - (data) = self.remove_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 - return data - - def remove_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 - """Delete collaborator # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_collaborator_with_http_info(owner, repo, collaborator, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str collaborator: collaborator username (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'collaborator'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method remove_collaborator" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `remove_collaborator`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `remove_collaborator`") # noqa: E501 - # verify the required parameter 'collaborator' is set - if ('collaborator' not in params or - params['collaborator'] is None): - raise ValueError("Missing the required parameter `collaborator` when calling `remove_collaborator`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'collaborator' in params: - path_params['collaborator'] = params['collaborator'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/collaborators/{collaborator}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/commits_api.py b/Python/dagshub_api/api/commits_api.py deleted file mode 100644 index f147575..0000000 --- a/Python/dagshub_api/api/commits_api.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class CommitsApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_commit(self, owner, repo, sha, **kwargs): # noqa: E501 - """Get a single commit # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_commit(owner, repo, sha, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str sha: a SHA1 of a commit (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 - else: - (data) = self.get_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 - return data - - def get_commit_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 - """Get a single commit # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_commit_with_http_info(owner, repo, sha, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str sha: a SHA1 of a commit (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'sha'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_commit" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_commit`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_commit`") # noqa: E501 - # verify the required parameter 'sha' is set - if ('sha' not in params or - params['sha'] is None): - raise ValueError("Missing the required parameter `sha` when calling `get_commit`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'sha' in params: - path_params['sha'] = params['sha'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/commits/{sha}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/content_api.py b/Python/dagshub_api/api/content_api.py deleted file mode 100644 index 1462f5b..0000000 --- a/Python/dagshub_api/api/content_api.py +++ /dev/null @@ -1,531 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class ContentApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_archive(self, owner, repo, ref, format, **kwargs): # noqa: E501 - """Download archive # noqa: E501 - - This method returns archive by given format. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_archive(owner, repo, ref, format, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str ref: The name of the commit/branch/tag (required) - :param str format: The format of archive, either .zip or .tar.gz (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_archive_with_http_info(owner, repo, ref, format, **kwargs) # noqa: E501 - else: - (data) = self.get_archive_with_http_info(owner, repo, ref, format, **kwargs) # noqa: E501 - return data - - def get_archive_with_http_info(self, owner, repo, ref, format, **kwargs): # noqa: E501 - """Download archive # noqa: E501 - - This method returns archive by given format. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_archive_with_http_info(owner, repo, ref, format, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str ref: The name of the commit/branch/tag (required) - :param str format: The format of archive, either .zip or .tar.gz (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'ref', 'format'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_archive" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_archive`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_archive`") # noqa: E501 - # verify the required parameter 'ref' is set - if ('ref' not in params or - params['ref'] is None): - raise ValueError("Missing the required parameter `ref` when calling `get_archive`") # noqa: E501 - # verify the required parameter 'format' is set - if ('format' not in params or - params['format'] is None): - raise ValueError("Missing the required parameter `format` when calling `get_archive`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'ref' in params: - path_params['ref'] = params['ref'] # noqa: E501 - if 'format' in params: - path_params['format'] = params['format'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/archive/{ref}{format}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_content(self, owner, repo, branch, path, **kwargs): # noqa: E501 - """List data in a repository folder # noqa: E501 - - List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_content(owner, repo, branch, path, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str branch: branch of the repository (required) - :param str path: path of a folder in the repository (required) - :param bool include_size: - :return: Files - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_content_with_http_info(owner, repo, branch, path, **kwargs) # noqa: E501 - else: - (data) = self.get_content_with_http_info(owner, repo, branch, path, **kwargs) # noqa: E501 - return data - - def get_content_with_http_info(self, owner, repo, branch, path, **kwargs): # noqa: E501 - """List data in a repository folder # noqa: E501 - - List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_content_with_http_info(owner, repo, branch, path, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str branch: branch of the repository (required) - :param str path: path of a folder in the repository (required) - :param bool include_size: - :return: Files - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'branch', 'path', 'include_size'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_content" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_content`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_content`") # noqa: E501 - # verify the required parameter 'branch' is set - if ('branch' not in params or - params['branch'] is None): - raise ValueError("Missing the required parameter `branch` when calling `get_content`") # noqa: E501 - # verify the required parameter 'path' is set - if ('path' not in params or - params['path'] is None): - raise ValueError("Missing the required parameter `path` when calling `get_content`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'branch' in params: - path_params['branch'] = params['branch'] # noqa: E501 - if 'path' in params: - path_params['path'] = params['path'] # noqa: E501 - - query_params = [] - if 'include_size' in params: - query_params.append(('include_size', params['include_size'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/content/{branch}/{path}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Files', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_raw(self, owner, repo, ref, path, **kwargs): # noqa: E501 - """Download raw content # noqa: E501 - - This method returns the raw content of a file. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_raw(owner, repo, ref, path, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str ref: The name of the commit/branch/tag (required) - :param str path: The content path (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_raw_with_http_info(owner, repo, ref, path, **kwargs) # noqa: E501 - else: - (data) = self.get_raw_with_http_info(owner, repo, ref, path, **kwargs) # noqa: E501 - return data - - def get_raw_with_http_info(self, owner, repo, ref, path, **kwargs): # noqa: E501 - """Download raw content # noqa: E501 - - This method returns the raw content of a file. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_raw_with_http_info(owner, repo, ref, path, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str ref: The name of the commit/branch/tag (required) - :param str path: The content path (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'ref', 'path'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_raw" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_raw`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_raw`") # noqa: E501 - # verify the required parameter 'ref' is set - if ('ref' not in params or - params['ref'] is None): - raise ValueError("Missing the required parameter `ref` when calling `get_raw`") # noqa: E501 - # verify the required parameter 'path' is set - if ('path' not in params or - params['path'] is None): - raise ValueError("Missing the required parameter `path` when calling `get_raw`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'ref' in params: - path_params['ref'] = params['ref'] # noqa: E501 - if 'path' in params: - path_params['path'] = params['path'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/raw/{ref}/{path}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def upload_content(self, owner, repo, branch, path, **kwargs): # noqa: E501 - """Upload data to a repository # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.upload_content(owner, repo, branch, path, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str branch: branch of the repository (required) - :param str path: path of a folder in the repository (required) - :param str commit_summary: - :param str commit_message: - :param str commit_choice: - :param str last_commit: - :param str new_branch_name: - :param str versioning: - :param str files: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.upload_content_with_http_info(owner, repo, branch, path, **kwargs) # noqa: E501 - else: - (data) = self.upload_content_with_http_info(owner, repo, branch, path, **kwargs) # noqa: E501 - return data - - def upload_content_with_http_info(self, owner, repo, branch, path, **kwargs): # noqa: E501 - """Upload data to a repository # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.upload_content_with_http_info(owner, repo, branch, path, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str branch: branch of the repository (required) - :param str path: path of a folder in the repository (required) - :param str commit_summary: - :param str commit_message: - :param str commit_choice: - :param str last_commit: - :param str new_branch_name: - :param str versioning: - :param str files: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'branch', 'path', 'commit_summary', 'commit_message', 'commit_choice', 'last_commit', 'new_branch_name', 'versioning', 'files'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method upload_content" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `upload_content`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `upload_content`") # noqa: E501 - # verify the required parameter 'branch' is set - if ('branch' not in params or - params['branch'] is None): - raise ValueError("Missing the required parameter `branch` when calling `upload_content`") # noqa: E501 - # verify the required parameter 'path' is set - if ('path' not in params or - params['path'] is None): - raise ValueError("Missing the required parameter `path` when calling `upload_content`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'branch' in params: - path_params['branch'] = params['branch'] # noqa: E501 - if 'path' in params: - path_params['path'] = params['path'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - if 'commit_summary' in params: - form_params.append(('commit_summary', params['commit_summary'])) # noqa: E501 - if 'commit_message' in params: - form_params.append(('commit_message', params['commit_message'])) # noqa: E501 - if 'commit_choice' in params: - form_params.append(('commit_choice', params['commit_choice'])) # noqa: E501 - if 'last_commit' in params: - form_params.append(('last_commit', params['last_commit'])) # noqa: E501 - if 'new_branch_name' in params: - form_params.append(('new_branch_name', params['new_branch_name'])) # noqa: E501 - if 'versioning' in params: - form_params.append(('versioning', params['versioning'])) # noqa: E501 - if 'files' in params: - form_params.append(('files', params['files'])) # noqa: E501 - - body_params = None - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['multipart/form-data']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/content/{branch}/{path}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/experiments_api.py b/Python/dagshub_api/api/experiments_api.py deleted file mode 100644 index 66709e3..0000000 --- a/Python/dagshub_api/api/experiments_api.py +++ /dev/null @@ -1,705 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class ExperimentsApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def add_experiment_label(self, owner, repo, experiment_key, experiment_label, **kwargs): # noqa: E501 - """Add label to experiment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_experiment_label(owner, repo, experiment_key, experiment_label, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str experiment_key: a valid experiment key (required) - :param str experiment_label: A label for the experiment, max 128 characters. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_experiment_label_with_http_info(owner, repo, experiment_key, experiment_label, **kwargs) # noqa: E501 - else: - (data) = self.add_experiment_label_with_http_info(owner, repo, experiment_key, experiment_label, **kwargs) # noqa: E501 - return data - - def add_experiment_label_with_http_info(self, owner, repo, experiment_key, experiment_label, **kwargs): # noqa: E501 - """Add label to experiment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_experiment_label_with_http_info(owner, repo, experiment_key, experiment_label, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str experiment_key: a valid experiment key (required) - :param str experiment_label: A label for the experiment, max 128 characters. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'experiment_key', 'experiment_label'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method add_experiment_label" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `add_experiment_label`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `add_experiment_label`") # noqa: E501 - # verify the required parameter 'experiment_key' is set - if ('experiment_key' not in params or - params['experiment_key'] is None): - raise ValueError("Missing the required parameter `experiment_key` when calling `add_experiment_label`") # noqa: E501 - # verify the required parameter 'experiment_label' is set - if ('experiment_label' not in params or - params['experiment_label'] is None): - raise ValueError("Missing the required parameter `experiment_label` when calling `add_experiment_label`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'experiment_key' in params: - path_params['experimentKey'] = params['experiment_key'] # noqa: E501 - if 'experiment_label' in params: - path_params['experimentLabel'] = params['experiment_label'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_experiment(self, owner, repo, experiment_key, **kwargs): # noqa: E501 - """Delete experiment # noqa: E501 - - Support both git and MLflow experiments # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_experiment(owner, repo, experiment_key, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str experiment_key: a valid experiment key (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_experiment_with_http_info(owner, repo, experiment_key, **kwargs) # noqa: E501 - else: - (data) = self.delete_experiment_with_http_info(owner, repo, experiment_key, **kwargs) # noqa: E501 - return data - - def delete_experiment_with_http_info(self, owner, repo, experiment_key, **kwargs): # noqa: E501 - """Delete experiment # noqa: E501 - - Support both git and MLflow experiments # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_experiment_with_http_info(owner, repo, experiment_key, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str experiment_key: a valid experiment key (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'experiment_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_experiment" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `delete_experiment`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `delete_experiment`") # noqa: E501 - # verify the required parameter 'experiment_key' is set - if ('experiment_key' not in params or - params['experiment_key'] is None): - raise ValueError("Missing the required parameter `experiment_key` when calling `delete_experiment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'experiment_key' in params: - path_params['experimentKey'] = params['experiment_key'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/experiments/experiment/{experimentKey}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_experiment_label(self, owner, repo, experiment_key, experiment_label, **kwargs): # noqa: E501 - """Delete experiment label # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_experiment_label(owner, repo, experiment_key, experiment_label, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str experiment_key: a valid experiment key (required) - :param str experiment_label: A label for the experiment, max 128 characters. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_experiment_label_with_http_info(owner, repo, experiment_key, experiment_label, **kwargs) # noqa: E501 - else: - (data) = self.delete_experiment_label_with_http_info(owner, repo, experiment_key, experiment_label, **kwargs) # noqa: E501 - return data - - def delete_experiment_label_with_http_info(self, owner, repo, experiment_key, experiment_label, **kwargs): # noqa: E501 - """Delete experiment label # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_experiment_label_with_http_info(owner, repo, experiment_key, experiment_label, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str experiment_key: a valid experiment key (required) - :param str experiment_label: A label for the experiment, max 128 characters. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'experiment_key', 'experiment_label'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_experiment_label" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `delete_experiment_label`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `delete_experiment_label`") # noqa: E501 - # verify the required parameter 'experiment_key' is set - if ('experiment_key' not in params or - params['experiment_key'] is None): - raise ValueError("Missing the required parameter `experiment_key` when calling `delete_experiment_label`") # noqa: E501 - # verify the required parameter 'experiment_label' is set - if ('experiment_label' not in params or - params['experiment_label'] is None): - raise ValueError("Missing the required parameter `experiment_label` when calling `delete_experiment_label`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'experiment_key' in params: - path_params['experimentKey'] = params['experiment_key'] # noqa: E501 - if 'experiment_label' in params: - path_params['experimentLabel'] = params['experiment_label'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def edit_experiment(self, owner, repo, experiment_key, **kwargs): # noqa: E501 - """Edit experiment info # noqa: E501 - - Edit experiment info, currently supports just changing experiment name. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_experiment(owner, repo, experiment_key, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str experiment_key: a valid experiment key (required) - :param EditExperimentPost body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.edit_experiment_with_http_info(owner, repo, experiment_key, **kwargs) # noqa: E501 - else: - (data) = self.edit_experiment_with_http_info(owner, repo, experiment_key, **kwargs) # noqa: E501 - return data - - def edit_experiment_with_http_info(self, owner, repo, experiment_key, **kwargs): # noqa: E501 - """Edit experiment info # noqa: E501 - - Edit experiment info, currently supports just changing experiment name. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_experiment_with_http_info(owner, repo, experiment_key, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str experiment_key: a valid experiment key (required) - :param EditExperimentPost body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'experiment_key', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method edit_experiment" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `edit_experiment`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `edit_experiment`") # noqa: E501 - # verify the required parameter 'experiment_key' is set - if ('experiment_key' not in params or - params['experiment_key'] is None): - raise ValueError("Missing the required parameter `experiment_key` when calling `edit_experiment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'experiment_key' in params: - path_params['experimentKey'] = params['experiment_key'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/experiments/experiment/{experimentKey}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_experiment_metrics(self, owner, repo, **kwargs): # noqa: E501 - """Get experiment metrics for experiment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_experiment_metrics(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param ExperimentKeys body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_experiment_metrics_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.get_experiment_metrics_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def get_experiment_metrics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Get experiment metrics for experiment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_experiment_metrics_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param ExperimentKeys body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_experiment_metrics" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_experiment_metrics`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_experiment_metrics`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/experiments/metricsForExperiments', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_experiments(self, owner, repo, **kwargs): # noqa: E501 - """List Experiments # noqa: E501 - - Get a list of experiments in the given repository # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_experiments(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_experiments_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.get_experiments_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def get_experiments_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """List Experiments # noqa: E501 - - Get a list of experiments in the given repository # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_experiments_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_experiments" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_experiments`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_experiments`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/experiments', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/issues_api.py b/Python/dagshub_api/api/issues_api.py deleted file mode 100644 index b99e16c..0000000 --- a/Python/dagshub_api/api/issues_api.py +++ /dev/null @@ -1,467 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class IssuesApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create_issue(self, owner, repo, **kwargs): # noqa: E501 - """Create an issue # noqa: E501 - - Any user with read access to a repository can create an issue. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_issue(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param PostIssue body: - :return: Issue - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_issue_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.create_issue_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def create_issue_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Create an issue # noqa: E501 - - Any user with read access to a repository can create an issue. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_issue_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param PostIssue body: - :return: Issue - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_issue" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `create_issue`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `create_issue`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/issues', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Issue', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def edit_issue(self, owner, repo, **kwargs): # noqa: E501 - """Edit an issue # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_issue(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param PatchIssue body: - :return: Issue - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.edit_issue_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.edit_issue_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def edit_issue_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Edit an issue # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_issue_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param PatchIssue body: - :return: Issue - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method edit_issue" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `edit_issue`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `edit_issue`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/issues', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Issue', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_issue(self, owner, repo, index, **kwargs): # noqa: E501 - """Get a single issue # noqa: E501 - - This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_issue(owner, repo, index, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param int index: the index of an issue or a pull request (required) - :return: Issue - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 - else: - (data) = self.get_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 - return data - - def get_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 - """Get a single issue # noqa: E501 - - This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_issue_with_http_info(owner, repo, index, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param int index: the index of an issue or a pull request (required) - :return: Issue - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'index'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_issue" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_issue`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_issue`") # noqa: E501 - # verify the required parameter 'index' is set - if ('index' not in params or - params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `get_issue`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'index' in params: - path_params['index'] = params['index'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Issue', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_repo_issues(self, owner, repo, **kwargs): # noqa: E501 - """List issues for a repository # noqa: E501 - - This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_repo_issues(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: Issues - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_repo_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.list_repo_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def list_repo_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """List issues for a repository # noqa: E501 - - This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_repo_issues_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: Issues - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_repo_issues" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `list_repo_issues`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `list_repo_issues`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/issues', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Issues', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/releases_api.py b/Python/dagshub_api/api/releases_api.py deleted file mode 100644 index 8b8dd20..0000000 --- a/Python/dagshub_api/api/releases_api.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class ReleasesApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_releases(self, owner, repo, **kwargs): # noqa: E501 - """List Releases # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_releases(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def list_releases_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """List Releases # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_releases_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_releases" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `list_releases`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `list_releases`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/releases', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/repository_api.py b/Python/dagshub_api/api/repository_api.py deleted file mode 100644 index 05ce112..0000000 --- a/Python/dagshub_api/api/repository_api.py +++ /dev/null @@ -1,785 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class RepositoryApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create_org_repo(self, orgname, **kwargs): # noqa: E501 - """Create in organization # noqa: E501 - - Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_org_repo(orgname, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str orgname: A DagsHub organization name (required) - :param CreateRepo body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_org_repo_with_http_info(orgname, **kwargs) # noqa: E501 - else: - (data) = self.create_org_repo_with_http_info(orgname, **kwargs) # noqa: E501 - return data - - def create_org_repo_with_http_info(self, orgname, **kwargs): # noqa: E501 - """Create in organization # noqa: E501 - - Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_org_repo_with_http_info(orgname, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str orgname: A DagsHub organization name (required) - :param CreateRepo body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['orgname', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_org_repo" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'orgname' is set - if ('orgname' not in params or - params['orgname'] is None): - raise ValueError("Missing the required parameter `orgname` when calling `create_org_repo`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'orgname' in params: - path_params['orgname'] = params['orgname'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/org/{orgname}/repos', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_repo(self, **kwargs): # noqa: E501 - """Create # noqa: E501 - - Create a new repository for the authenticated user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_repo(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CreateRepo body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_repo_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.create_repo_with_http_info(**kwargs) # noqa: E501 - return data - - def create_repo_with_http_info(self, **kwargs): # noqa: E501 - """Create # noqa: E501 - - Create a new repository for the authenticated user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_repo_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CreateRepo body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_repo" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/user/repos', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_repo(self, owner, repo, **kwargs): # noqa: E501 - """Get repository information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_repo(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_repo_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.get_repo_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def get_repo_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Get repository information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_repo_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_repo" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_repo`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_repo`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_my_repos(self, **kwargs): # noqa: E501 - """List your repositories # noqa: E501 - - List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_my_repos(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: object - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_my_repos_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_my_repos_with_http_info(**kwargs) # noqa: E501 - return data - - def list_my_repos_with_http_info(self, **kwargs): # noqa: E501 - """List your repositories # noqa: E501 - - List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_my_repos_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: object - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_my_repos" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/user/repos', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='object', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_org_repos(self, orgname, **kwargs): # noqa: E501 - """List organization repositories # noqa: E501 - - List repositories that are accessible to the authenticated user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_org_repos(orgname, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str orgname: A DagsHub organization name (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_org_repos_with_http_info(orgname, **kwargs) # noqa: E501 - else: - (data) = self.list_org_repos_with_http_info(orgname, **kwargs) # noqa: E501 - return data - - def list_org_repos_with_http_info(self, orgname, **kwargs): # noqa: E501 - """List organization repositories # noqa: E501 - - List repositories that are accessible to the authenticated user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_org_repos_with_http_info(orgname, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str orgname: A DagsHub organization name (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['orgname'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_org_repos" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'orgname' is set - if ('orgname' not in params or - params['orgname'] is None): - raise ValueError("Missing the required parameter `orgname` when calling `list_org_repos`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'orgname' in params: - path_params['orgname'] = params['orgname'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/orgs/{orgname}/repos', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_user_repos(self, username, **kwargs): # noqa: E501 - """List user repositories # noqa: E501 - - List public repositories for the specified user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_user_repos(username, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str username: A DagsHub username or organization name (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_user_repos_with_http_info(username, **kwargs) # noqa: E501 - else: - (data) = self.list_user_repos_with_http_info(username, **kwargs) # noqa: E501 - return data - - def list_user_repos_with_http_info(self, username, **kwargs): # noqa: E501 - """List user repositories # noqa: E501 - - List public repositories for the specified user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_user_repos_with_http_info(username, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str username: A DagsHub username or organization name (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['username'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_user_repos" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): - raise ValueError("Missing the required parameter `username` when calling `list_user_repos`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/users/{username}/repos', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def migrate_repo(self, **kwargs): # noqa: E501 - """Migrate repository # noqa: E501 - - Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.migrate_repo(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param MigrateRepo body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.migrate_repo_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.migrate_repo_with_http_info(**kwargs) # noqa: E501 - return data - - def migrate_repo_with_http_info(self, **kwargs): # noqa: E501 - """Migrate repository # noqa: E501 - - Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.migrate_repo_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param MigrateRepo body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method migrate_repo" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/migrate', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def search(self, q, **kwargs): # noqa: E501 - """Search repositories # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.search(q, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str q: (required) - :param int uid: User ID to specify search whose repositories. Default is 0 and search all repositories - :param int limit: Maximum number of repositories in search results. - :param int page: Page number. Default is 1. - :return: object - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.search_with_http_info(q, **kwargs) # noqa: E501 - else: - (data) = self.search_with_http_info(q, **kwargs) # noqa: E501 - return data - - def search_with_http_info(self, q, **kwargs): # noqa: E501 - """Search repositories # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.search_with_http_info(q, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str q: (required) - :param int uid: User ID to specify search whose repositories. Default is 0 and search all repositories - :param int limit: Maximum number of repositories in search results. - :param int page: Page number. Default is 1. - :return: object - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['q', 'uid', 'limit', 'page'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method search" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'q' is set - if ('q' not in params or - params['q'] is None): - raise ValueError("Missing the required parameter `q` when calling `search`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'q' in params: - query_params.append(('q', params['q'])) # noqa: E501 - if 'uid' in params: - query_params.append(('uid', params['uid'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/search', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='object', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/storage_integrations_api.py b/Python/dagshub_api/api/storage_integrations_api.py deleted file mode 100644 index 157e7d0..0000000 --- a/Python/dagshub_api/api/storage_integrations_api.py +++ /dev/null @@ -1,392 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class StorageIntegrationsApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_bucket_content(self, owner, repo, protocol, bucket, path, **kwargs): # noqa: E501 - """List contents in the path # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_bucket_content(owner, repo, protocol, bucket, path, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str protocol: protocol of the storage integration (required) - :param str bucket: name and prefix of the bucket integration (required) - :param str path: path of a folder in the repository (required) - :param bool include_size: - :param int limit: Maximum amount of items to return - :param str from_token: Token, from which to continue iteration - :return: Files1 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_bucket_content_with_http_info(owner, repo, protocol, bucket, path, **kwargs) # noqa: E501 - else: - (data) = self.get_bucket_content_with_http_info(owner, repo, protocol, bucket, path, **kwargs) # noqa: E501 - return data - - def get_bucket_content_with_http_info(self, owner, repo, protocol, bucket, path, **kwargs): # noqa: E501 - """List contents in the path # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_bucket_content_with_http_info(owner, repo, protocol, bucket, path, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str protocol: protocol of the storage integration (required) - :param str bucket: name and prefix of the bucket integration (required) - :param str path: path of a folder in the repository (required) - :param bool include_size: - :param int limit: Maximum amount of items to return - :param str from_token: Token, from which to continue iteration - :return: Files1 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'protocol', 'bucket', 'path', 'include_size', 'limit', 'from_token'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_bucket_content" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_bucket_content`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_bucket_content`") # noqa: E501 - # verify the required parameter 'protocol' is set - if ('protocol' not in params or - params['protocol'] is None): - raise ValueError("Missing the required parameter `protocol` when calling `get_bucket_content`") # noqa: E501 - # verify the required parameter 'bucket' is set - if ('bucket' not in params or - params['bucket'] is None): - raise ValueError("Missing the required parameter `bucket` when calling `get_bucket_content`") # noqa: E501 - # verify the required parameter 'path' is set - if ('path' not in params or - params['path'] is None): - raise ValueError("Missing the required parameter `path` when calling `get_bucket_content`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'protocol' in params: - path_params['protocol'] = params['protocol'] # noqa: E501 - if 'bucket' in params: - path_params['bucket'] = params['bucket'] # noqa: E501 - if 'path' in params: - path_params['path'] = params['path'] # noqa: E501 - - query_params = [] - if 'include_size' in params: - query_params.append(('include_size', params['include_size'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - if 'from_token' in params: - query_params.append(('from_token', params['from_token'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Files1', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_bucket_file(self, owner, repo, protocol, bucket, path, **kwargs): # noqa: E501 - """Get file in the bucket # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_bucket_file(owner, repo, protocol, bucket, path, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str protocol: protocol of the storage integration (required) - :param str bucket: name and prefix of the bucket integration (required) - :param str path: The content path (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_bucket_file_with_http_info(owner, repo, protocol, bucket, path, **kwargs) # noqa: E501 - else: - (data) = self.get_bucket_file_with_http_info(owner, repo, protocol, bucket, path, **kwargs) # noqa: E501 - return data - - def get_bucket_file_with_http_info(self, owner, repo, protocol, bucket, path, **kwargs): # noqa: E501 - """Get file in the bucket # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_bucket_file_with_http_info(owner, repo, protocol, bucket, path, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param str protocol: protocol of the storage integration (required) - :param str bucket: name and prefix of the bucket integration (required) - :param str path: The content path (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'protocol', 'bucket', 'path'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_bucket_file" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_bucket_file`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_bucket_file`") # noqa: E501 - # verify the required parameter 'protocol' is set - if ('protocol' not in params or - params['protocol'] is None): - raise ValueError("Missing the required parameter `protocol` when calling `get_bucket_file`") # noqa: E501 - # verify the required parameter 'bucket' is set - if ('bucket' not in params or - params['bucket'] is None): - raise ValueError("Missing the required parameter `bucket` when calling `get_bucket_file`") # noqa: E501 - # verify the required parameter 'path' is set - if ('path' not in params or - params['path'] is None): - raise ValueError("Missing the required parameter `path` when calling `get_bucket_file`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'protocol' in params: - path_params['protocol'] = params['protocol'] # noqa: E501 - if 'bucket' in params: - path_params['bucket'] = params['bucket'] # noqa: E501 - if 'path' in params: - path_params['path'] = params['path'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_buckets(self, owner, repo, **kwargs): # noqa: E501 - """List integrated storages in the repository # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: Integration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_buckets_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.get_buckets_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def get_buckets_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """List integrated storages in the repository # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: Integration - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_buckets" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `get_buckets`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `get_buckets`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/storage', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Integration', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/user_api.py b/Python/dagshub_api/api/user_api.py deleted file mode 100644 index 0b70498..0000000 --- a/Python/dagshub_api/api/user_api.py +++ /dev/null @@ -1,211 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class UserApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_authenticated_user(self, **kwargs): # noqa: E501 - """Get authenticated user information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_authenticated_user(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_authenticated_user_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_authenticated_user_with_http_info(**kwargs) # noqa: E501 - return data - - def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 - """Get authenticated user information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_authenticated_user_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_authenticated_user" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/user', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_user(self, username, **kwargs): # noqa: E501 - """Get information about a user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user(username, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str username: A DagsHub username or organization name (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_user_with_http_info(username, **kwargs) # noqa: E501 - else: - (data) = self.get_user_with_http_info(username, **kwargs) # noqa: E501 - return data - - def get_user_with_http_info(self, username, **kwargs): # noqa: E501 - """Get information about a user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_with_http_info(username, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str username: A DagsHub username or organization name (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['username'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): - raise ValueError("Missing the required parameter `username` when calling `get_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/users/{username}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/webhooks_api.py b/Python/dagshub_api/api/webhooks_api.py deleted file mode 100644 index 409d108..0000000 --- a/Python/dagshub_api/api/webhooks_api.py +++ /dev/null @@ -1,465 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from dagshub_api.api_client import ApiClient - - -class WebhooksApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create_hook(self, owner, repo, **kwargs): # noqa: E501 - """Create a hook # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_hook(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param RepoHooksBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def create_hook_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Create a hook # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_hook_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param RepoHooksBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_hook" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `create_hook`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `create_hook`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/hooks', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_hook(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a hook # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_hook(owner, repo, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 - else: - (data) = self.delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 - return data - - def delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a hook # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_hook_with_http_info(owner, repo, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_hook" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `delete_hook`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `delete_hook`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete_hook`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/hooks/{id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def edit_hook(self, owner, repo, id, **kwargs): # noqa: E501 - """Edit a hook # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_hook(owner, repo, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param int id: (required) - :param HooksIdBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 - else: - (data) = self.edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 - return data - - def edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Edit a hook # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_hook_with_http_info(owner, repo, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :param int id: (required) - :param HooksIdBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method edit_hook" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `edit_hook`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `edit_hook`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `edit_hook`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/hooks/{id}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_hooks(self, owner, repo, **kwargs): # noqa: E501 - """List hooks # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_hooks(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 - else: - (data) = self.list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 - return data - - def list_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """List hooks # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_hooks_with_http_info(owner, repo, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str owner: owner of the repository (required) - :param str repo: name of the repository (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['owner', 'repo'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_hooks" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `list_hooks`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `list_hooks`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 - - return self.api_client.call_api( - '/repos/{owner}/{repo}/hooks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Python/dagshub_api/api_client.py b/Python/dagshub_api/api_client.py deleted file mode 100644 index b429804..0000000 --- a/Python/dagshub_api/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from dagshub_api.configuration import Configuration -import dagshub_api.models -from dagshub_api import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.3/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(dagshub_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/Python/dagshub_api/configuration.py b/Python/dagshub_api/configuration.py deleted file mode 100644 index f08e3cc..0000000 --- a/Python/dagshub_api/configuration.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "https://dagshub.com/api/v1" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("dagshub_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - 'basicAuth': - { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() - }, - 'tokenAuth': - { - 'type': 'api_key', - 'in': 'query', - 'key': 'token', - 'value': self.get_api_key_with_prefix('token') - }, - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.2\n"\ - "SDK Package Version: 1.0.3".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/Python/dagshub_api/models/__init__.py b/Python/dagshub_api/models/__init__.py deleted file mode 100644 index fb309c4..0000000 --- a/Python/dagshub_api/models/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import models into model package -from dagshub_api.models.assignee import Assignee -from dagshub_api.models.body import Body -from dagshub_api.models.closed import Closed -from dagshub_api.models.collaborators_collaborator_body import CollaboratorsCollaboratorBody -from dagshub_api.models.create_repo import CreateRepo -from dagshub_api.models.edit_experiment_post import EditExperimentPost -from dagshub_api.models.experiment_keys import ExperimentKeys -from dagshub_api.models.file import File -from dagshub_api.models.files import Files -from dagshub_api.models.files1 import Files1 -from dagshub_api.models.hooks_id_body import HooksIdBody -from dagshub_api.models.integration import Integration -from dagshub_api.models.integration_inner import IntegrationInner -from dagshub_api.models.issue import Issue -from dagshub_api.models.issue_assignee import IssueAssignee -from dagshub_api.models.issue_labels import IssueLabels -from dagshub_api.models.issue_milestone import IssueMilestone -from dagshub_api.models.issues import Issues -from dagshub_api.models.labels import Labels -from dagshub_api.models.migrate_repo import MigrateRepo -from dagshub_api.models.milestone import Milestone -from dagshub_api.models.patch_issue import PatchIssue -from dagshub_api.models.post_issue import PostIssue -from dagshub_api.models.put_file import PutFile -from dagshub_api.models.repo_hooks_body import RepoHooksBody -from dagshub_api.models.state import State -from dagshub_api.models.title import Title -from dagshub_api.models.user import User -from dagshub_api.models.webhook_config import WebhookConfig -from dagshub_api.models.webhook_events import WebhookEvents diff --git a/Python/dagshub_api/models/body.py b/Python/dagshub_api/models/body.py deleted file mode 100644 index 39ae097..0000000 --- a/Python/dagshub_api/models/body.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Body(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Body - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/closed.py b/Python/dagshub_api/models/closed.py deleted file mode 100644 index 8b63e0d..0000000 --- a/Python/dagshub_api/models/closed.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Closed(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Closed - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Closed, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Closed): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/collaborators_collaborator_body.py b/Python/dagshub_api/models/collaborators_collaborator_body.py deleted file mode 100644 index 4e05054..0000000 --- a/Python/dagshub_api/models/collaborators_collaborator_body.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CollaboratorsCollaboratorBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'permission': 'str' - } - - attribute_map = { - 'permission': 'permission' - } - - def __init__(self, permission='write'): # noqa: E501 - """CollaboratorsCollaboratorBody - a model defined in Swagger""" # noqa: E501 - self._permission = None - self.discriminator = None - if permission is not None: - self.permission = permission - - @property - def permission(self): - """Gets the permission of this CollaboratorsCollaboratorBody. # noqa: E501 - - The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. # noqa: E501 - - :return: The permission of this CollaboratorsCollaboratorBody. # noqa: E501 - :rtype: str - """ - return self._permission - - @permission.setter - def permission(self, permission): - """Sets the permission of this CollaboratorsCollaboratorBody. - - The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. # noqa: E501 - - :param permission: The permission of this CollaboratorsCollaboratorBody. # noqa: E501 - :type: str - """ - - self._permission = permission - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CollaboratorsCollaboratorBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollaboratorsCollaboratorBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/create_repo.py b/Python/dagshub_api/models/create_repo.py deleted file mode 100644 index 79b2d5b..0000000 --- a/Python/dagshub_api/models/create_repo.py +++ /dev/null @@ -1,321 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreateRepo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'name': 'str', - 'description': 'str', - 'private': 'bool', - 'auto_init': 'bool', - 'project_template': 'str', - 'gitignores': 'str', - 'license': 'str', - 'readme': 'str' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'private': 'private', - 'auto_init': 'auto_init', - 'project_template': 'project_template', - 'gitignores': 'gitignores', - 'license': 'license', - 'readme': 'readme' - } - - def __init__(self, name=None, description=None, private=False, auto_init=False, project_template=None, gitignores=None, license=None, readme='Default'): # noqa: E501 - """CreateRepo - a model defined in Swagger""" # noqa: E501 - self._name = None - self._description = None - self._private = None - self._auto_init = None - self._project_template = None - self._gitignores = None - self._license = None - self._readme = None - self.discriminator = None - self.name = name - if description is not None: - self.description = description - if private is not None: - self.private = private - if auto_init is not None: - self.auto_init = auto_init - if project_template is not None: - self.project_template = project_template - if gitignores is not None: - self.gitignores = gitignores - if license is not None: - self.license = license - if readme is not None: - self.readme = readme - - @property - def name(self): - """Gets the name of this CreateRepo. # noqa: E501 - - name of the repository # noqa: E501 - - :return: The name of this CreateRepo. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this CreateRepo. - - name of the repository # noqa: E501 - - :param name: The name of this CreateRepo. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this CreateRepo. # noqa: E501 - - A short description of the repository # noqa: E501 - - :return: The description of this CreateRepo. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this CreateRepo. - - A short description of the repository # noqa: E501 - - :param description: The description of this CreateRepo. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def private(self): - """Gets the private of this CreateRepo. # noqa: E501 - - Either true to create a private repository, or false to create a public one. # noqa: E501 - - :return: The private of this CreateRepo. # noqa: E501 - :rtype: bool - """ - return self._private - - @private.setter - def private(self, private): - """Sets the private of this CreateRepo. - - Either true to create a private repository, or false to create a public one. # noqa: E501 - - :param private: The private of this CreateRepo. # noqa: E501 - :type: bool - """ - - self._private = private - - @property - def auto_init(self): - """Gets the auto_init of this CreateRepo. # noqa: E501 - - Pass true to create an initial commit with README, .gitignore and LICENSE. # noqa: E501 - - :return: The auto_init of this CreateRepo. # noqa: E501 - :rtype: bool - """ - return self._auto_init - - @auto_init.setter - def auto_init(self, auto_init): - """Sets the auto_init of this CreateRepo. - - Pass true to create an initial commit with README, .gitignore and LICENSE. # noqa: E501 - - :param auto_init: The auto_init of this CreateRepo. # noqa: E501 - :type: bool - """ - - self._auto_init = auto_init - - @property - def project_template(self): - """Gets the project_template of this CreateRepo. # noqa: E501 - - Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. # noqa: E501 - - :return: The project_template of this CreateRepo. # noqa: E501 - :rtype: str - """ - return self._project_template - - @project_template.setter - def project_template(self, project_template): - """Sets the project_template of this CreateRepo. - - Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. # noqa: E501 - - :param project_template: The project_template of this CreateRepo. # noqa: E501 - :type: str - """ - allowed_values = ["cookiecutter-dagshub-dvc", "custom", "none", "notebook-template"] # noqa: E501 - if project_template not in allowed_values: - raise ValueError( - "Invalid value for `project_template` ({0}), must be one of {1}" # noqa: E501 - .format(project_template, allowed_values) - ) - - self._project_template = project_template - - @property - def gitignores(self): - """Gets the gitignores of this CreateRepo. # noqa: E501 - - Desired language .gitignore templates to apply. Use the name of the templates. # noqa: E501 - - :return: The gitignores of this CreateRepo. # noqa: E501 - :rtype: str - """ - return self._gitignores - - @gitignores.setter - def gitignores(self, gitignores): - """Sets the gitignores of this CreateRepo. - - Desired language .gitignore templates to apply. Use the name of the templates. # noqa: E501 - - :param gitignores: The gitignores of this CreateRepo. # noqa: E501 - :type: str - """ - - self._gitignores = gitignores - - @property - def license(self): - """Gets the license of this CreateRepo. # noqa: E501 - - Desired LICENSE template to apply. Use the name of the template. # noqa: E501 - - :return: The license of this CreateRepo. # noqa: E501 - :rtype: str - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this CreateRepo. - - Desired LICENSE template to apply. Use the name of the template. # noqa: E501 - - :param license: The license of this CreateRepo. # noqa: E501 - :type: str - """ - allowed_values = ["Apache License 2.0", "MIT License", "Abstyles License", "Academic Free License v1.1", "Academic Free License v1.2", "Academic Free License v2.0", "Academic Free License v2.1", "Academic Free License v3.0", "Affero General Public License v1.0", "Apache License 1.0", "Apache License 1.1", "Artistic License 1.0", "Artistic License 2.0", "BSD 2-clause License", "BSD 3-clause License", "BSD 4-clause License", "Creative Commons CC0 1.0 Universal", "Eclipse Public License 1.0", "Educational Community License v1.0", "Educational Community License v2.0", "GNU Affero General Public License v3.0", "GNU Free Documentation License v1.1", "GNU Free Documentation License v1.2", "GNU Free Documentation License v1.3", "GNU General Public License v1.0", "GNU General Public License v2.0", "GNU General Public License v3.0", "GNU Lesser General Public License v2.1", "GNU Lesser General Public License v3.0", "GNU Library General Public License v2.0", "ISC license", "Mozilla Public License 1.0", "Mozilla Public License 1.1", "Mozilla Public License 2.03"] # noqa: E501 - if license not in allowed_values: - raise ValueError( - "Invalid value for `license` ({0}), must be one of {1}" # noqa: E501 - .format(license, allowed_values) - ) - - self._license = license - - @property - def readme(self): - """Gets the readme of this CreateRepo. # noqa: E501 - - Desired README template to apply. Use the name of the template. # noqa: E501 - - :return: The readme of this CreateRepo. # noqa: E501 - :rtype: str - """ - return self._readme - - @readme.setter - def readme(self, readme): - """Sets the readme of this CreateRepo. - - Desired README template to apply. Use the name of the template. # noqa: E501 - - :param readme: The readme of this CreateRepo. # noqa: E501 - :type: str - """ - - self._readme = readme - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CreateRepo, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateRepo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/edit_experiment_post.py b/Python/dagshub_api/models/edit_experiment_post.py deleted file mode 100644 index a05b21b..0000000 --- a/Python/dagshub_api/models/edit_experiment_post.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class EditExperimentPost(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'name': 'str' - } - - attribute_map = { - 'name': 'name' - } - - def __init__(self, name=None): # noqa: E501 - """EditExperimentPost - a model defined in Swagger""" # noqa: E501 - self._name = None - self.discriminator = None - self.name = name - - @property - def name(self): - """Gets the name of this EditExperimentPost. # noqa: E501 - - - :return: The name of this EditExperimentPost. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this EditExperimentPost. - - - :param name: The name of this EditExperimentPost. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(EditExperimentPost, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EditExperimentPost): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/experiment_keys.py b/Python/dagshub_api/models/experiment_keys.py index 7c5f5e5..da10333 100644 --- a/Python/dagshub_api/models/experiment_keys.py +++ b/Python/dagshub_api/models/experiment_keys.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/assignee.py b/Python/dagshub_api/models/experiment_metrics_response.py similarity index 81% rename from Python/dagshub_api/models/assignee.py rename to Python/dagshub_api/models/experiment_metrics_response.py index 3f398de..2f57043 100644 --- a/Python/dagshub_api/models/assignee.py +++ b/Python/dagshub_api/models/experiment_metrics_response.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import six -class Assignee(object): +class ExperimentMetricsResponse(dict): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -29,13 +29,18 @@ class Assignee(object): """ swagger_types = { } + if hasattr(dict, "swagger_types"): + swagger_types.update(dict.swagger_types) attribute_map = { } + if hasattr(dict, "attribute_map"): + attribute_map.update(dict.attribute_map) - def __init__(self): # noqa: E501 - """Assignee - a model defined in Swagger""" # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 + """ExperimentMetricsResponse - a model defined in Swagger""" # noqa: E501 self.discriminator = None + dict.__init__(self, *args, **kwargs) def to_dict(self): """Returns the model properties as a dict""" @@ -58,7 +63,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(Assignee, dict): + if issubclass(ExperimentMetricsResponse, dict): for key, value in self.items(): result[key] = value @@ -74,7 +79,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, Assignee): + if not isinstance(other, ExperimentMetricsResponse): return False return self.__dict__ == other.__dict__ diff --git a/Python/dagshub_api/models/experiments_response.py b/Python/dagshub_api/models/experiments_response.py new file mode 100644 index 0000000..cf2d043 --- /dev/null +++ b/Python/dagshub_api/models/experiments_response.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ExperimentsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'experiments': 'dict(str, ComponentsschemasExperimentYaml)', + 'is_editor': 'bool', + 'next_page_token': 'str' + } + + attribute_map = { + 'experiments': 'experiments', + 'is_editor': 'isEditor', + 'next_page_token': 'nextPageToken' + } + + def __init__(self, experiments=None, is_editor=None, next_page_token=None): # noqa: E501 + """ExperimentsResponse - a model defined in Swagger""" # noqa: E501 + self._experiments = None + self._is_editor = None + self._next_page_token = None + self.discriminator = None + if experiments is not None: + self.experiments = experiments + if is_editor is not None: + self.is_editor = is_editor + if next_page_token is not None: + self.next_page_token = next_page_token + + @property + def experiments(self): + """Gets the experiments of this ExperimentsResponse. # noqa: E501 + + Map of experiment ID to experiment details # noqa: E501 + + :return: The experiments of this ExperimentsResponse. # noqa: E501 + :rtype: dict(str, ComponentsschemasExperimentYaml) + """ + return self._experiments + + @experiments.setter + def experiments(self, experiments): + """Sets the experiments of this ExperimentsResponse. + + Map of experiment ID to experiment details # noqa: E501 + + :param experiments: The experiments of this ExperimentsResponse. # noqa: E501 + :type: dict(str, ComponentsschemasExperimentYaml) + """ + + self._experiments = experiments + + @property + def is_editor(self): + """Gets the is_editor of this ExperimentsResponse. # noqa: E501 + + Whether the authenticated user can edit experiments in this repo # noqa: E501 + + :return: The is_editor of this ExperimentsResponse. # noqa: E501 + :rtype: bool + """ + return self._is_editor + + @is_editor.setter + def is_editor(self, is_editor): + """Sets the is_editor of this ExperimentsResponse. + + Whether the authenticated user can edit experiments in this repo # noqa: E501 + + :param is_editor: The is_editor of this ExperimentsResponse. # noqa: E501 + :type: bool + """ + + self._is_editor = is_editor + + @property + def next_page_token(self): + """Gets the next_page_token of this ExperimentsResponse. # noqa: E501 + + Pagination token for the next page of results (empty string when no more pages) # noqa: E501 + + :return: The next_page_token of this ExperimentsResponse. # noqa: E501 + :rtype: str + """ + return self._next_page_token + + @next_page_token.setter + def next_page_token(self, next_page_token): + """Sets the next_page_token of this ExperimentsResponse. + + Pagination token for the next page of results (empty string when no more pages) # noqa: E501 + + :param next_page_token: The next_page_token of this ExperimentsResponse. # noqa: E501 + :type: str + """ + + self._next_page_token = next_page_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ExperimentsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExperimentsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/Python/dagshub_api/models/file.py b/Python/dagshub_api/models/file.py deleted file mode 100644 index b164fdf..0000000 --- a/Python/dagshub_api/models/file.py +++ /dev/null @@ -1,278 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class File(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'path': 'str', - 'type': 'str', - 'size': 'int', - 'hash': 'str', - 'versioning': 'str', - 'download_url': 'str', - 'content_url': 'str' - } - - attribute_map = { - 'path': 'path', - 'type': 'type', - 'size': 'size', - 'hash': 'hash', - 'versioning': 'versioning', - 'download_url': 'download_url', - 'content_url': 'content_url' - } - - def __init__(self, path=None, type=None, size=None, hash=None, versioning=None, download_url=None, content_url=None): # noqa: E501 - """File - a model defined in Swagger""" # noqa: E501 - self._path = None - self._type = None - self._size = None - self._hash = None - self._versioning = None - self._download_url = None - self._content_url = None - self.discriminator = None - if path is not None: - self.path = path - if type is not None: - self.type = type - if size is not None: - self.size = size - if hash is not None: - self.hash = hash - if versioning is not None: - self.versioning = versioning - if download_url is not None: - self.download_url = download_url - if content_url is not None: - self.content_url = content_url - - @property - def path(self): - """Gets the path of this File. # noqa: E501 - - - :return: The path of this File. # noqa: E501 - :rtype: str - """ - return self._path - - @path.setter - def path(self, path): - """Sets the path of this File. - - - :param path: The path of this File. # noqa: E501 - :type: str - """ - - self._path = path - - @property - def type(self): - """Gets the type of this File. # noqa: E501 - - - :return: The type of this File. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this File. - - - :param type: The type of this File. # noqa: E501 - :type: str - """ - allowed_values = ["file", "dir"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def size(self): - """Gets the size of this File. # noqa: E501 - - - :return: The size of this File. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this File. - - - :param size: The size of this File. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def hash(self): - """Gets the hash of this File. # noqa: E501 - - - :return: The hash of this File. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this File. - - - :param hash: The hash of this File. # noqa: E501 - :type: str - """ - - self._hash = hash - - @property - def versioning(self): - """Gets the versioning of this File. # noqa: E501 - - - :return: The versioning of this File. # noqa: E501 - :rtype: str - """ - return self._versioning - - @versioning.setter - def versioning(self, versioning): - """Sets the versioning of this File. - - - :param versioning: The versioning of this File. # noqa: E501 - :type: str - """ - allowed_values = ["git", "dvc", "bucket"] # noqa: E501 - if versioning not in allowed_values: - raise ValueError( - "Invalid value for `versioning` ({0}), must be one of {1}" # noqa: E501 - .format(versioning, allowed_values) - ) - - self._versioning = versioning - - @property - def download_url(self): - """Gets the download_url of this File. # noqa: E501 - - - :return: The download_url of this File. # noqa: E501 - :rtype: str - """ - return self._download_url - - @download_url.setter - def download_url(self, download_url): - """Sets the download_url of this File. - - - :param download_url: The download_url of this File. # noqa: E501 - :type: str - """ - - self._download_url = download_url - - @property - def content_url(self): - """Gets the content_url of this File. # noqa: E501 - - - :return: The content_url of this File. # noqa: E501 - :rtype: str - """ - return self._content_url - - @content_url.setter - def content_url(self, content_url): - """Sets the content_url of this File. - - - :param content_url: The content_url of this File. # noqa: E501 - :type: str - """ - - self._content_url = content_url - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(File, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, File): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/files.py b/Python/dagshub_api/models/files.py index 654a9e5..42ecd23 100644 --- a/Python/dagshub_api/models/files.py +++ b/Python/dagshub_api/models/files.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/files1.py b/Python/dagshub_api/models/files1.py index c972ece..daf28cf 100644 --- a/Python/dagshub_api/models/files1.py +++ b/Python/dagshub_api/models/files1.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,27 +28,22 @@ class Files1(object): and the value is json key in definition. """ swagger_types = { - 'entries': 'list[File]', - 'limit': 'int', + 'entries': 'list[ComponentsschemasFileYaml]', 'next_token': 'str' } attribute_map = { 'entries': 'entries', - 'limit': 'limit', 'next_token': 'next_token' } - def __init__(self, entries=None, limit=None, next_token=None): # noqa: E501 + def __init__(self, entries=None, next_token=None): # noqa: E501 """Files1 - a model defined in Swagger""" # noqa: E501 self._entries = None - self._limit = None self._next_token = None self.discriminator = None if entries is not None: self.entries = entries - if limit is not None: - self.limit = limit if next_token is not None: self.next_token = next_token @@ -58,7 +53,7 @@ def entries(self): :return: The entries of this Files1. # noqa: E501 - :rtype: list[File] + :rtype: list[ComponentsschemasFileYaml] """ return self._entries @@ -68,36 +63,16 @@ def entries(self, entries): :param entries: The entries of this Files1. # noqa: E501 - :type: list[File] + :type: list[ComponentsschemasFileYaml] """ self._entries = entries - @property - def limit(self): - """Gets the limit of this Files1. # noqa: E501 - - - :return: The limit of this Files1. # noqa: E501 - :rtype: int - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this Files1. - - - :param limit: The limit of this Files1. # noqa: E501 - :type: int - """ - - self._limit = limit - @property def next_token(self): """Gets the next_token of this Files1. # noqa: E501 + Next token to continue pagination from # noqa: E501 :return: The next_token of this Files1. # noqa: E501 :rtype: str @@ -108,6 +83,7 @@ def next_token(self): def next_token(self, next_token): """Sets the next_token of this Files1. + Next token to continue pagination from # noqa: E501 :param next_token: The next_token of this Files1. # noqa: E501 :type: str diff --git a/Python/dagshub_api/models/hooks_id_body.py b/Python/dagshub_api/models/hooks_id_body.py deleted file mode 100644 index bbab0f4..0000000 --- a/Python/dagshub_api/models/hooks_id_body.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class HooksIdBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'config': 'WebhookConfig', - 'events': 'WebhookEvents', - 'active': 'bool' - } - - attribute_map = { - 'config': 'config', - 'events': 'events', - 'active': 'active' - } - - def __init__(self, config=None, events=None, active=None): # noqa: E501 - """HooksIdBody - a model defined in Swagger""" # noqa: E501 - self._config = None - self._events = None - self._active = None - self.discriminator = None - if config is not None: - self.config = config - if events is not None: - self.events = events - if active is not None: - self.active = active - - @property - def config(self): - """Gets the config of this HooksIdBody. # noqa: E501 - - - :return: The config of this HooksIdBody. # noqa: E501 - :rtype: WebhookConfig - """ - return self._config - - @config.setter - def config(self, config): - """Sets the config of this HooksIdBody. - - - :param config: The config of this HooksIdBody. # noqa: E501 - :type: WebhookConfig - """ - - self._config = config - - @property - def events(self): - """Gets the events of this HooksIdBody. # noqa: E501 - - - :return: The events of this HooksIdBody. # noqa: E501 - :rtype: WebhookEvents - """ - return self._events - - @events.setter - def events(self, events): - """Sets the events of this HooksIdBody. - - - :param events: The events of this HooksIdBody. # noqa: E501 - :type: WebhookEvents - """ - - self._events = events - - @property - def active(self): - """Gets the active of this HooksIdBody. # noqa: E501 - - Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. # noqa: E501 - - :return: The active of this HooksIdBody. # noqa: E501 - :rtype: bool - """ - return self._active - - @active.setter - def active(self, active): - """Sets the active of this HooksIdBody. - - Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. # noqa: E501 - - :param active: The active of this HooksIdBody. # noqa: E501 - :type: bool - """ - - self._active = active - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(HooksIdBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, HooksIdBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/integration.py b/Python/dagshub_api/models/integration.py index 154b0a3..98e6bfe 100644 --- a/Python/dagshub_api/models/integration.py +++ b/Python/dagshub_api/models/integration.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/integration_inner.py b/Python/dagshub_api/models/integration_inner.py deleted file mode 100644 index 399aba8..0000000 --- a/Python/dagshub_api/models/integration_inner.py +++ /dev/null @@ -1,174 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IntegrationInner(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'name': 'str', - 'protocol': 'str', - 'list_path': 'str' - } - - attribute_map = { - 'name': 'name', - 'protocol': 'protocol', - 'list_path': 'list_path' - } - - def __init__(self, name=None, protocol=None, list_path=None): # noqa: E501 - """IntegrationInner - a model defined in Swagger""" # noqa: E501 - self._name = None - self._protocol = None - self._list_path = None - self.discriminator = None - if name is not None: - self.name = name - if protocol is not None: - self.protocol = protocol - if list_path is not None: - self.list_path = list_path - - @property - def name(self): - """Gets the name of this IntegrationInner. # noqa: E501 - - Name/path of the bucket # noqa: E501 - - :return: The name of this IntegrationInner. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this IntegrationInner. - - Name/path of the bucket # noqa: E501 - - :param name: The name of this IntegrationInner. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def protocol(self): - """Gets the protocol of this IntegrationInner. # noqa: E501 - - Protocol used by the integration # noqa: E501 - - :return: The protocol of this IntegrationInner. # noqa: E501 - :rtype: str - """ - return self._protocol - - @protocol.setter - def protocol(self, protocol): - """Sets the protocol of this IntegrationInner. - - Protocol used by the integration # noqa: E501 - - :param protocol: The protocol of this IntegrationInner. # noqa: E501 - :type: str - """ - allowed_values = ["s3", "gs"] # noqa: E501 - if protocol not in allowed_values: - raise ValueError( - "Invalid value for `protocol` ({0}), must be one of {1}" # noqa: E501 - .format(protocol, allowed_values) - ) - - self._protocol = protocol - - @property - def list_path(self): - """Gets the list_path of this IntegrationInner. # noqa: E501 - - URL to list the root of this bucket # noqa: E501 - - :return: The list_path of this IntegrationInner. # noqa: E501 - :rtype: str - """ - return self._list_path - - @list_path.setter - def list_path(self, list_path): - """Sets the list_path of this IntegrationInner. - - URL to list the root of this bucket # noqa: E501 - - :param list_path: The list_path of this IntegrationInner. # noqa: E501 - :type: str - """ - - self._list_path = list_path - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(IntegrationInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IntegrationInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/issue.py b/Python/dagshub_api/models/issue.py index 7774fff..6671620 100644 --- a/Python/dagshub_api/models/issue.py +++ b/Python/dagshub_api/models/issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -30,18 +30,17 @@ class Issue(object): swagger_types = { 'id': 'int', 'number': 'int', - 'user': 'User', - 'title': 'Title', - 'body': 'Body', - 'labels': 'list[IssueLabels]', - 'milestone': 'IssueMilestone', - 'assignee': 'IssueAssignee', + 'user': 'ComponentsschemasUserYaml', + 'title': 'str', + 'body': 'str', + 'labels': 'list[object]', + 'milestone': 'object', + 'assignee': 'ComponentsschemasUserYaml', 'state': 'str', 'comments': 'int', - 'created_at': 'str', - 'updated_at': 'str', - 'pull_request': 'object', - 'closed': 'bool' + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'pull_request': 'object' } attribute_map = { @@ -57,11 +56,10 @@ class Issue(object): 'comments': 'comments', 'created_at': 'created_at', 'updated_at': 'updated_at', - 'pull_request': 'pull_request', - 'closed': 'closed' + 'pull_request': 'pull_request' } - def __init__(self, id=None, number=None, user=None, title=None, body=None, labels=None, milestone=None, assignee=None, state=None, comments=None, created_at=None, updated_at=None, pull_request=None, closed=None): # noqa: E501 + def __init__(self, id=None, number=None, user=None, title=None, body=None, labels=None, milestone=None, assignee=None, state=None, comments=None, created_at=None, updated_at=None, pull_request=None): # noqa: E501 """Issue - a model defined in Swagger""" # noqa: E501 self._id = None self._number = None @@ -76,7 +74,6 @@ def __init__(self, id=None, number=None, user=None, title=None, body=None, label self._created_at = None self._updated_at = None self._pull_request = None - self._closed = None self.discriminator = None if id is not None: self.id = id @@ -84,11 +81,16 @@ def __init__(self, id=None, number=None, user=None, title=None, body=None, label self.number = number if user is not None: self.user = user - self.title = title - self.body = body - self.labels = labels - self.milestone = milestone - self.assignee = assignee + if title is not None: + self.title = title + if body is not None: + self.body = body + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if assignee is not None: + self.assignee = assignee if state is not None: self.state = state if comments is not None: @@ -99,7 +101,6 @@ def __init__(self, id=None, number=None, user=None, title=None, body=None, label self.updated_at = updated_at if pull_request is not None: self.pull_request = pull_request - self.closed = closed @property def id(self): @@ -126,6 +127,7 @@ def id(self, id): def number(self): """Gets the number of this Issue. # noqa: E501 + Issue index within the repository # noqa: E501 :return: The number of this Issue. # noqa: E501 :rtype: int @@ -136,6 +138,7 @@ def number(self): def number(self, number): """Sets the number of this Issue. + Issue index within the repository # noqa: E501 :param number: The number of this Issue. # noqa: E501 :type: int @@ -149,7 +152,7 @@ def user(self): :return: The user of this Issue. # noqa: E501 - :rtype: User + :rtype: ComponentsschemasUserYaml """ return self._user @@ -159,7 +162,7 @@ def user(self, user): :param user: The user of this Issue. # noqa: E501 - :type: User + :type: ComponentsschemasUserYaml """ self._user = user @@ -170,7 +173,7 @@ def title(self): :return: The title of this Issue. # noqa: E501 - :rtype: Title + :rtype: str """ return self._title @@ -180,10 +183,8 @@ def title(self, title): :param title: The title of this Issue. # noqa: E501 - :type: Title + :type: str """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 self._title = title @@ -193,7 +194,7 @@ def body(self): :return: The body of this Issue. # noqa: E501 - :rtype: Body + :rtype: str """ return self._body @@ -203,10 +204,8 @@ def body(self, body): :param body: The body of this Issue. # noqa: E501 - :type: Body + :type: str """ - if body is None: - raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 self._body = body @@ -216,7 +215,7 @@ def labels(self): :return: The labels of this Issue. # noqa: E501 - :rtype: list[IssueLabels] + :rtype: list[object] """ return self._labels @@ -226,10 +225,8 @@ def labels(self, labels): :param labels: The labels of this Issue. # noqa: E501 - :type: list[IssueLabels] + :type: list[object] """ - if labels is None: - raise ValueError("Invalid value for `labels`, must not be `None`") # noqa: E501 self._labels = labels @@ -239,7 +236,7 @@ def milestone(self): :return: The milestone of this Issue. # noqa: E501 - :rtype: IssueMilestone + :rtype: object """ return self._milestone @@ -249,10 +246,8 @@ def milestone(self, milestone): :param milestone: The milestone of this Issue. # noqa: E501 - :type: IssueMilestone + :type: object """ - if milestone is None: - raise ValueError("Invalid value for `milestone`, must not be `None`") # noqa: E501 self._milestone = milestone @@ -262,7 +257,7 @@ def assignee(self): :return: The assignee of this Issue. # noqa: E501 - :rtype: IssueAssignee + :rtype: ComponentsschemasUserYaml """ return self._assignee @@ -272,10 +267,8 @@ def assignee(self, assignee): :param assignee: The assignee of this Issue. # noqa: E501 - :type: IssueAssignee + :type: ComponentsschemasUserYaml """ - if assignee is None: - raise ValueError("Invalid value for `assignee`, must not be `None`") # noqa: E501 self._assignee = assignee @@ -297,6 +290,12 @@ def state(self, state): :param state: The state of this Issue. # noqa: E501 :type: str """ + allowed_values = ["open", "closed"] # noqa: E501 + if state not in allowed_values: + raise ValueError( + "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 + .format(state, allowed_values) + ) self._state = state @@ -327,7 +326,7 @@ def created_at(self): :return: The created_at of this Issue. # noqa: E501 - :rtype: str + :rtype: datetime """ return self._created_at @@ -337,7 +336,7 @@ def created_at(self, created_at): :param created_at: The created_at of this Issue. # noqa: E501 - :type: str + :type: datetime """ self._created_at = created_at @@ -348,7 +347,7 @@ def updated_at(self): :return: The updated_at of this Issue. # noqa: E501 - :rtype: str + :rtype: datetime """ return self._updated_at @@ -358,7 +357,7 @@ def updated_at(self, updated_at): :param updated_at: The updated_at of this Issue. # noqa: E501 - :type: str + :type: datetime """ self._updated_at = updated_at @@ -367,6 +366,7 @@ def updated_at(self, updated_at): def pull_request(self): """Gets the pull_request of this Issue. # noqa: E501 + Present when the issue is associated with a pull request # noqa: E501 :return: The pull_request of this Issue. # noqa: E501 :rtype: object @@ -377,6 +377,7 @@ def pull_request(self): def pull_request(self, pull_request): """Sets the pull_request of this Issue. + Present when the issue is associated with a pull request # noqa: E501 :param pull_request: The pull_request of this Issue. # noqa: E501 :type: object @@ -384,29 +385,6 @@ def pull_request(self, pull_request): self._pull_request = pull_request - @property - def closed(self): - """Gets the closed of this Issue. # noqa: E501 - - - :return: The closed of this Issue. # noqa: E501 - :rtype: bool - """ - return self._closed - - @closed.setter - def closed(self, closed): - """Sets the closed of this Issue. - - - :param closed: The closed of this Issue. # noqa: E501 - :type: bool - """ - if closed is None: - raise ValueError("Invalid value for `closed`, must not be `None`") # noqa: E501 - - self._closed = closed - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/Python/dagshub_api/models/issue_assignee.py b/Python/dagshub_api/models/issue_assignee.py deleted file mode 100644 index 3727f89..0000000 --- a/Python/dagshub_api/models/issue_assignee.py +++ /dev/null @@ -1,214 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IssueAssignee(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'login': 'str', - 'full_name': 'str', - 'avatar_url': 'str', - 'username': 'str' - } - - attribute_map = { - 'id': 'id', - 'login': 'login', - 'full_name': 'full_name', - 'avatar_url': 'avatar_url', - 'username': 'username' - } - - def __init__(self, id=None, login=None, full_name=None, avatar_url=None, username=None): # noqa: E501 - """IssueAssignee - a model defined in Swagger""" # noqa: E501 - self._id = None - self._login = None - self._full_name = None - self._avatar_url = None - self._username = None - self.discriminator = None - if id is not None: - self.id = id - if login is not None: - self.login = login - if full_name is not None: - self.full_name = full_name - if avatar_url is not None: - self.avatar_url = avatar_url - if username is not None: - self.username = username - - @property - def id(self): - """Gets the id of this IssueAssignee. # noqa: E501 - - - :return: The id of this IssueAssignee. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IssueAssignee. - - - :param id: The id of this IssueAssignee. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def login(self): - """Gets the login of this IssueAssignee. # noqa: E501 - - - :return: The login of this IssueAssignee. # noqa: E501 - :rtype: str - """ - return self._login - - @login.setter - def login(self, login): - """Sets the login of this IssueAssignee. - - - :param login: The login of this IssueAssignee. # noqa: E501 - :type: str - """ - - self._login = login - - @property - def full_name(self): - """Gets the full_name of this IssueAssignee. # noqa: E501 - - - :return: The full_name of this IssueAssignee. # noqa: E501 - :rtype: str - """ - return self._full_name - - @full_name.setter - def full_name(self, full_name): - """Sets the full_name of this IssueAssignee. - - - :param full_name: The full_name of this IssueAssignee. # noqa: E501 - :type: str - """ - - self._full_name = full_name - - @property - def avatar_url(self): - """Gets the avatar_url of this IssueAssignee. # noqa: E501 - - - :return: The avatar_url of this IssueAssignee. # noqa: E501 - :rtype: str - """ - return self._avatar_url - - @avatar_url.setter - def avatar_url(self, avatar_url): - """Sets the avatar_url of this IssueAssignee. - - - :param avatar_url: The avatar_url of this IssueAssignee. # noqa: E501 - :type: str - """ - - self._avatar_url = avatar_url - - @property - def username(self): - """Gets the username of this IssueAssignee. # noqa: E501 - - - :return: The username of this IssueAssignee. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this IssueAssignee. - - - :param username: The username of this IssueAssignee. # noqa: E501 - :type: str - """ - - self._username = username - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(IssueAssignee, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IssueAssignee): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/issue_labels.py b/Python/dagshub_api/models/issue_labels.py deleted file mode 100644 index 5a93253..0000000 --- a/Python/dagshub_api/models/issue_labels.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IssueLabels(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'name': 'str', - 'color': 'str', - 'url': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'color': 'color', - 'url': 'url' - } - - def __init__(self, id=None, name=None, color=None, url=None): # noqa: E501 - """IssueLabels - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._color = None - self._url = None - self.discriminator = None - if id is not None: - self.id = id - if name is not None: - self.name = name - if color is not None: - self.color = color - if url is not None: - self.url = url - - @property - def id(self): - """Gets the id of this IssueLabels. # noqa: E501 - - - :return: The id of this IssueLabels. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IssueLabels. - - - :param id: The id of this IssueLabels. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def name(self): - """Gets the name of this IssueLabels. # noqa: E501 - - - :return: The name of this IssueLabels. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this IssueLabels. - - - :param name: The name of this IssueLabels. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def color(self): - """Gets the color of this IssueLabels. # noqa: E501 - - - :return: The color of this IssueLabels. # noqa: E501 - :rtype: str - """ - return self._color - - @color.setter - def color(self, color): - """Sets the color of this IssueLabels. - - - :param color: The color of this IssueLabels. # noqa: E501 - :type: str - """ - - self._color = color - - @property - def url(self): - """Gets the url of this IssueLabels. # noqa: E501 - - - :return: The url of this IssueLabels. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this IssueLabels. - - - :param url: The url of this IssueLabels. # noqa: E501 - :type: str - """ - - self._url = url - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(IssueLabels, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IssueLabels): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/issue_milestone.py b/Python/dagshub_api/models/issue_milestone.py deleted file mode 100644 index 32a2770..0000000 --- a/Python/dagshub_api/models/issue_milestone.py +++ /dev/null @@ -1,292 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IssueMilestone(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'title': 'str', - 'description': 'str', - 'state': 'str', - 'open_issues': 'int', - 'closed_issues': 'int', - 'closed_at': 'str', - 'due_on': 'str' - } - - attribute_map = { - 'id': 'id', - 'title': 'title', - 'description': 'description', - 'state': 'state', - 'open_issues': 'open_issues', - 'closed_issues': 'closed_issues', - 'closed_at': 'closed_at', - 'due_on': 'due_on' - } - - def __init__(self, id=None, title=None, description=None, state=None, open_issues=None, closed_issues=None, closed_at=None, due_on=None): # noqa: E501 - """IssueMilestone - a model defined in Swagger""" # noqa: E501 - self._id = None - self._title = None - self._description = None - self._state = None - self._open_issues = None - self._closed_issues = None - self._closed_at = None - self._due_on = None - self.discriminator = None - if id is not None: - self.id = id - if title is not None: - self.title = title - if description is not None: - self.description = description - if state is not None: - self.state = state - if open_issues is not None: - self.open_issues = open_issues - if closed_issues is not None: - self.closed_issues = closed_issues - if closed_at is not None: - self.closed_at = closed_at - if due_on is not None: - self.due_on = due_on - - @property - def id(self): - """Gets the id of this IssueMilestone. # noqa: E501 - - - :return: The id of this IssueMilestone. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IssueMilestone. - - - :param id: The id of this IssueMilestone. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def title(self): - """Gets the title of this IssueMilestone. # noqa: E501 - - - :return: The title of this IssueMilestone. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IssueMilestone. - - - :param title: The title of this IssueMilestone. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def description(self): - """Gets the description of this IssueMilestone. # noqa: E501 - - - :return: The description of this IssueMilestone. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this IssueMilestone. - - - :param description: The description of this IssueMilestone. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def state(self): - """Gets the state of this IssueMilestone. # noqa: E501 - - - :return: The state of this IssueMilestone. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this IssueMilestone. - - - :param state: The state of this IssueMilestone. # noqa: E501 - :type: str - """ - - self._state = state - - @property - def open_issues(self): - """Gets the open_issues of this IssueMilestone. # noqa: E501 - - - :return: The open_issues of this IssueMilestone. # noqa: E501 - :rtype: int - """ - return self._open_issues - - @open_issues.setter - def open_issues(self, open_issues): - """Sets the open_issues of this IssueMilestone. - - - :param open_issues: The open_issues of this IssueMilestone. # noqa: E501 - :type: int - """ - - self._open_issues = open_issues - - @property - def closed_issues(self): - """Gets the closed_issues of this IssueMilestone. # noqa: E501 - - - :return: The closed_issues of this IssueMilestone. # noqa: E501 - :rtype: int - """ - return self._closed_issues - - @closed_issues.setter - def closed_issues(self, closed_issues): - """Sets the closed_issues of this IssueMilestone. - - - :param closed_issues: The closed_issues of this IssueMilestone. # noqa: E501 - :type: int - """ - - self._closed_issues = closed_issues - - @property - def closed_at(self): - """Gets the closed_at of this IssueMilestone. # noqa: E501 - - - :return: The closed_at of this IssueMilestone. # noqa: E501 - :rtype: str - """ - return self._closed_at - - @closed_at.setter - def closed_at(self, closed_at): - """Sets the closed_at of this IssueMilestone. - - - :param closed_at: The closed_at of this IssueMilestone. # noqa: E501 - :type: str - """ - - self._closed_at = closed_at - - @property - def due_on(self): - """Gets the due_on of this IssueMilestone. # noqa: E501 - - - :return: The due_on of this IssueMilestone. # noqa: E501 - :rtype: str - """ - return self._due_on - - @due_on.setter - def due_on(self, due_on): - """Sets the due_on of this IssueMilestone. - - - :param due_on: The due_on of this IssueMilestone. # noqa: E501 - :type: str - """ - - self._due_on = due_on - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(IssueMilestone, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IssueMilestone): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/issues.py b/Python/dagshub_api/models/issues.py index 157a4c3..f0d93c3 100644 --- a/Python/dagshub_api/models/issues.py +++ b/Python/dagshub_api/models/issues.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/labels.py b/Python/dagshub_api/models/labels.py deleted file mode 100644 index 9b15a0b..0000000 --- a/Python/dagshub_api/models/labels.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Labels(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Labels - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Labels, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Labels): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/migrate_repo.py b/Python/dagshub_api/models/migrate_repo.py deleted file mode 100644 index 0d87d9b..0000000 --- a/Python/dagshub_api/models/migrate_repo.py +++ /dev/null @@ -1,316 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class MigrateRepo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'clone_addr': 'str', - 'auth_username': 'str', - 'auth_password': 'str', - 'user_id': 'int', - 'repo_name': 'str', - 'mirror': 'bool', - 'visibility': 'str', - 'description': 'str' - } - - attribute_map = { - 'clone_addr': 'clone_addr', - 'auth_username': 'auth_username', - 'auth_password': 'auth_password', - 'user_id': 'user_id', - 'repo_name': 'repo_name', - 'mirror': 'mirror', - 'visibility': 'visibility', - 'description': 'description' - } - - def __init__(self, clone_addr=None, auth_username=None, auth_password=None, user_id=None, repo_name=None, mirror=False, visibility='false', description=None): # noqa: E501 - """MigrateRepo - a model defined in Swagger""" # noqa: E501 - self._clone_addr = None - self._auth_username = None - self._auth_password = None - self._user_id = None - self._repo_name = None - self._mirror = None - self._visibility = None - self._description = None - self.discriminator = None - self.clone_addr = clone_addr - if auth_username is not None: - self.auth_username = auth_username - if auth_password is not None: - self.auth_password = auth_password - self.user_id = user_id - if repo_name is not None: - self.repo_name = repo_name - if mirror is not None: - self.mirror = mirror - if visibility is not None: - self.visibility = visibility - if description is not None: - self.description = description - - @property - def clone_addr(self): - """Gets the clone_addr of this MigrateRepo. # noqa: E501 - - Remote Git address (HTTP/HTTPS URL or local path) # noqa: E501 - - :return: The clone_addr of this MigrateRepo. # noqa: E501 - :rtype: str - """ - return self._clone_addr - - @clone_addr.setter - def clone_addr(self, clone_addr): - """Sets the clone_addr of this MigrateRepo. - - Remote Git address (HTTP/HTTPS URL or local path) # noqa: E501 - - :param clone_addr: The clone_addr of this MigrateRepo. # noqa: E501 - :type: str - """ - if clone_addr is None: - raise ValueError("Invalid value for `clone_addr`, must not be `None`") # noqa: E501 - - self._clone_addr = clone_addr - - @property - def auth_username(self): - """Gets the auth_username of this MigrateRepo. # noqa: E501 - - Authorization username # noqa: E501 - - :return: The auth_username of this MigrateRepo. # noqa: E501 - :rtype: str - """ - return self._auth_username - - @auth_username.setter - def auth_username(self, auth_username): - """Sets the auth_username of this MigrateRepo. - - Authorization username # noqa: E501 - - :param auth_username: The auth_username of this MigrateRepo. # noqa: E501 - :type: str - """ - - self._auth_username = auth_username - - @property - def auth_password(self): - """Gets the auth_password of this MigrateRepo. # noqa: E501 - - Authorization password # noqa: E501 - - :return: The auth_password of this MigrateRepo. # noqa: E501 - :rtype: str - """ - return self._auth_password - - @auth_password.setter - def auth_password(self, auth_password): - """Sets the auth_password of this MigrateRepo. - - Authorization password # noqa: E501 - - :param auth_password: The auth_password of this MigrateRepo. # noqa: E501 - :type: str - """ - - self._auth_password = auth_password - - @property - def user_id(self): - """Gets the user_id of this MigrateRepo. # noqa: E501 - - User ID who takes ownership of this repository # noqa: E501 - - :return: The user_id of this MigrateRepo. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this MigrateRepo. - - User ID who takes ownership of this repository # noqa: E501 - - :param user_id: The user_id of this MigrateRepo. # noqa: E501 - :type: int - """ - if user_id is None: - raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 - - self._user_id = user_id - - @property - def repo_name(self): - """Gets the repo_name of this MigrateRepo. # noqa: E501 - - Name of the repository # noqa: E501 - - :return: The repo_name of this MigrateRepo. # noqa: E501 - :rtype: str - """ - return self._repo_name - - @repo_name.setter - def repo_name(self, repo_name): - """Sets the repo_name of this MigrateRepo. - - Name of the repository # noqa: E501 - - :param repo_name: The repo_name of this MigrateRepo. # noqa: E501 - :type: str - """ - - self._repo_name = repo_name - - @property - def mirror(self): - """Gets the mirror of this MigrateRepo. # noqa: E501 - - Repository will be a mirror (connected repository). # noqa: E501 - - :return: The mirror of this MigrateRepo. # noqa: E501 - :rtype: bool - """ - return self._mirror - - @mirror.setter - def mirror(self, mirror): - """Sets the mirror of this MigrateRepo. - - Repository will be a mirror (connected repository). # noqa: E501 - - :param mirror: The mirror of this MigrateRepo. # noqa: E501 - :type: bool - """ - - self._mirror = mirror - - @property - def visibility(self): - """Gets the visibility of this MigrateRepo. # noqa: E501 - - Repository will be private or public. # noqa: E501 - - :return: The visibility of this MigrateRepo. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this MigrateRepo. - - Repository will be private or public. # noqa: E501 - - :param visibility: The visibility of this MigrateRepo. # noqa: E501 - :type: str - """ - allowed_values = ["private", "public"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def description(self): - """Gets the description of this MigrateRepo. # noqa: E501 - - Description of the repository # noqa: E501 - - :return: The description of this MigrateRepo. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this MigrateRepo. - - Description of the repository # noqa: E501 - - :param description: The description of this MigrateRepo. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(MigrateRepo, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MigrateRepo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/milestone.py b/Python/dagshub_api/models/milestone.py deleted file mode 100644 index 77691eb..0000000 --- a/Python/dagshub_api/models/milestone.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Milestone(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Milestone - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Milestone, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Milestone): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/patch_issue.py b/Python/dagshub_api/models/patch_issue.py index cdb6456..d61d394 100644 --- a/Python/dagshub_api/models/patch_issue.py +++ b/Python/dagshub_api/models/patch_issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,11 +28,11 @@ class PatchIssue(object): and the value is json key in definition. """ swagger_types = { - 'title': 'Title', - 'body': 'Body', - 'assignee': 'Assignee', - 'milestone': 'Milestone', - 'state': 'State' + 'title': 'ComponentsschemasTitleYaml', + 'body': 'ComponentsschemasBodyYaml', + 'assignee': 'ComponentsschemasAssigneeYaml', + 'milestone': 'ComponentsschemasMilestoneYaml', + 'state': 'ComponentsschemasStateYaml' } attribute_map = { @@ -68,7 +68,7 @@ def title(self): :return: The title of this PatchIssue. # noqa: E501 - :rtype: Title + :rtype: ComponentsschemasTitleYaml """ return self._title @@ -78,7 +78,7 @@ def title(self, title): :param title: The title of this PatchIssue. # noqa: E501 - :type: Title + :type: ComponentsschemasTitleYaml """ self._title = title @@ -89,7 +89,7 @@ def body(self): :return: The body of this PatchIssue. # noqa: E501 - :rtype: Body + :rtype: ComponentsschemasBodyYaml """ return self._body @@ -99,7 +99,7 @@ def body(self, body): :param body: The body of this PatchIssue. # noqa: E501 - :type: Body + :type: ComponentsschemasBodyYaml """ self._body = body @@ -110,7 +110,7 @@ def assignee(self): :return: The assignee of this PatchIssue. # noqa: E501 - :rtype: Assignee + :rtype: ComponentsschemasAssigneeYaml """ return self._assignee @@ -120,7 +120,7 @@ def assignee(self, assignee): :param assignee: The assignee of this PatchIssue. # noqa: E501 - :type: Assignee + :type: ComponentsschemasAssigneeYaml """ self._assignee = assignee @@ -131,7 +131,7 @@ def milestone(self): :return: The milestone of this PatchIssue. # noqa: E501 - :rtype: Milestone + :rtype: ComponentsschemasMilestoneYaml """ return self._milestone @@ -141,7 +141,7 @@ def milestone(self, milestone): :param milestone: The milestone of this PatchIssue. # noqa: E501 - :type: Milestone + :type: ComponentsschemasMilestoneYaml """ self._milestone = milestone @@ -152,7 +152,7 @@ def state(self): :return: The state of this PatchIssue. # noqa: E501 - :rtype: State + :rtype: ComponentsschemasStateYaml """ return self._state @@ -162,7 +162,7 @@ def state(self, state): :param state: The state of this PatchIssue. # noqa: E501 - :type: State + :type: ComponentsschemasStateYaml """ self._state = state diff --git a/Python/dagshub_api/models/post_issue.py b/Python/dagshub_api/models/post_issue.py index f19293d..cbe998b 100644 --- a/Python/dagshub_api/models/post_issue.py +++ b/Python/dagshub_api/models/post_issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,12 +28,12 @@ class PostIssue(object): and the value is json key in definition. """ swagger_types = { - 'title': 'Title', - 'body': 'Body', - 'assignee': 'Assignee', - 'milestone': 'Milestone', - 'labels': 'Labels', - 'closed': 'Closed' + 'title': 'ComponentsschemasTitleYaml', + 'body': 'ComponentsschemasBodyYaml', + 'assignee': 'ComponentsschemasAssigneeYaml', + 'milestone': 'ComponentsschemasMilestoneYaml', + 'labels': 'ComponentsschemasLabelsYaml', + 'closed': 'ComponentsschemasClosedYaml' } attribute_map = { @@ -73,7 +73,7 @@ def title(self): :return: The title of this PostIssue. # noqa: E501 - :rtype: Title + :rtype: ComponentsschemasTitleYaml """ return self._title @@ -83,7 +83,7 @@ def title(self, title): :param title: The title of this PostIssue. # noqa: E501 - :type: Title + :type: ComponentsschemasTitleYaml """ self._title = title @@ -94,7 +94,7 @@ def body(self): :return: The body of this PostIssue. # noqa: E501 - :rtype: Body + :rtype: ComponentsschemasBodyYaml """ return self._body @@ -104,7 +104,7 @@ def body(self, body): :param body: The body of this PostIssue. # noqa: E501 - :type: Body + :type: ComponentsschemasBodyYaml """ self._body = body @@ -115,7 +115,7 @@ def assignee(self): :return: The assignee of this PostIssue. # noqa: E501 - :rtype: Assignee + :rtype: ComponentsschemasAssigneeYaml """ return self._assignee @@ -125,7 +125,7 @@ def assignee(self, assignee): :param assignee: The assignee of this PostIssue. # noqa: E501 - :type: Assignee + :type: ComponentsschemasAssigneeYaml """ self._assignee = assignee @@ -136,7 +136,7 @@ def milestone(self): :return: The milestone of this PostIssue. # noqa: E501 - :rtype: Milestone + :rtype: ComponentsschemasMilestoneYaml """ return self._milestone @@ -146,7 +146,7 @@ def milestone(self, milestone): :param milestone: The milestone of this PostIssue. # noqa: E501 - :type: Milestone + :type: ComponentsschemasMilestoneYaml """ self._milestone = milestone @@ -157,7 +157,7 @@ def labels(self): :return: The labels of this PostIssue. # noqa: E501 - :rtype: Labels + :rtype: ComponentsschemasLabelsYaml """ return self._labels @@ -167,7 +167,7 @@ def labels(self, labels): :param labels: The labels of this PostIssue. # noqa: E501 - :type: Labels + :type: ComponentsschemasLabelsYaml """ self._labels = labels @@ -178,7 +178,7 @@ def closed(self): :return: The closed of this PostIssue. # noqa: E501 - :rtype: Closed + :rtype: ComponentsschemasClosedYaml """ return self._closed @@ -188,7 +188,7 @@ def closed(self, closed): :param closed: The closed of this PostIssue. # noqa: E501 - :type: Closed + :type: ComponentsschemasClosedYaml """ self._closed = closed diff --git a/Python/dagshub_api/models/put_file.py b/Python/dagshub_api/models/put_file.py index e822482..ae6c76b 100644 --- a/Python/dagshub_api/models/put_file.py +++ b/Python/dagshub_api/models/put_file.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/repo_hooks_body.py b/Python/dagshub_api/models/repo_hooks_body.py deleted file mode 100644 index 39a70ec..0000000 --- a/Python/dagshub_api/models/repo_hooks_body.py +++ /dev/null @@ -1,172 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RepoHooksBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'type': 'str', - 'config': 'WebhookConfig', - 'events': 'WebhookEvents' - } - - attribute_map = { - 'type': 'type', - 'config': 'config', - 'events': 'events' - } - - def __init__(self, type=None, config=None, events=None): # noqa: E501 - """RepoHooksBody - a model defined in Swagger""" # noqa: E501 - self._type = None - self._config = None - self._events = None - self.discriminator = None - self.type = type - self.config = config - if events is not None: - self.events = events - - @property - def type(self): - """Gets the type of this RepoHooksBody. # noqa: E501 - - The type of webhook # noqa: E501 - - :return: The type of this RepoHooksBody. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RepoHooksBody. - - The type of webhook # noqa: E501 - - :param type: The type of this RepoHooksBody. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["dagshub", "slack", "discord", "dingtalk"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def config(self): - """Gets the config of this RepoHooksBody. # noqa: E501 - - - :return: The config of this RepoHooksBody. # noqa: E501 - :rtype: WebhookConfig - """ - return self._config - - @config.setter - def config(self, config): - """Sets the config of this RepoHooksBody. - - - :param config: The config of this RepoHooksBody. # noqa: E501 - :type: WebhookConfig - """ - if config is None: - raise ValueError("Invalid value for `config`, must not be `None`") # noqa: E501 - - self._config = config - - @property - def events(self): - """Gets the events of this RepoHooksBody. # noqa: E501 - - - :return: The events of this RepoHooksBody. # noqa: E501 - :rtype: WebhookEvents - """ - return self._events - - @events.setter - def events(self, events): - """Sets the events of this RepoHooksBody. - - - :param events: The events of this RepoHooksBody. # noqa: E501 - :type: WebhookEvents - """ - - self._events = events - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(RepoHooksBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepoHooksBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/state.py b/Python/dagshub_api/models/state.py deleted file mode 100644 index 27b63e7..0000000 --- a/Python/dagshub_api/models/state.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class State(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - OPEN = "open" - CLOSED = "closed" - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """State - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(State, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, State): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/title.py b/Python/dagshub_api/models/title.py deleted file mode 100644 index 980ab35..0000000 --- a/Python/dagshub_api/models/title.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Title(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Title - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Title, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Title): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/user.py b/Python/dagshub_api/models/user.py index b8ae00d..0d08b65 100644 --- a/Python/dagshub_api/models/user.py +++ b/Python/dagshub_api/models/user.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -30,37 +30,57 @@ class User(object): swagger_types = { 'id': 'int', 'login': 'str', + 'username': 'str', 'full_name': 'str', 'avatar_url': 'str', - 'username': 'str' + 'public_email': 'str', + 'website': 'str', + 'company': 'str', + 'description': 'str' } attribute_map = { 'id': 'id', 'login': 'login', + 'username': 'username', 'full_name': 'full_name', 'avatar_url': 'avatar_url', - 'username': 'username' + 'public_email': 'public_email', + 'website': 'website', + 'company': 'company', + 'description': 'description' } - def __init__(self, id=None, login=None, full_name=None, avatar_url=None, username=None): # noqa: E501 + def __init__(self, id=None, login=None, username=None, full_name=None, avatar_url=None, public_email=None, website=None, company=None, description=None): # noqa: E501 """User - a model defined in Swagger""" # noqa: E501 self._id = None self._login = None + self._username = None self._full_name = None self._avatar_url = None - self._username = None + self._public_email = None + self._website = None + self._company = None + self._description = None self.discriminator = None if id is not None: self.id = id if login is not None: self.login = login + if username is not None: + self.username = username if full_name is not None: self.full_name = full_name if avatar_url is not None: self.avatar_url = avatar_url - if username is not None: - self.username = username + if public_email is not None: + self.public_email = public_email + if website is not None: + self.website = website + if company is not None: + self.company = company + if description is not None: + self.description = description @property def id(self): @@ -104,6 +124,29 @@ def login(self, login): self._login = login + @property + def username(self): + """Gets the username of this User. # noqa: E501 + + Alias for login (legacy compatibility) # noqa: E501 + + :return: The username of this User. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this User. + + Alias for login (legacy compatibility) # noqa: E501 + + :param username: The username of this User. # noqa: E501 + :type: str + """ + + self._username = username + @property def full_name(self): """Gets the full_name of this User. # noqa: E501 @@ -147,25 +190,88 @@ def avatar_url(self, avatar_url): self._avatar_url = avatar_url @property - def username(self): - """Gets the username of this User. # noqa: E501 + def public_email(self): + """Gets the public_email of this User. # noqa: E501 - :return: The username of this User. # noqa: E501 + :return: The public_email of this User. # noqa: E501 :rtype: str """ - return self._username + return self._public_email - @username.setter - def username(self, username): - """Sets the username of this User. + @public_email.setter + def public_email(self, public_email): + """Sets the public_email of this User. - :param username: The username of this User. # noqa: E501 + :param public_email: The public_email of this User. # noqa: E501 :type: str """ - self._username = username + self._public_email = public_email + + @property + def website(self): + """Gets the website of this User. # noqa: E501 + + + :return: The website of this User. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this User. + + + :param website: The website of this User. # noqa: E501 + :type: str + """ + + self._website = website + + @property + def company(self): + """Gets the company of this User. # noqa: E501 + + + :return: The company of this User. # noqa: E501 + :rtype: str + """ + return self._company + + @company.setter + def company(self, company): + """Sets the company of this User. + + + :param company: The company of this User. # noqa: E501 + :type: str + """ + + self._company = company + + @property + def description(self): + """Gets the description of this User. # noqa: E501 + + + :return: The description of this User. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this User. + + + :param description: The description of this User. # noqa: E501 + :type: str + """ + + self._description = description def to_dict(self): """Returns the model properties as a dict""" diff --git a/Python/dagshub_api/models/webhook_config.py b/Python/dagshub_api/models/webhook_config.py deleted file mode 100644 index 0606ec9..0000000 --- a/Python/dagshub_api/models/webhook_config.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class WebhookConfig(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'url': 'str', - 'content_type': 'str', - 'secret': 'str' - } - - attribute_map = { - 'url': 'url', - 'content_type': 'content_type', - 'secret': 'secret' - } - - def __init__(self, url=None, content_type=None, secret=None): # noqa: E501 - """WebhookConfig - a model defined in Swagger""" # noqa: E501 - self._url = None - self._content_type = None - self._secret = None - self.discriminator = None - self.url = url - self.content_type = content_type - if secret is not None: - self.secret = secret - - @property - def url(self): - """Gets the url of this WebhookConfig. # noqa: E501 - - A string defining the URL to which the payloads will be delivered. # noqa: E501 - - :return: The url of this WebhookConfig. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this WebhookConfig. - - A string defining the URL to which the payloads will be delivered. # noqa: E501 - - :param url: The url of this WebhookConfig. # noqa: E501 - :type: str - """ - if url is None: - raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 - - self._url = url - - @property - def content_type(self): - """Gets the content_type of this WebhookConfig. # noqa: E501 - - A string defining the media type used to serialize the payloads. # noqa: E501 - - :return: The content_type of this WebhookConfig. # noqa: E501 - :rtype: str - """ - return self._content_type - - @content_type.setter - def content_type(self, content_type): - """Sets the content_type of this WebhookConfig. - - A string defining the media type used to serialize the payloads. # noqa: E501 - - :param content_type: The content_type of this WebhookConfig. # noqa: E501 - :type: str - """ - if content_type is None: - raise ValueError("Invalid value for `content_type`, must not be `None`") # noqa: E501 - allowed_values = ["json", "form"] # noqa: E501 - if content_type not in allowed_values: - raise ValueError( - "Invalid value for `content_type` ({0}), must be one of {1}" # noqa: E501 - .format(content_type, allowed_values) - ) - - self._content_type = content_type - - @property - def secret(self): - """Gets the secret of this WebhookConfig. # noqa: E501 - - An optional string that's passed with the HTTP requests body. # noqa: E501 - - :return: The secret of this WebhookConfig. # noqa: E501 - :rtype: str - """ - return self._secret - - @secret.setter - def secret(self, secret): - """Sets the secret of this WebhookConfig. - - An optional string that's passed with the HTTP requests body. # noqa: E501 - - :param secret: The secret of this WebhookConfig. # noqa: E501 - :type: str - """ - - self._secret = secret - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(WebhookConfig, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WebhookConfig): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/models/webhook_events.py b/Python/dagshub_api/models/webhook_events.py deleted file mode 100644 index c567b8f..0000000 --- a/Python/dagshub_api/models/webhook_events.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class WebhookEvents(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """WebhookEvents - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(WebhookEvents, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WebhookEvents): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/Python/dagshub_api/rest.py b/Python/dagshub_api/rest.py deleted file mode 100644 index ae8b019..0000000 --- a/Python/dagshub_api/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/Python/docs/Assignee.md b/Python/docs/Assignee.md deleted file mode 100644 index b1111c6..0000000 --- a/Python/docs/Assignee.md +++ /dev/null @@ -1,8 +0,0 @@ -# Assignee - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/Body.md b/Python/docs/Body.md deleted file mode 100644 index 6ab9026..0000000 --- a/Python/docs/Body.md +++ /dev/null @@ -1,8 +0,0 @@ -# Body - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/BranchesApi.md b/Python/docs/BranchesApi.md deleted file mode 100644 index 3c8dc28..0000000 --- a/Python/docs/BranchesApi.md +++ /dev/null @@ -1,123 +0,0 @@ -# dagshub_api.BranchesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_branch**](BranchesApi.md#get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -[**list_branches**](BranchesApi.md#list_branches) | **GET** /repos/{owner}/{repo}/branches | List Branches - -# **get_branch** -> get_branch(owner, repo, branch) - -Get Branch - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.BranchesApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -branch = 'branch_example' # str | branch of the repository - -try: - # Get Branch - api_instance.get_branch(owner, repo, branch) -except ApiException as e: - print("Exception when calling BranchesApi->get_branch: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **branch** | **str**| branch of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_branches** -> list_branches(owner, repo) - -List Branches - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.BranchesApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository - -try: - # List Branches - api_instance.list_branches(owner, repo) -except ApiException as e: - print("Exception when calling BranchesApi->list_branches: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/docs/Closed.md b/Python/docs/Closed.md deleted file mode 100644 index e5a3df0..0000000 --- a/Python/docs/Closed.md +++ /dev/null @@ -1,8 +0,0 @@ -# Closed - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/CollaboratorsApi.md b/Python/docs/CollaboratorsApi.md deleted file mode 100644 index 0950cf4..0000000 --- a/Python/docs/CollaboratorsApi.md +++ /dev/null @@ -1,184 +0,0 @@ -# dagshub_api.CollaboratorsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_collaborator**](CollaboratorsApi.md#add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -[**get_collaborators**](CollaboratorsApi.md#get_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -[**remove_collaborator**](CollaboratorsApi.md#remove_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator - -# **add_collaborator** -> add_collaborator(owner, repo, collaborator, body=body) - -Add user as a collaborator - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.CollaboratorsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -collaborator = 'collaborator_example' # str | collaborator username -body = dagshub_api.CollaboratorsCollaboratorBody() # CollaboratorsCollaboratorBody | (optional) - -try: - # Add user as a collaborator - api_instance.add_collaborator(owner, repo, collaborator, body=body) -except ApiException as e: - print("Exception when calling CollaboratorsApi->add_collaborator: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **collaborator** | **str**| collaborator username | - **body** | [**CollaboratorsCollaboratorBody**](CollaboratorsCollaboratorBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_collaborators** -> get_collaborators(owner, repo) - -Get collaborators - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.CollaboratorsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository - -try: - # Get collaborators - api_instance.get_collaborators(owner, repo) -except ApiException as e: - print("Exception when calling CollaboratorsApi->get_collaborators: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **remove_collaborator** -> remove_collaborator(owner, repo, collaborator) - -Delete collaborator - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.CollaboratorsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -collaborator = 'collaborator_example' # str | collaborator username - -try: - # Delete collaborator - api_instance.remove_collaborator(owner, repo, collaborator) -except ApiException as e: - print("Exception when calling CollaboratorsApi->remove_collaborator: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **collaborator** | **str**| collaborator username | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/docs/CollaboratorsCollaboratorBody.md b/Python/docs/CollaboratorsCollaboratorBody.md deleted file mode 100644 index f5e05b8..0000000 --- a/Python/docs/CollaboratorsCollaboratorBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# CollaboratorsCollaboratorBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**permission** | **str** | The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. | [optional] [default to 'write'] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/CommitsApi.md b/Python/docs/CommitsApi.md deleted file mode 100644 index 851c49e..0000000 --- a/Python/docs/CommitsApi.md +++ /dev/null @@ -1,66 +0,0 @@ -# dagshub_api.CommitsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_commit**](CommitsApi.md#get_commit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit - -# **get_commit** -> get_commit(owner, repo, sha) - -Get a single commit - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.CommitsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -sha = 'sha_example' # str | a SHA1 of a commit - -try: - # Get a single commit - api_instance.get_commit(owner, repo, sha) -except ApiException as e: - print("Exception when calling CommitsApi->get_commit: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **sha** | **str**| a SHA1 of a commit | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/docs/ContentApi.md b/Python/docs/ContentApi.md deleted file mode 100644 index 33a6edb..0000000 --- a/Python/docs/ContentApi.md +++ /dev/null @@ -1,274 +0,0 @@ -# dagshub_api.ContentApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_archive**](ContentApi.md#get_archive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -[**get_content**](ContentApi.md#get_content) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -[**get_raw**](ContentApi.md#get_raw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -[**upload_content**](ContentApi.md#upload_content) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository - -# **get_archive** -> get_archive(owner, repo, ref, format) - -Download archive - -This method returns archive by given format. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ContentApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -ref = 'ref_example' # str | The name of the commit/branch/tag -format = 'format_example' # str | The format of archive, either .zip or .tar.gz - -try: - # Download archive - api_instance.get_archive(owner, repo, ref, format) -except ApiException as e: - print("Exception when calling ContentApi->get_archive: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **ref** | **str**| The name of the commit/branch/tag | - **format** | **str**| The format of archive, either .zip or .tar.gz | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_content** -> Files get_content(owner, repo, branch, path, include_size=include_size) - -List data in a repository folder - -List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ContentApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -branch = 'branch_example' # str | branch of the repository -path = 'path_example' # str | path of a folder in the repository -include_size = false # bool | (optional) (default to false) - -try: - # List data in a repository folder - api_response = api_instance.get_content(owner, repo, branch, path, include_size=include_size) - pprint(api_response) -except ApiException as e: - print("Exception when calling ContentApi->get_content: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **branch** | **str**| branch of the repository | - **path** | **str**| path of a folder in the repository | - **include_size** | **bool**| | [optional] [default to false] - -### Return type - -[**Files**](Files.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_raw** -> get_raw(owner, repo, ref, path) - -Download raw content - -This method returns the raw content of a file. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ContentApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -ref = 'ref_example' # str | The name of the commit/branch/tag -path = 'path_example' # str | The content path - -try: - # Download raw content - api_instance.get_raw(owner, repo, ref, path) -except ApiException as e: - print("Exception when calling ContentApi->get_raw: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **ref** | **str**| The name of the commit/branch/tag | - **path** | **str**| The content path | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **upload_content** -> upload_content(owner, repo, branch, path, commit_summary=commit_summary, commit_message=commit_message, commit_choice=commit_choice, last_commit=last_commit, new_branch_name=new_branch_name, versioning=versioning, files=files) - -Upload data to a repository - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ContentApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -branch = 'branch_example' # str | branch of the repository -path = 'path_example' # str | path of a folder in the repository -commit_summary = 'commit_summary_example' # str | (optional) -commit_message = 'commit_message_example' # str | (optional) -commit_choice = 'commit_choice_example' # str | (optional) -last_commit = 'last_commit_example' # str | (optional) -new_branch_name = 'new_branch_name_example' # str | (optional) -versioning = 'versioning_example' # str | (optional) -files = 'files_example' # str | (optional) - -try: - # Upload data to a repository - api_instance.upload_content(owner, repo, branch, path, commit_summary=commit_summary, commit_message=commit_message, commit_choice=commit_choice, last_commit=last_commit, new_branch_name=new_branch_name, versioning=versioning, files=files) -except ApiException as e: - print("Exception when calling ContentApi->upload_content: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **branch** | **str**| branch of the repository | - **path** | **str**| path of a folder in the repository | - **commit_summary** | **str**| | [optional] - **commit_message** | **str**| | [optional] - **commit_choice** | **str**| | [optional] - **last_commit** | **str**| | [optional] - **new_branch_name** | **str**| | [optional] - **versioning** | **str**| | [optional] - **files** | **str**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/docs/CreateRepo.md b/Python/docs/CreateRepo.md deleted file mode 100644 index ff678fa..0000000 --- a/Python/docs/CreateRepo.md +++ /dev/null @@ -1,16 +0,0 @@ -# CreateRepo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | name of the repository | -**description** | **str** | A short description of the repository | [optional] -**private** | **bool** | Either true to create a private repository, or false to create a public one. | [optional] [default to False] -**auto_init** | **bool** | Pass true to create an initial commit with README, .gitignore and LICENSE. | [optional] [default to False] -**project_template** | **str** | Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. | [optional] -**gitignores** | **str** | Desired language .gitignore templates to apply. Use the name of the templates. | [optional] -**license** | **str** | Desired LICENSE template to apply. Use the name of the template. | [optional] -**readme** | **str** | Desired README template to apply. Use the name of the template. | [optional] [default to 'Default'] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/EditExperimentPost.md b/Python/docs/EditExperimentPost.md deleted file mode 100644 index ea3f545..0000000 --- a/Python/docs/EditExperimentPost.md +++ /dev/null @@ -1,9 +0,0 @@ -# EditExperimentPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/C#/docs/State.md b/Python/docs/ExperimentMetricsResponse.md similarity index 90% rename from C#/docs/State.md rename to Python/docs/ExperimentMetricsResponse.md index 66533f9..c434757 100644 --- a/C#/docs/State.md +++ b/Python/docs/ExperimentMetricsResponse.md @@ -1,6 +1,6 @@ -# dagshub_api.Model.State -## Properties +# ExperimentMetricsResponse +## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/Python/docs/ExperimentsApi.md b/Python/docs/ExperimentsApi.md deleted file mode 100644 index 7e663cf..0000000 --- a/Python/docs/ExperimentsApi.md +++ /dev/null @@ -1,371 +0,0 @@ -# dagshub_api.ExperimentsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_experiment_label**](ExperimentsApi.md#add_experiment_label) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -[**delete_experiment**](ExperimentsApi.md#delete_experiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -[**delete_experiment_label**](ExperimentsApi.md#delete_experiment_label) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -[**edit_experiment**](ExperimentsApi.md#edit_experiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -[**get_experiment_metrics**](ExperimentsApi.md#get_experiment_metrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -[**get_experiments**](ExperimentsApi.md#get_experiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments - -# **add_experiment_label** -> add_experiment_label(owner, repo, experiment_key, experiment_label) - -Add label to experiment - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ExperimentsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -experiment_key = 'experiment_key_example' # str | a valid experiment key -experiment_label = 'experiment_label_example' # str | A label for the experiment, max 128 characters. - -try: - # Add label to experiment - api_instance.add_experiment_label(owner, repo, experiment_key, experiment_label) -except ApiException as e: - print("Exception when calling ExperimentsApi->add_experiment_label: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **experiment_key** | **str**| a valid experiment key | - **experiment_label** | **str**| A label for the experiment, max 128 characters. | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_experiment** -> delete_experiment(owner, repo, experiment_key) - -Delete experiment - -Support both git and MLflow experiments - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ExperimentsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -experiment_key = 'experiment_key_example' # str | a valid experiment key - -try: - # Delete experiment - api_instance.delete_experiment(owner, repo, experiment_key) -except ApiException as e: - print("Exception when calling ExperimentsApi->delete_experiment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **experiment_key** | **str**| a valid experiment key | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_experiment_label** -> delete_experiment_label(owner, repo, experiment_key, experiment_label) - -Delete experiment label - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ExperimentsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -experiment_key = 'experiment_key_example' # str | a valid experiment key -experiment_label = 'experiment_label_example' # str | A label for the experiment, max 128 characters. - -try: - # Delete experiment label - api_instance.delete_experiment_label(owner, repo, experiment_key, experiment_label) -except ApiException as e: - print("Exception when calling ExperimentsApi->delete_experiment_label: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **experiment_key** | **str**| a valid experiment key | - **experiment_label** | **str**| A label for the experiment, max 128 characters. | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **edit_experiment** -> edit_experiment(owner, repo, experiment_key, body=body) - -Edit experiment info - -Edit experiment info, currently supports just changing experiment name. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ExperimentsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -experiment_key = 'experiment_key_example' # str | a valid experiment key -body = dagshub_api.EditExperimentPost() # EditExperimentPost | (optional) - -try: - # Edit experiment info - api_instance.edit_experiment(owner, repo, experiment_key, body=body) -except ApiException as e: - print("Exception when calling ExperimentsApi->edit_experiment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **experiment_key** | **str**| a valid experiment key | - **body** | [**EditExperimentPost**](EditExperimentPost.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_experiment_metrics** -> get_experiment_metrics(owner, repo, body=body) - -Get experiment metrics for experiment - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ExperimentsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -body = dagshub_api.ExperimentKeys() # ExperimentKeys | (optional) - -try: - # Get experiment metrics for experiment - api_instance.get_experiment_metrics(owner, repo, body=body) -except ApiException as e: - print("Exception when calling ExperimentsApi->get_experiment_metrics: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **body** | [**ExperimentKeys**](ExperimentKeys.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_experiments** -> get_experiments(owner, repo) - -List Experiments - -Get a list of experiments in the given repository - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ExperimentsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository - -try: - # List Experiments - api_instance.get_experiments(owner, repo) -except ApiException as e: - print("Exception when calling ExperimentsApi->get_experiments: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/docs/ExperimentsResponse.md b/Python/docs/ExperimentsResponse.md new file mode 100644 index 0000000..daea020 --- /dev/null +++ b/Python/docs/ExperimentsResponse.md @@ -0,0 +1,11 @@ +# ExperimentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**experiments** | [**dict(str, ComponentsschemasExperimentYaml)**](ComponentsschemasExperimentYaml.md) | Map of experiment ID to experiment details | [optional] +**is_editor** | **bool** | Whether the authenticated user can edit experiments in this repo | [optional] +**next_page_token** | **str** | Pagination token for the next page of results (empty string when no more pages) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/Python/docs/File.md b/Python/docs/File.md deleted file mode 100644 index 7cc3fae..0000000 --- a/Python/docs/File.md +++ /dev/null @@ -1,15 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**path** | **str** | | [optional] -**type** | **str** | | [optional] -**size** | **int** | | [optional] -**hash** | **str** | | [optional] -**versioning** | **str** | | [optional] -**download_url** | **str** | | [optional] -**content_url** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/Files1.md b/Python/docs/Files1.md index 3b4f6be..c6ab1d0 100644 --- a/Python/docs/Files1.md +++ b/Python/docs/Files1.md @@ -3,9 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**entries** | [**list[File]**](File.md) | | [optional] -**limit** | **int** | | [optional] -**next_token** | **str** | | [optional] +**entries** | [**list[ComponentsschemasFileYaml]**](ComponentsschemasFileYaml.md) | | [optional] +**next_token** | **str** | Next token to continue pagination from | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Python/docs/HooksIdBody.md b/Python/docs/HooksIdBody.md deleted file mode 100644 index f67c3f7..0000000 --- a/Python/docs/HooksIdBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# HooksIdBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**config** | [**WebhookConfig**](WebhookConfig.md) | | [optional] -**events** | [**WebhookEvents**](WebhookEvents.md) | | [optional] -**active** | **bool** | Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/IntegrationInner.md b/Python/docs/IntegrationInner.md deleted file mode 100644 index 37ed691..0000000 --- a/Python/docs/IntegrationInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# IntegrationInner - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name/path of the bucket | [optional] -**protocol** | **str** | Protocol used by the integration | [optional] -**list_path** | **str** | URL to list the root of this bucket | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/Issue.md b/Python/docs/Issue.md index fb327aa..0dc10f8 100644 --- a/Python/docs/Issue.md +++ b/Python/docs/Issue.md @@ -4,19 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**number** | **int** | | [optional] -**user** | [**User**](User.md) | | [optional] -**title** | [**Title**](Title.md) | | -**body** | [**Body**](Body.md) | | -**labels** | [**list[IssueLabels]**](IssueLabels.md) | | -**milestone** | [**IssueMilestone**](IssueMilestone.md) | | -**assignee** | [**IssueAssignee**](IssueAssignee.md) | | +**number** | **int** | Issue index within the repository | [optional] +**user** | [**ComponentsschemasUserYaml**](ComponentsschemasUserYaml.md) | | [optional] +**title** | **str** | | [optional] +**body** | **str** | | [optional] +**labels** | **list[object]** | | [optional] +**milestone** | **object** | | [optional] +**assignee** | [**ComponentsschemasUserYaml**](ComponentsschemasUserYaml.md) | | [optional] **state** | **str** | | [optional] **comments** | **int** | | [optional] -**created_at** | **str** | | [optional] -**updated_at** | **str** | | [optional] -**pull_request** | **object** | | [optional] -**closed** | **bool** | | +**created_at** | **datetime** | | [optional] +**updated_at** | **datetime** | | [optional] +**pull_request** | **object** | Present when the issue is associated with a pull request | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Python/docs/IssueAssignee.md b/Python/docs/IssueAssignee.md deleted file mode 100644 index 66950fb..0000000 --- a/Python/docs/IssueAssignee.md +++ /dev/null @@ -1,13 +0,0 @@ -# IssueAssignee - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**login** | **str** | | [optional] -**full_name** | **str** | | [optional] -**avatar_url** | **str** | | [optional] -**username** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/IssueLabels.md b/Python/docs/IssueLabels.md deleted file mode 100644 index 8347956..0000000 --- a/Python/docs/IssueLabels.md +++ /dev/null @@ -1,12 +0,0 @@ -# IssueLabels - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **str** | | [optional] -**color** | **str** | | [optional] -**url** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/IssueMilestone.md b/Python/docs/IssueMilestone.md deleted file mode 100644 index f527e59..0000000 --- a/Python/docs/IssueMilestone.md +++ /dev/null @@ -1,16 +0,0 @@ -# IssueMilestone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**title** | **str** | | [optional] -**description** | **str** | | [optional] -**state** | **str** | | [optional] -**open_issues** | **int** | | [optional] -**closed_issues** | **int** | | [optional] -**closed_at** | **str** | | [optional] -**due_on** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/IssuesApi.md b/Python/docs/IssuesApi.md deleted file mode 100644 index 47bcda8..0000000 --- a/Python/docs/IssuesApi.md +++ /dev/null @@ -1,251 +0,0 @@ -# dagshub_api.IssuesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_issue**](IssuesApi.md#create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -[**edit_issue**](IssuesApi.md#edit_issue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -[**get_issue**](IssuesApi.md#get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -[**list_repo_issues**](IssuesApi.md#list_repo_issues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository - -# **create_issue** -> Issue create_issue(owner, repo, body=body) - -Create an issue - -Any user with read access to a repository can create an issue. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.IssuesApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -body = dagshub_api.PostIssue() # PostIssue | (optional) - -try: - # Create an issue - api_response = api_instance.create_issue(owner, repo, body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling IssuesApi->create_issue: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **body** | [**PostIssue**](PostIssue.md)| | [optional] - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **edit_issue** -> Issue edit_issue(owner, repo, body=body) - -Edit an issue - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.IssuesApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -body = dagshub_api.PatchIssue() # PatchIssue | (optional) - -try: - # Edit an issue - api_response = api_instance.edit_issue(owner, repo, body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling IssuesApi->edit_issue: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **body** | [**PatchIssue**](PatchIssue.md)| | [optional] - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_issue** -> Issue get_issue(owner, repo, index) - -Get a single issue - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.IssuesApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -index = 56 # int | the index of an issue or a pull request - -try: - # Get a single issue - api_response = api_instance.get_issue(owner, repo, index) - pprint(api_response) -except ApiException as e: - print("Exception when calling IssuesApi->get_issue: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **index** | **int**| the index of an issue or a pull request | - -### Return type - -[**Issue**](Issue.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_repo_issues** -> Issues list_repo_issues(owner, repo) - -List issues for a repository - -This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.IssuesApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository - -try: - # List issues for a repository - api_response = api_instance.list_repo_issues(owner, repo) - pprint(api_response) -except ApiException as e: - print("Exception when calling IssuesApi->list_repo_issues: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - -### Return type - -[**Issues**](Issues.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/docs/Labels.md b/Python/docs/Labels.md deleted file mode 100644 index ebdf88b..0000000 --- a/Python/docs/Labels.md +++ /dev/null @@ -1,8 +0,0 @@ -# Labels - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/MigrateRepo.md b/Python/docs/MigrateRepo.md deleted file mode 100644 index 7b38987..0000000 --- a/Python/docs/MigrateRepo.md +++ /dev/null @@ -1,16 +0,0 @@ -# MigrateRepo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**clone_addr** | **str** | Remote Git address (HTTP/HTTPS URL or local path) | -**auth_username** | **str** | Authorization username | [optional] -**auth_password** | **str** | Authorization password | [optional] -**user_id** | **int** | User ID who takes ownership of this repository | -**repo_name** | **str** | Name of the repository | [optional] -**mirror** | **bool** | Repository will be a mirror (connected repository). | [optional] [default to False] -**visibility** | **str** | Repository will be private or public. | [optional] [default to 'false'] -**description** | **str** | Description of the repository | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/Milestone.md b/Python/docs/Milestone.md deleted file mode 100644 index b5806be..0000000 --- a/Python/docs/Milestone.md +++ /dev/null @@ -1,8 +0,0 @@ -# Milestone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/PatchIssue.md b/Python/docs/PatchIssue.md index 1080ab4..ee8f558 100644 --- a/Python/docs/PatchIssue.md +++ b/Python/docs/PatchIssue.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | [**Title**](Title.md) | | [optional] -**body** | [**Body**](Body.md) | | [optional] -**assignee** | [**Assignee**](Assignee.md) | | [optional] -**milestone** | [**Milestone**](Milestone.md) | | [optional] -**state** | [**State**](State.md) | | [optional] +**title** | [**ComponentsschemasTitleYaml**](ComponentsschemasTitleYaml.md) | | [optional] +**body** | [**ComponentsschemasBodyYaml**](ComponentsschemasBodyYaml.md) | | [optional] +**assignee** | [**ComponentsschemasAssigneeYaml**](ComponentsschemasAssigneeYaml.md) | | [optional] +**milestone** | [**ComponentsschemasMilestoneYaml**](ComponentsschemasMilestoneYaml.md) | | [optional] +**state** | [**ComponentsschemasStateYaml**](ComponentsschemasStateYaml.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Python/docs/PostIssue.md b/Python/docs/PostIssue.md index 6dc31c5..2459f98 100644 --- a/Python/docs/PostIssue.md +++ b/Python/docs/PostIssue.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | [**Title**](Title.md) | | [optional] -**body** | [**Body**](Body.md) | | [optional] -**assignee** | [**Assignee**](Assignee.md) | | [optional] -**milestone** | [**Milestone**](Milestone.md) | | [optional] -**labels** | [**Labels**](Labels.md) | | [optional] -**closed** | [**Closed**](Closed.md) | | [optional] +**title** | [**ComponentsschemasTitleYaml**](ComponentsschemasTitleYaml.md) | | [optional] +**body** | [**ComponentsschemasBodyYaml**](ComponentsschemasBodyYaml.md) | | [optional] +**assignee** | [**ComponentsschemasAssigneeYaml**](ComponentsschemasAssigneeYaml.md) | | [optional] +**milestone** | [**ComponentsschemasMilestoneYaml**](ComponentsschemasMilestoneYaml.md) | | [optional] +**labels** | [**ComponentsschemasLabelsYaml**](ComponentsschemasLabelsYaml.md) | | [optional] +**closed** | [**ComponentsschemasClosedYaml**](ComponentsschemasClosedYaml.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Python/docs/ReleasesApi.md b/Python/docs/ReleasesApi.md deleted file mode 100644 index 47aaaec..0000000 --- a/Python/docs/ReleasesApi.md +++ /dev/null @@ -1,64 +0,0 @@ -# dagshub_api.ReleasesApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_releases**](ReleasesApi.md#list_releases) | **GET** /repos/{owner}/{repo}/releases | List Releases - -# **list_releases** -> list_releases(owner, repo) - -List Releases - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.ReleasesApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository - -try: - # List Releases - api_instance.list_releases(owner, repo) -except ApiException as e: - print("Exception when calling ReleasesApi->list_releases: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/docs/RepoHooksBody.md b/Python/docs/RepoHooksBody.md deleted file mode 100644 index c8c2824..0000000 --- a/Python/docs/RepoHooksBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# RepoHooksBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | The type of webhook | -**config** | [**WebhookConfig**](WebhookConfig.md) | | -**events** | [**WebhookEvents**](WebhookEvents.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/RepositoryApi.md b/Python/docs/RepositoryApi.md deleted file mode 100644 index 5d5314f..0000000 --- a/Python/docs/RepositoryApi.md +++ /dev/null @@ -1,467 +0,0 @@ -# dagshub_api.RepositoryApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_org_repo**](RepositoryApi.md#create_org_repo) | **POST** /org/{orgname}/repos | Create in organization -[**create_repo**](RepositoryApi.md#create_repo) | **POST** /user/repos | Create -[**get_repo**](RepositoryApi.md#get_repo) | **GET** /repos/{owner}/{repo} | Get repository information -[**list_my_repos**](RepositoryApi.md#list_my_repos) | **GET** /user/repos | List your repositories -[**list_org_repos**](RepositoryApi.md#list_org_repos) | **GET** /orgs/{orgname}/repos | List organization repositories -[**list_user_repos**](RepositoryApi.md#list_user_repos) | **GET** /users/{username}/repos | List user repositories -[**migrate_repo**](RepositoryApi.md#migrate_repo) | **POST** /repos/migrate | Migrate repository -[**search**](RepositoryApi.md#search) | **GET** /repos/search | Search repositories - -# **create_org_repo** -> create_org_repo(orgname, body=body) - -Create in organization - -Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.RepositoryApi(dagshub_api.ApiClient(configuration)) -orgname = 'orgname_example' # str | A DagsHub organization name -body = dagshub_api.CreateRepo() # CreateRepo | (optional) - -try: - # Create in organization - api_instance.create_org_repo(orgname, body=body) -except ApiException as e: - print("Exception when calling RepositoryApi->create_org_repo: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgname** | **str**| A DagsHub organization name | - **body** | [**CreateRepo**](CreateRepo.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_repo** -> create_repo(body=body) - -Create - -Create a new repository for the authenticated user. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.RepositoryApi(dagshub_api.ApiClient(configuration)) -body = dagshub_api.CreateRepo() # CreateRepo | (optional) - -try: - # Create - api_instance.create_repo(body=body) -except ApiException as e: - print("Exception when calling RepositoryApi->create_repo: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateRepo**](CreateRepo.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_repo** -> get_repo(owner, repo) - -Get repository information - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.RepositoryApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository - -try: - # Get repository information - api_instance.get_repo(owner, repo) -except ApiException as e: - print("Exception when calling RepositoryApi->get_repo: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_my_repos** -> object list_my_repos() - -List your repositories - -List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.RepositoryApi(dagshub_api.ApiClient(configuration)) - -try: - # List your repositories - api_response = api_instance.list_my_repos() - pprint(api_response) -except ApiException as e: - print("Exception when calling RepositoryApi->list_my_repos: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**object** - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_org_repos** -> list_org_repos(orgname) - -List organization repositories - -List repositories that are accessible to the authenticated user. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.RepositoryApi(dagshub_api.ApiClient(configuration)) -orgname = 'orgname_example' # str | A DagsHub organization name - -try: - # List organization repositories - api_instance.list_org_repos(orgname) -except ApiException as e: - print("Exception when calling RepositoryApi->list_org_repos: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orgname** | **str**| A DagsHub organization name | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_user_repos** -> list_user_repos(username) - -List user repositories - -List public repositories for the specified user. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.RepositoryApi(dagshub_api.ApiClient(configuration)) -username = 'username_example' # str | A DagsHub username or organization name - -try: - # List user repositories - api_instance.list_user_repos(username) -except ApiException as e: - print("Exception when calling RepositoryApi->list_user_repos: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **str**| A DagsHub username or organization name | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **migrate_repo** -> migrate_repo(body=body) - -Migrate repository - -Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.RepositoryApi(dagshub_api.ApiClient(configuration)) -body = dagshub_api.MigrateRepo() # MigrateRepo | (optional) - -try: - # Migrate repository - api_instance.migrate_repo(body=body) -except ApiException as e: - print("Exception when calling RepositoryApi->migrate_repo: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**MigrateRepo**](MigrateRepo.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **search** -> object search(q, uid=uid, limit=limit, page=page) - -Search repositories - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.RepositoryApi(dagshub_api.ApiClient(configuration)) -q = 'q_example' # str | -uid = 0 # int | User ID to specify search whose repositories. Default is 0 and search all repositories (optional) (default to 0) -limit = 10 # int | Maximum number of repositories in search results. (optional) (default to 10) -page = 1 # int | Page number. Default is 1. (optional) (default to 1) - -try: - # Search repositories - api_response = api_instance.search(q, uid=uid, limit=limit, page=page) - pprint(api_response) -except ApiException as e: - print("Exception when calling RepositoryApi->search: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **q** | **str**| | - **uid** | **int**| User ID to specify search whose repositories. Default is 0 and search all repositories | [optional] [default to 0] - **limit** | **int**| Maximum number of repositories in search results. | [optional] [default to 10] - **page** | **int**| Page number. Default is 1. | [optional] [default to 1] - -### Return type - -**object** - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/docs/State.md b/Python/docs/State.md deleted file mode 100644 index 735175c..0000000 --- a/Python/docs/State.md +++ /dev/null @@ -1,8 +0,0 @@ -# State - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/StorageIntegrationsApi.md b/Python/docs/StorageIntegrationsApi.md deleted file mode 100644 index acb7929..0000000 --- a/Python/docs/StorageIntegrationsApi.md +++ /dev/null @@ -1,198 +0,0 @@ -# dagshub_api.StorageIntegrationsApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_bucket_content**](StorageIntegrationsApi.md#get_bucket_content) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -[**get_bucket_file**](StorageIntegrationsApi.md#get_bucket_file) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -[**get_buckets**](StorageIntegrationsApi.md#get_buckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository - -# **get_bucket_content** -> Files1 get_bucket_content(owner, repo, protocol, bucket, path, include_size=include_size, limit=limit, from_token=from_token) - -List contents in the path - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.StorageIntegrationsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -protocol = 'protocol_example' # str | protocol of the storage integration -bucket = 'bucket_example' # str | name and prefix of the bucket integration -path = 'path_example' # str | path of a folder in the repository -include_size = false # bool | (optional) (default to false) -limit = 100 # int | Maximum amount of items to return (optional) (default to 100) -from_token = 'from_token_example' # str | Token, from which to continue iteration (optional) - -try: - # List contents in the path - api_response = api_instance.get_bucket_content(owner, repo, protocol, bucket, path, include_size=include_size, limit=limit, from_token=from_token) - pprint(api_response) -except ApiException as e: - print("Exception when calling StorageIntegrationsApi->get_bucket_content: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **protocol** | **str**| protocol of the storage integration | - **bucket** | **str**| name and prefix of the bucket integration | - **path** | **str**| path of a folder in the repository | - **include_size** | **bool**| | [optional] [default to false] - **limit** | **int**| Maximum amount of items to return | [optional] [default to 100] - **from_token** | **str**| Token, from which to continue iteration | [optional] - -### Return type - -[**Files1**](Files1.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_bucket_file** -> get_bucket_file(owner, repo, protocol, bucket, path) - -Get file in the bucket - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.StorageIntegrationsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -protocol = 'protocol_example' # str | protocol of the storage integration -bucket = 'bucket_example' # str | name and prefix of the bucket integration -path = 'path_example' # str | The content path - -try: - # Get file in the bucket - api_instance.get_bucket_file(owner, repo, protocol, bucket, path) -except ApiException as e: - print("Exception when calling StorageIntegrationsApi->get_bucket_file: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **protocol** | **str**| protocol of the storage integration | - **bucket** | **str**| name and prefix of the bucket integration | - **path** | **str**| The content path | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_buckets** -> Integration get_buckets(owner, repo) - -List integrated storages in the repository - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.StorageIntegrationsApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository - -try: - # List integrated storages in the repository - api_response = api_instance.get_buckets(owner, repo) - pprint(api_response) -except ApiException as e: - print("Exception when calling StorageIntegrationsApi->get_buckets: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - -### Return type - -[**Integration**](Integration.md) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/docs/Title.md b/Python/docs/Title.md deleted file mode 100644 index ecdd3a6..0000000 --- a/Python/docs/Title.md +++ /dev/null @@ -1,8 +0,0 @@ -# Title - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/User.md b/Python/docs/User.md index ecf7950..7f821d3 100644 --- a/Python/docs/User.md +++ b/Python/docs/User.md @@ -5,9 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **login** | **str** | | [optional] +**username** | **str** | Alias for login (legacy compatibility) | [optional] **full_name** | **str** | | [optional] **avatar_url** | **str** | | [optional] -**username** | **str** | | [optional] +**public_email** | **str** | | [optional] +**website** | **str** | | [optional] +**company** | **str** | | [optional] +**description** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Python/docs/UserApi.md b/Python/docs/UserApi.md deleted file mode 100644 index 112f344..0000000 --- a/Python/docs/UserApi.md +++ /dev/null @@ -1,113 +0,0 @@ -# dagshub_api.UserApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_authenticated_user**](UserApi.md#get_authenticated_user) | **GET** /user | Get authenticated user information -[**get_user**](UserApi.md#get_user) | **GET** /users/{username} | Get information about a user - -# **get_authenticated_user** -> get_authenticated_user() - -Get authenticated user information - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.UserApi(dagshub_api.ApiClient(configuration)) - -try: - # Get authenticated user information - api_instance.get_authenticated_user() -except ApiException as e: - print("Exception when calling UserApi->get_authenticated_user: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_user** -> get_user(username) - -Get information about a user - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.UserApi(dagshub_api.ApiClient(configuration)) -username = 'username_example' # str | A DagsHub username or organization name - -try: - # Get information about a user - api_instance.get_user(username) -except ApiException as e: - print("Exception when calling UserApi->get_user: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **str**| A DagsHub username or organization name | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/docs/WebhookConfig.md b/Python/docs/WebhookConfig.md deleted file mode 100644 index f36c5cb..0000000 --- a/Python/docs/WebhookConfig.md +++ /dev/null @@ -1,11 +0,0 @@ -# WebhookConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **str** | A string defining the URL to which the payloads will be delivered. | -**content_type** | **str** | A string defining the media type used to serialize the payloads. | -**secret** | **str** | An optional string that's passed with the HTTP requests body. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/WebhookEvents.md b/Python/docs/WebhookEvents.md deleted file mode 100644 index 16e8288..0000000 --- a/Python/docs/WebhookEvents.md +++ /dev/null @@ -1,8 +0,0 @@ -# WebhookEvents - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/Python/docs/WebhooksApi.md b/Python/docs/WebhooksApi.md deleted file mode 100644 index 05ddcac..0000000 --- a/Python/docs/WebhooksApi.md +++ /dev/null @@ -1,243 +0,0 @@ -# dagshub_api.WebhooksApi - -All URIs are relative to *https://dagshub.com/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_hook**](WebhooksApi.md#create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -[**delete_hook**](WebhooksApi.md#delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -[**edit_hook**](WebhooksApi.md#edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -[**list_hooks**](WebhooksApi.md#list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - -# **create_hook** -> create_hook(owner, repo, body=body) - -Create a hook - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.WebhooksApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -body = dagshub_api.RepoHooksBody() # RepoHooksBody | (optional) - -try: - # Create a hook - api_instance.create_hook(owner, repo, body=body) -except ApiException as e: - print("Exception when calling WebhooksApi->create_hook: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **body** | [**RepoHooksBody**](RepoHooksBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_hook** -> delete_hook(owner, repo, id) - -Delete a hook - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.WebhooksApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -id = 56 # int | - -try: - # Delete a hook - api_instance.delete_hook(owner, repo, id) -except ApiException as e: - print("Exception when calling WebhooksApi->delete_hook: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **id** | **int**| | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **edit_hook** -> edit_hook(owner, repo, id, body=body) - -Edit a hook - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.WebhooksApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository -id = 56 # int | -body = dagshub_api.HooksIdBody() # HooksIdBody | (optional) - -try: - # Edit a hook - api_instance.edit_hook(owner, repo, id, body=body) -except ApiException as e: - print("Exception when calling WebhooksApi->edit_hook: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - **id** | **int**| | - **body** | [**HooksIdBody**](HooksIdBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_hooks** -> list_hooks(owner, repo) - -List hooks - -### Example -```python -from __future__ import print_function -import time -import dagshub_api -from dagshub_api.rest import ApiException -from pprint import pprint -# Configure HTTP basic authorization: basicAuth -configuration = dagshub_api.Configuration() -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' -# Configure API key authorization: tokenAuth -configuration = dagshub_api.Configuration() -configuration.api_key['token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['token'] = 'Bearer' - -# create an instance of the API class -api_instance = dagshub_api.WebhooksApi(dagshub_api.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repository -repo = 'repo_example' # str | name of the repository - -try: - # List hooks - api_instance.list_hooks(owner, repo) -except ApiException as e: - print("Exception when calling WebhooksApi->list_hooks: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repository | - **repo** | **str**| name of the repository | - -### Return type - -void (empty response body) - -### Authorization - -[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/Python/git_push.sh b/Python/git_push.sh deleted file mode 100644 index 715c961..0000000 --- a/Python/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="DagsHub" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="api-clients" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/Python/requirements.txt b/Python/requirements.txt deleted file mode 100644 index bafdc07..0000000 --- a/Python/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -certifi >= 14.05.14 -six >= 1.10 -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.15.1 diff --git a/Python/setup.py b/Python/setup.py deleted file mode 100644 index bd26efb..0000000 --- a/Python/setup.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from setuptools import setup, find_packages # noqa: H301 - -NAME = "dagshub-api" -VERSION = "1.0.3" -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] - -setup( - name=NAME, - version=VERSION, - description="DagsHub API", - author_email="", - url="", - keywords=["Swagger", "DagsHub API"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - """ -) diff --git a/Python/test-requirements.txt b/Python/test-requirements.txt deleted file mode 100644 index 2702246..0000000 --- a/Python/test-requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -coverage>=4.0.3 -nose>=1.3.7 -pluggy>=0.3.1 -py>=1.4.31 -randomize>=0.13 diff --git a/Python/test/__init__.py b/Python/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/Python/test/test_body.py b/Python/test/test_body.py deleted file mode 100644 index dbff7d8..0000000 --- a/Python/test/test_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.body import Body # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestBody(unittest.TestCase): - """Body unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testBody(self): - """Test Body""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.body.Body() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_branches_api.py b/Python/test/test_branches_api.py deleted file mode 100644 index beb96bb..0000000 --- a/Python/test/test_branches_api.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.branches_api import BranchesApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestBranchesApi(unittest.TestCase): - """BranchesApi unit test stubs""" - - def setUp(self): - self.api = BranchesApi() # noqa: E501 - - def tearDown(self): - pass - - def test_get_branch(self): - """Test case for get_branch - - Get Branch # noqa: E501 - """ - pass - - def test_list_branches(self): - """Test case for list_branches - - List Branches # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_collaborators_api.py b/Python/test/test_collaborators_api.py deleted file mode 100644 index 755ca42..0000000 --- a/Python/test/test_collaborators_api.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.collaborators_api import CollaboratorsApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestCollaboratorsApi(unittest.TestCase): - """CollaboratorsApi unit test stubs""" - - def setUp(self): - self.api = CollaboratorsApi() # noqa: E501 - - def tearDown(self): - pass - - def test_add_collaborator(self): - """Test case for add_collaborator - - Add user as a collaborator # noqa: E501 - """ - pass - - def test_get_collaborators(self): - """Test case for get_collaborators - - Get collaborators # noqa: E501 - """ - pass - - def test_remove_collaborator(self): - """Test case for remove_collaborator - - Delete collaborator # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_collaborators_collaborator_body.py b/Python/test/test_collaborators_collaborator_body.py deleted file mode 100644 index 090db14..0000000 --- a/Python/test/test_collaborators_collaborator_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.collaborators_collaborator_body import CollaboratorsCollaboratorBody # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestCollaboratorsCollaboratorBody(unittest.TestCase): - """CollaboratorsCollaboratorBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollaboratorsCollaboratorBody(self): - """Test CollaboratorsCollaboratorBody""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.collaborators_collaborator_body.CollaboratorsCollaboratorBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_commits_api.py b/Python/test/test_commits_api.py deleted file mode 100644 index b8c5afd..0000000 --- a/Python/test/test_commits_api.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.commits_api import CommitsApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestCommitsApi(unittest.TestCase): - """CommitsApi unit test stubs""" - - def setUp(self): - self.api = CommitsApi() # noqa: E501 - - def tearDown(self): - pass - - def test_get_commit(self): - """Test case for get_commit - - Get a single commit # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_content_api.py b/Python/test/test_content_api.py deleted file mode 100644 index 64c8bb7..0000000 --- a/Python/test/test_content_api.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.content_api import ContentApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestContentApi(unittest.TestCase): - """ContentApi unit test stubs""" - - def setUp(self): - self.api = ContentApi() # noqa: E501 - - def tearDown(self): - pass - - def test_get_archive(self): - """Test case for get_archive - - Download archive # noqa: E501 - """ - pass - - def test_get_content(self): - """Test case for get_content - - List data in a repository folder # noqa: E501 - """ - pass - - def test_get_raw(self): - """Test case for get_raw - - Download raw content # noqa: E501 - """ - pass - - def test_upload_content(self): - """Test case for upload_content - - Upload data to a repository # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_create_repo.py b/Python/test/test_create_repo.py deleted file mode 100644 index 01854a8..0000000 --- a/Python/test/test_create_repo.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.create_repo import CreateRepo # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestCreateRepo(unittest.TestCase): - """CreateRepo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCreateRepo(self): - """Test CreateRepo""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.create_repo.CreateRepo() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_edit_experiment_post.py b/Python/test/test_edit_experiment_post.py deleted file mode 100644 index 4363512..0000000 --- a/Python/test/test_edit_experiment_post.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.edit_experiment_post import EditExperimentPost # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestEditExperimentPost(unittest.TestCase): - """EditExperimentPost unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEditExperimentPost(self): - """Test EditExperimentPost""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.edit_experiment_post.EditExperimentPost() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_experiment_keys.py b/Python/test/test_experiment_keys.py index 30436ed..9c7e455 100644 --- a/Python/test/test_experiment_keys.py +++ b/Python/test/test_experiment_keys.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_closed.py b/Python/test/test_experiment_metrics_response.py similarity index 63% rename from Python/test/test_closed.py rename to Python/test/test_experiment_metrics_response.py index 1f6c25b..1d83f24 100644 --- a/Python/test/test_closed.py +++ b/Python/test/test_experiment_metrics_response.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,12 +15,12 @@ import unittest import dagshub_api -from dagshub_api.models.closed import Closed # noqa: E501 +from dagshub_api.models.experiment_metrics_response import ExperimentMetricsResponse # noqa: E501 from dagshub_api.rest import ApiException -class TestClosed(unittest.TestCase): - """Closed unit test stubs""" +class TestExperimentMetricsResponse(unittest.TestCase): + """ExperimentMetricsResponse unit test stubs""" def setUp(self): pass @@ -28,10 +28,10 @@ def setUp(self): def tearDown(self): pass - def testClosed(self): - """Test Closed""" + def testExperimentMetricsResponse(self): + """Test ExperimentMetricsResponse""" # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.closed.Closed() # noqa: E501 + # model = dagshub_api.models.experiment_metrics_response.ExperimentMetricsResponse() # noqa: E501 pass diff --git a/Python/test/test_experiments_api.py b/Python/test/test_experiments_api.py deleted file mode 100644 index 140a779..0000000 --- a/Python/test/test_experiments_api.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.experiments_api import ExperimentsApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestExperimentsApi(unittest.TestCase): - """ExperimentsApi unit test stubs""" - - def setUp(self): - self.api = ExperimentsApi() # noqa: E501 - - def tearDown(self): - pass - - def test_add_experiment_label(self): - """Test case for add_experiment_label - - Add label to experiment # noqa: E501 - """ - pass - - def test_delete_experiment(self): - """Test case for delete_experiment - - Delete experiment # noqa: E501 - """ - pass - - def test_delete_experiment_label(self): - """Test case for delete_experiment_label - - Delete experiment label # noqa: E501 - """ - pass - - def test_edit_experiment(self): - """Test case for edit_experiment - - Edit experiment info # noqa: E501 - """ - pass - - def test_get_experiment_metrics(self): - """Test case for get_experiment_metrics - - Get experiment metrics for experiment # noqa: E501 - """ - pass - - def test_get_experiments(self): - """Test case for get_experiments - - List Experiments # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_assignee.py b/Python/test/test_experiments_response.py similarity index 66% rename from Python/test/test_assignee.py rename to Python/test/test_experiments_response.py index 38832aa..a28373c 100644 --- a/Python/test/test_assignee.py +++ b/Python/test/test_experiments_response.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,12 +15,12 @@ import unittest import dagshub_api -from dagshub_api.models.assignee import Assignee # noqa: E501 +from dagshub_api.models.experiments_response import ExperimentsResponse # noqa: E501 from dagshub_api.rest import ApiException -class TestAssignee(unittest.TestCase): - """Assignee unit test stubs""" +class TestExperimentsResponse(unittest.TestCase): + """ExperimentsResponse unit test stubs""" def setUp(self): pass @@ -28,10 +28,10 @@ def setUp(self): def tearDown(self): pass - def testAssignee(self): - """Test Assignee""" + def testExperimentsResponse(self): + """Test ExperimentsResponse""" # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.assignee.Assignee() # noqa: E501 + # model = dagshub_api.models.experiments_response.ExperimentsResponse() # noqa: E501 pass diff --git a/Python/test/test_file.py b/Python/test/test_file.py deleted file mode 100644 index 8499bdc..0000000 --- a/Python/test/test_file.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.file import File # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestFile(unittest.TestCase): - """File unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFile(self): - """Test File""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.file.File() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_files.py b/Python/test/test_files.py index 8c38b35..8de7860 100644 --- a/Python/test/test_files.py +++ b/Python/test/test_files.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_files1.py b/Python/test/test_files1.py index bd8a699..387a92a 100644 --- a/Python/test/test_files1.py +++ b/Python/test/test_files1.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_hooks_id_body.py b/Python/test/test_hooks_id_body.py deleted file mode 100644 index d152731..0000000 --- a/Python/test/test_hooks_id_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.hooks_id_body import HooksIdBody # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestHooksIdBody(unittest.TestCase): - """HooksIdBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testHooksIdBody(self): - """Test HooksIdBody""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.hooks_id_body.HooksIdBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_integration.py b/Python/test/test_integration.py index 6a73c5f..649516e 100644 --- a/Python/test/test_integration.py +++ b/Python/test/test_integration.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_integration_inner.py b/Python/test/test_integration_inner.py deleted file mode 100644 index 73c8eea..0000000 --- a/Python/test/test_integration_inner.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.integration_inner import IntegrationInner # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestIntegrationInner(unittest.TestCase): - """IntegrationInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testIntegrationInner(self): - """Test IntegrationInner""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.integration_inner.IntegrationInner() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_issue.py b/Python/test/test_issue.py index b151e23..26362f0 100644 --- a/Python/test/test_issue.py +++ b/Python/test/test_issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_issue_assignee.py b/Python/test/test_issue_assignee.py deleted file mode 100644 index 49d430b..0000000 --- a/Python/test/test_issue_assignee.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.issue_assignee import IssueAssignee # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestIssueAssignee(unittest.TestCase): - """IssueAssignee unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testIssueAssignee(self): - """Test IssueAssignee""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.issue_assignee.IssueAssignee() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_issue_labels.py b/Python/test/test_issue_labels.py deleted file mode 100644 index c75f483..0000000 --- a/Python/test/test_issue_labels.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.issue_labels import IssueLabels # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestIssueLabels(unittest.TestCase): - """IssueLabels unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testIssueLabels(self): - """Test IssueLabels""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.issue_labels.IssueLabels() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_issue_milestone.py b/Python/test/test_issue_milestone.py deleted file mode 100644 index 80a4f6a..0000000 --- a/Python/test/test_issue_milestone.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.issue_milestone import IssueMilestone # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestIssueMilestone(unittest.TestCase): - """IssueMilestone unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testIssueMilestone(self): - """Test IssueMilestone""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.issue_milestone.IssueMilestone() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_issues.py b/Python/test/test_issues.py index 7f42c3f..40e8bff 100644 --- a/Python/test/test_issues.py +++ b/Python/test/test_issues.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_issues_api.py b/Python/test/test_issues_api.py deleted file mode 100644 index 74207fe..0000000 --- a/Python/test/test_issues_api.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.issues_api import IssuesApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestIssuesApi(unittest.TestCase): - """IssuesApi unit test stubs""" - - def setUp(self): - self.api = IssuesApi() # noqa: E501 - - def tearDown(self): - pass - - def test_create_issue(self): - """Test case for create_issue - - Create an issue # noqa: E501 - """ - pass - - def test_edit_issue(self): - """Test case for edit_issue - - Edit an issue # noqa: E501 - """ - pass - - def test_get_issue(self): - """Test case for get_issue - - Get a single issue # noqa: E501 - """ - pass - - def test_list_repo_issues(self): - """Test case for list_repo_issues - - List issues for a repository # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_labels.py b/Python/test/test_labels.py deleted file mode 100644 index 76750fd..0000000 --- a/Python/test/test_labels.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.labels import Labels # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestLabels(unittest.TestCase): - """Labels unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLabels(self): - """Test Labels""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.labels.Labels() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_migrate_repo.py b/Python/test/test_migrate_repo.py deleted file mode 100644 index 4c194d1..0000000 --- a/Python/test/test_migrate_repo.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.migrate_repo import MigrateRepo # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestMigrateRepo(unittest.TestCase): - """MigrateRepo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMigrateRepo(self): - """Test MigrateRepo""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.migrate_repo.MigrateRepo() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_milestone.py b/Python/test/test_milestone.py deleted file mode 100644 index eb673e7..0000000 --- a/Python/test/test_milestone.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.milestone import Milestone # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestMilestone(unittest.TestCase): - """Milestone unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMilestone(self): - """Test Milestone""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.milestone.Milestone() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_patch_issue.py b/Python/test/test_patch_issue.py index 6c008f9..9b35c35 100644 --- a/Python/test/test_patch_issue.py +++ b/Python/test/test_patch_issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_post_issue.py b/Python/test/test_post_issue.py index 0b8d624..94001be 100644 --- a/Python/test/test_post_issue.py +++ b/Python/test/test_post_issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_put_file.py b/Python/test/test_put_file.py index 17c2474..b922cd2 100644 --- a/Python/test/test_put_file.py +++ b/Python/test/test_put_file.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_releases_api.py b/Python/test/test_releases_api.py deleted file mode 100644 index 8bff563..0000000 --- a/Python/test/test_releases_api.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.releases_api import ReleasesApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestReleasesApi(unittest.TestCase): - """ReleasesApi unit test stubs""" - - def setUp(self): - self.api = ReleasesApi() # noqa: E501 - - def tearDown(self): - pass - - def test_list_releases(self): - """Test case for list_releases - - List Releases # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_repo_hooks_body.py b/Python/test/test_repo_hooks_body.py deleted file mode 100644 index fcdc650..0000000 --- a/Python/test/test_repo_hooks_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.repo_hooks_body import RepoHooksBody # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestRepoHooksBody(unittest.TestCase): - """RepoHooksBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRepoHooksBody(self): - """Test RepoHooksBody""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.repo_hooks_body.RepoHooksBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_repository_api.py b/Python/test/test_repository_api.py deleted file mode 100644 index 091b287..0000000 --- a/Python/test/test_repository_api.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.repository_api import RepositoryApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestRepositoryApi(unittest.TestCase): - """RepositoryApi unit test stubs""" - - def setUp(self): - self.api = RepositoryApi() # noqa: E501 - - def tearDown(self): - pass - - def test_create_org_repo(self): - """Test case for create_org_repo - - Create in organization # noqa: E501 - """ - pass - - def test_create_repo(self): - """Test case for create_repo - - Create # noqa: E501 - """ - pass - - def test_get_repo(self): - """Test case for get_repo - - Get repository information # noqa: E501 - """ - pass - - def test_list_my_repos(self): - """Test case for list_my_repos - - List your repositories # noqa: E501 - """ - pass - - def test_list_org_repos(self): - """Test case for list_org_repos - - List organization repositories # noqa: E501 - """ - pass - - def test_list_user_repos(self): - """Test case for list_user_repos - - List user repositories # noqa: E501 - """ - pass - - def test_migrate_repo(self): - """Test case for migrate_repo - - Migrate repository # noqa: E501 - """ - pass - - def test_search(self): - """Test case for search - - Search repositories # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_state.py b/Python/test/test_state.py deleted file mode 100644 index cbb3621..0000000 --- a/Python/test/test_state.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.state import State # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestState(unittest.TestCase): - """State unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testState(self): - """Test State""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.state.State() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_storage_integrations_api.py b/Python/test/test_storage_integrations_api.py deleted file mode 100644 index 6be88ae..0000000 --- a/Python/test/test_storage_integrations_api.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.storage_integrations_api import StorageIntegrationsApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestStorageIntegrationsApi(unittest.TestCase): - """StorageIntegrationsApi unit test stubs""" - - def setUp(self): - self.api = StorageIntegrationsApi() # noqa: E501 - - def tearDown(self): - pass - - def test_get_bucket_content(self): - """Test case for get_bucket_content - - List contents in the path # noqa: E501 - """ - pass - - def test_get_bucket_file(self): - """Test case for get_bucket_file - - Get file in the bucket # noqa: E501 - """ - pass - - def test_get_buckets(self): - """Test case for get_buckets - - List integrated storages in the repository # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_title.py b/Python/test/test_title.py deleted file mode 100644 index 1937ebf..0000000 --- a/Python/test/test_title.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.title import Title # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestTitle(unittest.TestCase): - """Title unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTitle(self): - """Test Title""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.title.Title() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_user.py b/Python/test/test_user.py index c2689bb..5c44abf 100644 --- a/Python/test/test_user.py +++ b/Python/test/test_user.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_user_api.py b/Python/test/test_user_api.py deleted file mode 100644 index 3696195..0000000 --- a/Python/test/test_user_api.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.user_api import UserApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestUserApi(unittest.TestCase): - """UserApi unit test stubs""" - - def setUp(self): - self.api = UserApi() # noqa: E501 - - def tearDown(self): - pass - - def test_get_authenticated_user(self): - """Test case for get_authenticated_user - - Get authenticated user information # noqa: E501 - """ - pass - - def test_get_user(self): - """Test case for get_user - - Get information about a user # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_webhook_config.py b/Python/test/test_webhook_config.py deleted file mode 100644 index bbe0948..0000000 --- a/Python/test/test_webhook_config.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.webhook_config import WebhookConfig # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestWebhookConfig(unittest.TestCase): - """WebhookConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testWebhookConfig(self): - """Test WebhookConfig""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.webhook_config.WebhookConfig() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_webhook_events.py b/Python/test/test_webhook_events.py deleted file mode 100644 index 8fe2260..0000000 --- a/Python/test/test_webhook_events.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.models.webhook_events import WebhookEvents # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestWebhookEvents(unittest.TestCase): - """WebhookEvents unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testWebhookEvents(self): - """Test WebhookEvents""" - # FIXME: construct object with mandatory attributes with example values - # model = dagshub_api.models.webhook_events.WebhookEvents() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/test/test_webhooks_api.py b/Python/test/test_webhooks_api.py deleted file mode 100644 index e71ce1c..0000000 --- a/Python/test/test_webhooks_api.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - DagsHub API - - This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - - OpenAPI spec version: 1.0.2 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import dagshub_api -from dagshub_api.api.webhooks_api import WebhooksApi # noqa: E501 -from dagshub_api.rest import ApiException - - -class TestWebhooksApi(unittest.TestCase): - """WebhooksApi unit test stubs""" - - def setUp(self): - self.api = WebhooksApi() # noqa: E501 - - def tearDown(self): - pass - - def test_create_hook(self): - """Test case for create_hook - - Create a hook # noqa: E501 - """ - pass - - def test_delete_hook(self): - """Test case for delete_hook - - Delete a hook # noqa: E501 - """ - pass - - def test_edit_hook(self): - """Test case for edit_hook - - Edit a hook # noqa: E501 - """ - pass - - def test_list_hooks(self): - """Test case for list_hooks - - List hooks # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/Python/tox.ini b/Python/tox.ini deleted file mode 100644 index a310bec..0000000 --- a/Python/tox.ini +++ /dev/null @@ -1,10 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - nosetests \ - [] diff --git a/R/.Rbuildignore b/R/.Rbuildignore deleted file mode 100644 index 91114bf..0000000 --- a/R/.Rbuildignore +++ /dev/null @@ -1,2 +0,0 @@ -^.*\.Rproj$ -^\.Rproj\.user$ diff --git a/R/.gitignore b/R/.gitignore deleted file mode 100644 index 5d21150..0000000 --- a/R/.gitignore +++ /dev/null @@ -1,35 +0,0 @@ -# ref: https://github.com/github/gitignore/blob/master/R.gitignore - -# History files -.Rhistory -.Rapp.history - -# Session Data files -.RData - -# Example code in package build process -*-Ex.R - -# Output files from R CMD build -/*.tar.gz - -# Output files from R CMD check -/*.Rcheck/ - -# RStudio files -.Rproj.user/ - -# produced vignettes -vignettes/*.html -vignettes/*.pdf - -# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 -.httr-oauth - -# knitr and R markdown default cache directories -/*_cache/ -/cache/ - -# Temporary files created by R markdown -*.utf8.md -*.knit.md diff --git a/R/.swagger-codegen-ignore b/R/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/R/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/R/.swagger-codegen/VERSION b/R/.swagger-codegen/VERSION deleted file mode 100644 index 053a355..0000000 --- a/R/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.35 \ No newline at end of file diff --git a/R/.travis.yml b/R/.travis.yml deleted file mode 100644 index e69de29..0000000 diff --git a/R/DESCRIPTION b/R/DESCRIPTION deleted file mode 100644 index 8fb0405..0000000 --- a/R/DESCRIPTION +++ /dev/null @@ -1,12 +0,0 @@ -Package: dagshub_api -Title: R Package Client for DagsHub API -Version: 1.0.3 -Authors@R: person("Swagger Codegen community", email = "apiteam@swagger.io", role = c("aut", "cre")) -Description: This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -Depends: R (>= 3.3.3) -Encoding: UTF-8 -License: Unlicense -LazyData: true -Suggests: testthat -Imports: jsonlite, httr, R6 -RoxygenNote: 6.0.1.9000 diff --git a/R/NAMESPACE b/R/NAMESPACE deleted file mode 100644 index f8b1808..0000000 --- a/R/NAMESPACE +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by swagger-codegen: https://github.com/swagger-api/swagger-codegen -# Do not edit by hand - -export(Assignee) -export(Body) -export(Closed) -export(CollaboratorsCollaboratorBody) -export(CreateRepo) -export(EditExperimentPost) -export(ExperimentKeys) -export(Files) -export(Files1) -export(HooksIdBody) -export(Integration) -export(IntegrationInner) -export(Issue) -export(IssueAssignee) -export(IssueLabels) -export(IssueMilestone) -export(Issues) -export(Labels) -export(MigrateRepo) -export(Milestone) -export(PatchIssue) -export(PostIssue) -export(PutFile) -export(RepoHooksBody) -export(State) -export(Title) -export(User) -export(WebhookConfig) -export(WebhookEvents) diff --git a/R/R/ApiClient.r b/R/R/ApiClient.r deleted file mode 100644 index b30965f..0000000 --- a/R/R/ApiClient.r +++ /dev/null @@ -1,70 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' ApiClient Class -#' -#' Generic API client for Swagger client library builds. -#' Swagger generic API client. This client handles the client- -#' server communication, and is invariant across implementations. Specifics of -#' the methods and models for each application are generated from the Swagger -#' templates. -#' -#' NOTE: This class is auto generated by the swagger code generator program. -#' Ref: https://github.com/swagger-api/swagger-codegen -#' Do not edit the class manually. -#' -#' @export -ApiClient <- R6::R6Class( - 'ApiClient', - public = list( - basePath = "https://dagshub.com/api/v1", - configuration = NULL, - userAgent = NULL, - defaultHeaders = NULL, - initialize = function(basePath, configuration, defaultHeaders){ - if (!missing(basePath)) { - self$basePath <- basePath - } - - if (!missing(configuration)) { - self$configuration <- configuration - } - - if (!missing(defaultHeaders)) { - self$defaultHeaders <- defaultHeaders - } - - self$`userAgent` <- 'Swagger-Codegen/1.0.3/r' - }, - callApi = function(url, method, queryParams, headerParams, body, ...){ - headers <- httr::add_headers(headerParams) - - if (method == "GET") { - httr::GET(url, queryParams, headers, ...) - } - else if (method == "POST") { - httr::POST(url, queryParams, headers, body = body, ...) - } - else if (method == "PUT") { - httr::PUT(url, queryParams, headers, body = body, ...) - } - else if (method == "PATCH") { - httr::PATCH(url, queryParams, headers, body = body, ...) - } - else if (method == "HEAD") { - httr::HEAD(url, queryParams, headers, ...) - } - else if (method == "DELETE") { - httr::DELETE(url, queryParams, headers, ...) - } - else { - stop("http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`.") - } - } - ) -) \ No newline at end of file diff --git a/R/R/Body.r b/R/R/Body.r deleted file mode 100644 index e7fa702..0000000 --- a/R/R/Body.r +++ /dev/null @@ -1,38 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' Body Class -#' -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -Body <- R6::R6Class( - 'Body', - public = list( - initialize = function(){ - }, - toJSON = function() { - BodyObject <- list() - - BodyObject - }, - fromJSON = function(BodyJson) { - BodyObject <- jsonlite::fromJSON(BodyJson) - }, - toJSONString = function() { - sprintf( - '{ - }', - ) - }, - fromJSONString = function(BodyJson) { - BodyObject <- jsonlite::fromJSON(BodyJson) - } - ) -) diff --git a/R/R/BranchesApi.r b/R/R/BranchesApi.r deleted file mode 100644 index 5f2bfe0..0000000 --- a/R/R/BranchesApi.r +++ /dev/null @@ -1,106 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title Branches operations -#' @description dagshub_api.Branches -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' get_branch Get Branch -#' -#' -#' list_branches List Branches -#' -#' } -#' -#' @export -BranchesApi <- R6::R6Class( - 'BranchesApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - get_branch = function(owner, repo, branch, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/branches/{branch}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`branch`)) { - urlPath <- gsub(paste0("\\{", "branch", "\\}"), `branch`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - list_branches = function(owner, repo, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/branches" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/R/Closed.r b/R/R/Closed.r deleted file mode 100644 index 35c3ead..0000000 --- a/R/R/Closed.r +++ /dev/null @@ -1,38 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' Closed Class -#' -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -Closed <- R6::R6Class( - 'Closed', - public = list( - initialize = function(){ - }, - toJSON = function() { - ClosedObject <- list() - - ClosedObject - }, - fromJSON = function(ClosedJson) { - ClosedObject <- jsonlite::fromJSON(ClosedJson) - }, - toJSONString = function() { - sprintf( - '{ - }', - ) - }, - fromJSONString = function(ClosedJson) { - ClosedObject <- jsonlite::fromJSON(ClosedJson) - } - ) -) diff --git a/R/R/CollaboratorsApi.r b/R/R/CollaboratorsApi.r deleted file mode 100644 index 0b27cc3..0000000 --- a/R/R/CollaboratorsApi.r +++ /dev/null @@ -1,149 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title Collaborators operations -#' @description dagshub_api.Collaborators -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' add_collaborator Add user as a collaborator -#' -#' -#' get_collaborators Get collaborators -#' -#' -#' remove_collaborator Delete collaborator -#' -#' } -#' -#' @export -CollaboratorsApi <- R6::R6Class( - 'CollaboratorsApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - add_collaborator = function(owner, repo, collaborator, body, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`body`)) { - body <- `body`$toJSONString() - } else { - body <- NULL - } - - urlPath <- "/repos/{owner}/{repo}/collaborators/{collaborator}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`collaborator`)) { - urlPath <- gsub(paste0("\\{", "collaborator", "\\}"), `collaborator`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "PUT", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - get_collaborators = function(owner, repo, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/collaborators" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - remove_collaborator = function(owner, repo, collaborator, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/collaborators/{collaborator}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`collaborator`)) { - urlPath <- gsub(paste0("\\{", "collaborator", "\\}"), `collaborator`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "DELETE", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/R/CollaboratorsCollaboratorBody.r b/R/R/CollaboratorsCollaboratorBody.r deleted file mode 100644 index ce2b5d3..0000000 --- a/R/R/CollaboratorsCollaboratorBody.r +++ /dev/null @@ -1,53 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' CollaboratorsCollaboratorBody Class -#' -#' @field permission -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -CollaboratorsCollaboratorBody <- R6::R6Class( - 'CollaboratorsCollaboratorBody', - public = list( - `permission` = NULL, - initialize = function(`permission`){ - if (!missing(`permission`)) { - stopifnot(is.character(`permission`), length(`permission`) == 1) - self$`permission` <- `permission` - } - }, - toJSON = function() { - CollaboratorsCollaboratorBodyObject <- list() - if (!is.null(self$`permission`)) { - CollaboratorsCollaboratorBodyObject[['permission']] <- self$`permission` - } - - CollaboratorsCollaboratorBodyObject - }, - fromJSON = function(CollaboratorsCollaboratorBodyJson) { - CollaboratorsCollaboratorBodyObject <- jsonlite::fromJSON(CollaboratorsCollaboratorBodyJson) - if (!is.null(CollaboratorsCollaboratorBodyObject$`permission`)) { - self$`permission` <- CollaboratorsCollaboratorBodyObject$`permission` - } - }, - toJSONString = function() { - sprintf( - '{ - "permission": %s - }', - self$`permission` - ) - }, - fromJSONString = function(CollaboratorsCollaboratorBodyJson) { - CollaboratorsCollaboratorBodyObject <- jsonlite::fromJSON(CollaboratorsCollaboratorBodyJson) - self$`permission` <- CollaboratorsCollaboratorBodyObject$`permission` - } - ) -) diff --git a/R/R/CommitsApi.r b/R/R/CommitsApi.r deleted file mode 100644 index d51ebdc..0000000 --- a/R/R/CommitsApi.r +++ /dev/null @@ -1,73 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title Commits operations -#' @description dagshub_api.Commits -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' get_commit Get a single commit -#' -#' } -#' -#' @export -CommitsApi <- R6::R6Class( - 'CommitsApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - get_commit = function(owner, repo, sha, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/commits/{sha}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`sha`)) { - urlPath <- gsub(paste0("\\{", "sha", "\\}"), `sha`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/R/ContentApi.r b/R/R/ContentApi.r deleted file mode 100644 index 019909f..0000000 --- a/R/R/ContentApi.r +++ /dev/null @@ -1,216 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title Content operations -#' @description dagshub_api.Content -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' get_archive Download archive -#' -#' -#' get_content List data in a repository folder -#' -#' -#' get_raw Download raw content -#' -#' -#' upload_content Upload data to a repository -#' -#' } -#' -#' @export -ContentApi <- R6::R6Class( - 'ContentApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - get_archive = function(owner, repo, ref, format, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/archive/{ref}{format}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`ref`)) { - urlPath <- gsub(paste0("\\{", "ref", "\\}"), `ref`, urlPath) - } - - if (!missing(`format`)) { - urlPath <- gsub(paste0("\\{", "format", "\\}"), `format`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - get_content = function(owner, repo, branch, path, include_size, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`include_size`)) { - queryParams['include_size'] <- include_size - } - - urlPath <- "/repos/{owner}/{repo}/content/{branch}/{path}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`branch`)) { - urlPath <- gsub(paste0("\\{", "branch", "\\}"), `branch`, urlPath) - } - - if (!missing(`path`)) { - urlPath <- gsub(paste0("\\{", "path", "\\}"), `path`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - returnObject <- Files$new() - result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) - Response$new(returnObject, resp) - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - get_raw = function(owner, repo, ref, path, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/raw/{ref}/{path}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`ref`)) { - urlPath <- gsub(paste0("\\{", "ref", "\\}"), `ref`, urlPath) - } - - if (!missing(`path`)) { - urlPath <- gsub(paste0("\\{", "path", "\\}"), `path`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - upload_content = function(owner, repo, branch, path, commit_summary, commit_message, commit_choice, last_commit, new_branch_name, versioning, files, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - body <- list( - "commit_summary" = commit_summary, - "commit_message" = commit_message, - "commit_choice" = commit_choice, - "last_commit" = last_commit, - "new_branch_name" = new_branch_name, - "versioning" = versioning, - "files" = files - ) - - urlPath <- "/repos/{owner}/{repo}/content/{branch}/{path}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`branch`)) { - urlPath <- gsub(paste0("\\{", "branch", "\\}"), `branch`, urlPath) - } - - if (!missing(`path`)) { - urlPath <- gsub(paste0("\\{", "path", "\\}"), `path`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "PUT", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/R/CreateRepo.r b/R/R/CreateRepo.r deleted file mode 100644 index aa93365..0000000 --- a/R/R/CreateRepo.r +++ /dev/null @@ -1,156 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' CreateRepo Class -#' -#' @field name -#' @field description -#' @field private -#' @field auto_init -#' @field project_template -#' @field gitignores -#' @field license -#' @field readme -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -CreateRepo <- R6::R6Class( - 'CreateRepo', - public = list( - `name` = NULL, - `description` = NULL, - `private` = NULL, - `auto_init` = NULL, - `project_template` = NULL, - `gitignores` = NULL, - `license` = NULL, - `readme` = NULL, - initialize = function(`name`, `description`, `private`, `auto_init`, `project_template`, `gitignores`, `license`, `readme`){ - if (!missing(`name`)) { - stopifnot(is.character(`name`), length(`name`) == 1) - self$`name` <- `name` - } - if (!missing(`description`)) { - stopifnot(is.character(`description`), length(`description`) == 1) - self$`description` <- `description` - } - if (!missing(`private`)) { - self$`private` <- `private` - } - if (!missing(`auto_init`)) { - self$`auto_init` <- `auto_init` - } - if (!missing(`project_template`)) { - stopifnot(is.character(`project_template`), length(`project_template`) == 1) - self$`project_template` <- `project_template` - } - if (!missing(`gitignores`)) { - stopifnot(is.character(`gitignores`), length(`gitignores`) == 1) - self$`gitignores` <- `gitignores` - } - if (!missing(`license`)) { - stopifnot(is.character(`license`), length(`license`) == 1) - self$`license` <- `license` - } - if (!missing(`readme`)) { - stopifnot(is.character(`readme`), length(`readme`) == 1) - self$`readme` <- `readme` - } - }, - toJSON = function() { - CreateRepoObject <- list() - if (!is.null(self$`name`)) { - CreateRepoObject[['name']] <- self$`name` - } - if (!is.null(self$`description`)) { - CreateRepoObject[['description']] <- self$`description` - } - if (!is.null(self$`private`)) { - CreateRepoObject[['private']] <- self$`private` - } - if (!is.null(self$`auto_init`)) { - CreateRepoObject[['auto_init']] <- self$`auto_init` - } - if (!is.null(self$`project_template`)) { - CreateRepoObject[['project_template']] <- self$`project_template` - } - if (!is.null(self$`gitignores`)) { - CreateRepoObject[['gitignores']] <- self$`gitignores` - } - if (!is.null(self$`license`)) { - CreateRepoObject[['license']] <- self$`license` - } - if (!is.null(self$`readme`)) { - CreateRepoObject[['readme']] <- self$`readme` - } - - CreateRepoObject - }, - fromJSON = function(CreateRepoJson) { - CreateRepoObject <- jsonlite::fromJSON(CreateRepoJson) - if (!is.null(CreateRepoObject$`name`)) { - self$`name` <- CreateRepoObject$`name` - } - if (!is.null(CreateRepoObject$`description`)) { - self$`description` <- CreateRepoObject$`description` - } - if (!is.null(CreateRepoObject$`private`)) { - self$`private` <- CreateRepoObject$`private` - } - if (!is.null(CreateRepoObject$`auto_init`)) { - self$`auto_init` <- CreateRepoObject$`auto_init` - } - if (!is.null(CreateRepoObject$`project_template`)) { - self$`project_template` <- CreateRepoObject$`project_template` - } - if (!is.null(CreateRepoObject$`gitignores`)) { - self$`gitignores` <- CreateRepoObject$`gitignores` - } - if (!is.null(CreateRepoObject$`license`)) { - self$`license` <- CreateRepoObject$`license` - } - if (!is.null(CreateRepoObject$`readme`)) { - self$`readme` <- CreateRepoObject$`readme` - } - }, - toJSONString = function() { - sprintf( - '{ - "name": %s, - "description": %s, - "private": %s, - "auto_init": %s, - "project_template": %s, - "gitignores": %s, - "license": %s, - "readme": %s - }', - self$`name`, - self$`description`, - self$`private`, - self$`auto_init`, - self$`project_template`, - self$`gitignores`, - self$`license`, - self$`readme` - ) - }, - fromJSONString = function(CreateRepoJson) { - CreateRepoObject <- jsonlite::fromJSON(CreateRepoJson) - self$`name` <- CreateRepoObject$`name` - self$`description` <- CreateRepoObject$`description` - self$`private` <- CreateRepoObject$`private` - self$`auto_init` <- CreateRepoObject$`auto_init` - self$`project_template` <- CreateRepoObject$`project_template` - self$`gitignores` <- CreateRepoObject$`gitignores` - self$`license` <- CreateRepoObject$`license` - self$`readme` <- CreateRepoObject$`readme` - } - ) -) diff --git a/R/R/EditExperimentPost.r b/R/R/EditExperimentPost.r deleted file mode 100644 index 93968e0..0000000 --- a/R/R/EditExperimentPost.r +++ /dev/null @@ -1,53 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' EditExperimentPost Class -#' -#' @field name -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -EditExperimentPost <- R6::R6Class( - 'EditExperimentPost', - public = list( - `name` = NULL, - initialize = function(`name`){ - if (!missing(`name`)) { - stopifnot(is.character(`name`), length(`name`) == 1) - self$`name` <- `name` - } - }, - toJSON = function() { - EditExperimentPostObject <- list() - if (!is.null(self$`name`)) { - EditExperimentPostObject[['name']] <- self$`name` - } - - EditExperimentPostObject - }, - fromJSON = function(EditExperimentPostJson) { - EditExperimentPostObject <- jsonlite::fromJSON(EditExperimentPostJson) - if (!is.null(EditExperimentPostObject$`name`)) { - self$`name` <- EditExperimentPostObject$`name` - } - }, - toJSONString = function() { - sprintf( - '{ - "name": %s - }', - self$`name` - ) - }, - fromJSONString = function(EditExperimentPostJson) { - EditExperimentPostObject <- jsonlite::fromJSON(EditExperimentPostJson) - self$`name` <- EditExperimentPostObject$`name` - } - ) -) diff --git a/R/R/Element.r b/R/R/Element.r deleted file mode 100644 index c8b6632..0000000 --- a/R/R/Element.r +++ /dev/null @@ -1,24 +0,0 @@ -#' Element Class -#' -#' Element Class -#' @export -Element <- R6::R6Class( - 'Element', - public = list( - id = NULL, - name = NULL, - initialize = function(id,name){ - if (!missing(id)) { - stopifnot(is.numeric(id), length(id) == 1) - self$id <- id - } - if (!missing(name)) { - stopifnot(is.character(name), length(name) == 1) - self$name <- name - } - }, - toJSON = function() { - sprintf('{"id":%d,"name":"%s"}', self$id, self$name) - } - ) -) \ No newline at end of file diff --git a/R/R/ExperimentKeys.r b/R/R/ExperimentKeys.r index 3c9689b..ed982c0 100644 --- a/R/R/ExperimentKeys.r +++ b/R/R/ExperimentKeys.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/Assignee.r b/R/R/ExperimentMetricsResponse.r similarity index 55% rename from R/R/Assignee.r rename to R/R/ExperimentMetricsResponse.r index ac5a308..0e2e20f 100644 --- a/R/R/Assignee.r +++ b/R/R/ExperimentMetricsResponse.r @@ -2,28 +2,28 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git -#' Assignee Class +#' ExperimentMetricsResponse Class #' #' #' @importFrom R6 R6Class #' @importFrom jsonlite fromJSON toJSON #' @export -Assignee <- R6::R6Class( - 'Assignee', +ExperimentMetricsResponse <- R6::R6Class( + 'ExperimentMetricsResponse', public = list( initialize = function(){ }, toJSON = function() { - AssigneeObject <- list() + ExperimentMetricsResponseObject <- list() - AssigneeObject + ExperimentMetricsResponseObject }, - fromJSON = function(AssigneeJson) { - AssigneeObject <- jsonlite::fromJSON(AssigneeJson) + fromJSON = function(ExperimentMetricsResponseJson) { + ExperimentMetricsResponseObject <- jsonlite::fromJSON(ExperimentMetricsResponseJson) }, toJSONString = function() { sprintf( @@ -31,8 +31,8 @@ Assignee <- R6::R6Class( }', ) }, - fromJSONString = function(AssigneeJson) { - AssigneeObject <- jsonlite::fromJSON(AssigneeJson) + fromJSONString = function(ExperimentMetricsResponseJson) { + ExperimentMetricsResponseObject <- jsonlite::fromJSON(ExperimentMetricsResponseJson) } ) ) diff --git a/R/R/ExperimentsApi.r b/R/R/ExperimentsApi.r deleted file mode 100644 index ae50345..0000000 --- a/R/R/ExperimentsApi.r +++ /dev/null @@ -1,270 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title Experiments operations -#' @description dagshub_api.Experiments -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' add_experiment_label Add label to experiment -#' -#' -#' delete_experiment Delete experiment -#' -#' -#' delete_experiment_label Delete experiment label -#' -#' -#' edit_experiment Edit experiment info -#' -#' -#' get_experiment_metrics Get experiment metrics for experiment -#' -#' -#' get_experiments List Experiments -#' -#' } -#' -#' @export -ExperimentsApi <- R6::R6Class( - 'ExperimentsApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - add_experiment_label = function(owner, repo, experiment_key, experiment_label, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`experiment_key`)) { - urlPath <- gsub(paste0("\\{", "experimentKey", "\\}"), `experiment_key`, urlPath) - } - - if (!missing(`experiment_label`)) { - urlPath <- gsub(paste0("\\{", "experimentLabel", "\\}"), `experiment_label`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "POST", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - delete_experiment = function(owner, repo, experiment_key, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`experiment_key`)) { - urlPath <- gsub(paste0("\\{", "experimentKey", "\\}"), `experiment_key`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "DELETE", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - delete_experiment_label = function(owner, repo, experiment_key, experiment_label, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`experiment_key`)) { - urlPath <- gsub(paste0("\\{", "experimentKey", "\\}"), `experiment_key`, urlPath) - } - - if (!missing(`experiment_label`)) { - urlPath <- gsub(paste0("\\{", "experimentLabel", "\\}"), `experiment_label`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "DELETE", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - edit_experiment = function(owner, repo, experiment_key, body, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`body`)) { - body <- `body`$toJSONString() - } else { - body <- NULL - } - - urlPath <- "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`experiment_key`)) { - urlPath <- gsub(paste0("\\{", "experimentKey", "\\}"), `experiment_key`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "POST", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - get_experiment_metrics = function(owner, repo, body, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`body`)) { - body <- `body`$toJSONString() - } else { - body <- NULL - } - - urlPath <- "/repos/{owner}/{repo}/experiments/metricsForExperiments" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "POST", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - get_experiments = function(owner, repo, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/experiments" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/R/ExperimentsResponse.r b/R/R/ExperimentsResponse.r new file mode 100644 index 0000000..c6cca2b --- /dev/null +++ b/R/R/ExperimentsResponse.r @@ -0,0 +1,85 @@ +# DagsHub API +# +# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. +# +# OpenAPI spec version: 1.0.3 +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git + +#' ExperimentsResponse Class +#' +#' @field experiments +#' @field isEditor +#' @field nextPageToken +#' +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +ExperimentsResponse <- R6::R6Class( + 'ExperimentsResponse', + public = list( + `experiments` = NULL, + `isEditor` = NULL, + `nextPageToken` = NULL, + initialize = function(`experiments`, `isEditor`, `nextPageToken`){ + if (!missing(`experiments`)) { + stopifnot(R6::is.R6(`experiments`)) + self$`experiments` <- `experiments` + } + if (!missing(`isEditor`)) { + self$`isEditor` <- `isEditor` + } + if (!missing(`nextPageToken`)) { + stopifnot(is.character(`nextPageToken`), length(`nextPageToken`) == 1) + self$`nextPageToken` <- `nextPageToken` + } + }, + toJSON = function() { + ExperimentsResponseObject <- list() + if (!is.null(self$`experiments`)) { + ExperimentsResponseObject[['experiments']] <- self$`experiments`$toJSON() + } + if (!is.null(self$`isEditor`)) { + ExperimentsResponseObject[['isEditor']] <- self$`isEditor` + } + if (!is.null(self$`nextPageToken`)) { + ExperimentsResponseObject[['nextPageToken']] <- self$`nextPageToken` + } + + ExperimentsResponseObject + }, + fromJSON = function(ExperimentsResponseJson) { + ExperimentsResponseObject <- jsonlite::fromJSON(ExperimentsResponseJson) + if (!is.null(ExperimentsResponseObject$`experiments`)) { + experimentsObject <- ComponentsschemasExperimentYaml$new() + experimentsObject$fromJSON(jsonlite::toJSON(ExperimentsResponseObject$experiments, auto_unbox = TRUE)) + self$`experiments` <- experimentsObject + } + if (!is.null(ExperimentsResponseObject$`isEditor`)) { + self$`isEditor` <- ExperimentsResponseObject$`isEditor` + } + if (!is.null(ExperimentsResponseObject$`nextPageToken`)) { + self$`nextPageToken` <- ExperimentsResponseObject$`nextPageToken` + } + }, + toJSONString = function() { + sprintf( + '{ + "experiments": %s, + "isEditor": %s, + "nextPageToken": %s + }', + self$`experiments`$toJSON(), + self$`isEditor`, + self$`nextPageToken` + ) + }, + fromJSONString = function(ExperimentsResponseJson) { + ExperimentsResponseObject <- jsonlite::fromJSON(ExperimentsResponseJson) + ComponentsschemasExperimentYamlObject <- ComponentsschemasExperimentYaml$new() + self$`experiments` <- ComponentsschemasExperimentYamlObject$fromJSON(jsonlite::toJSON(ExperimentsResponseObject$experiments, auto_unbox = TRUE)) + self$`isEditor` <- ExperimentsResponseObject$`isEditor` + self$`nextPageToken` <- ExperimentsResponseObject$`nextPageToken` + } + ) +) diff --git a/R/R/Files.r b/R/R/Files.r index b91d163..05b5af5 100644 --- a/R/R/Files.r +++ b/R/R/Files.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/Files1.r b/R/R/Files1.r index fd8c72e..e1f0820 100644 --- a/R/R/Files1.r +++ b/R/R/Files1.r @@ -2,14 +2,13 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' Files1 Class #' #' @field entries -#' @field limit #' @field next_token #' #' @importFrom R6 R6Class @@ -19,18 +18,13 @@ Files1 <- R6::R6Class( 'Files1', public = list( `entries` = NULL, - `limit` = NULL, `next_token` = NULL, - initialize = function(`entries`, `limit`, `next_token`){ + initialize = function(`entries`, `next_token`){ if (!missing(`entries`)) { stopifnot(is.list(`entries`), length(`entries`) != 0) lapply(`entries`, function(x) stopifnot(R6::is.R6(x))) self$`entries` <- `entries` } - if (!missing(`limit`)) { - stopifnot(is.numeric(`limit`), length(`limit`) == 1) - self$`limit` <- `limit` - } if (!missing(`next_token`)) { stopifnot(is.character(`next_token`), length(`next_token`) == 1) self$`next_token` <- `next_token` @@ -41,9 +35,6 @@ Files1 <- R6::R6Class( if (!is.null(self$`entries`)) { Files1Object[['entries']] <- lapply(self$`entries`, function(x) x$toJSON()) } - if (!is.null(self$`limit`)) { - Files1Object[['limit']] <- self$`limit` - } if (!is.null(self$`next_token`)) { Files1Object[['next_token']] <- self$`next_token` } @@ -54,14 +45,11 @@ Files1 <- R6::R6Class( Files1Object <- jsonlite::fromJSON(Files1Json) if (!is.null(Files1Object$`entries`)) { self$`entries` <- lapply(Files1Object$`entries`, function(x) { - entriesObject <- File$new() + entriesObject <- ComponentsschemasFileYaml$new() entriesObject$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE)) entriesObject }) } - if (!is.null(Files1Object$`limit`)) { - self$`limit` <- Files1Object$`limit` - } if (!is.null(Files1Object$`next_token`)) { self$`next_token` <- Files1Object$`next_token` } @@ -70,18 +58,15 @@ Files1 <- R6::R6Class( sprintf( '{ "entries": [%s], - "limit": %d, "next_token": %s }', lapply(self$`entries`, function(x) paste(x$toJSON(), sep=",")), - self$`limit`, self$`next_token` ) }, fromJSONString = function(Files1Json) { Files1Object <- jsonlite::fromJSON(Files1Json) - self$`entries` <- lapply(Files1Object$`entries`, function(x) File$new()$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE))) - self$`limit` <- Files1Object$`limit` + self$`entries` <- lapply(Files1Object$`entries`, function(x) ComponentsschemasFileYaml$new()$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE))) self$`next_token` <- Files1Object$`next_token` } ) diff --git a/R/R/HooksIdBody.r b/R/R/HooksIdBody.r deleted file mode 100644 index a0b35fc..0000000 --- a/R/R/HooksIdBody.r +++ /dev/null @@ -1,88 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' HooksIdBody Class -#' -#' @field config -#' @field events -#' @field active -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -HooksIdBody <- R6::R6Class( - 'HooksIdBody', - public = list( - `config` = NULL, - `events` = NULL, - `active` = NULL, - initialize = function(`config`, `events`, `active`){ - if (!missing(`config`)) { - stopifnot(R6::is.R6(`config`)) - self$`config` <- `config` - } - if (!missing(`events`)) { - stopifnot(R6::is.R6(`events`)) - self$`events` <- `events` - } - if (!missing(`active`)) { - self$`active` <- `active` - } - }, - toJSON = function() { - HooksIdBodyObject <- list() - if (!is.null(self$`config`)) { - HooksIdBodyObject[['config']] <- self$`config`$toJSON() - } - if (!is.null(self$`events`)) { - HooksIdBodyObject[['events']] <- self$`events`$toJSON() - } - if (!is.null(self$`active`)) { - HooksIdBodyObject[['active']] <- self$`active` - } - - HooksIdBodyObject - }, - fromJSON = function(HooksIdBodyJson) { - HooksIdBodyObject <- jsonlite::fromJSON(HooksIdBodyJson) - if (!is.null(HooksIdBodyObject$`config`)) { - configObject <- WebhookConfig$new() - configObject$fromJSON(jsonlite::toJSON(HooksIdBodyObject$config, auto_unbox = TRUE)) - self$`config` <- configObject - } - if (!is.null(HooksIdBodyObject$`events`)) { - eventsObject <- WebhookEvents$new() - eventsObject$fromJSON(jsonlite::toJSON(HooksIdBodyObject$events, auto_unbox = TRUE)) - self$`events` <- eventsObject - } - if (!is.null(HooksIdBodyObject$`active`)) { - self$`active` <- HooksIdBodyObject$`active` - } - }, - toJSONString = function() { - sprintf( - '{ - "config": %s, - "events": %s, - "active": %s - }', - self$`config`$toJSON(), - self$`events`$toJSON(), - self$`active` - ) - }, - fromJSONString = function(HooksIdBodyJson) { - HooksIdBodyObject <- jsonlite::fromJSON(HooksIdBodyJson) - WebhookConfigObject <- WebhookConfig$new() - self$`config` <- WebhookConfigObject$fromJSON(jsonlite::toJSON(HooksIdBodyObject$config, auto_unbox = TRUE)) - WebhookEventsObject <- WebhookEvents$new() - self$`events` <- WebhookEventsObject$fromJSON(jsonlite::toJSON(HooksIdBodyObject$events, auto_unbox = TRUE)) - self$`active` <- HooksIdBodyObject$`active` - } - ) -) diff --git a/R/R/Integration.r b/R/R/Integration.r index e6fa59c..48c9d89 100644 --- a/R/R/Integration.r +++ b/R/R/Integration.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/IntegrationInner.r b/R/R/IntegrationInner.r deleted file mode 100644 index 3c2bba3..0000000 --- a/R/R/IntegrationInner.r +++ /dev/null @@ -1,83 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' IntegrationInner Class -#' -#' @field name -#' @field protocol -#' @field list_path -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -IntegrationInner <- R6::R6Class( - 'IntegrationInner', - public = list( - `name` = NULL, - `protocol` = NULL, - `list_path` = NULL, - initialize = function(`name`, `protocol`, `list_path`){ - if (!missing(`name`)) { - stopifnot(is.character(`name`), length(`name`) == 1) - self$`name` <- `name` - } - if (!missing(`protocol`)) { - stopifnot(is.character(`protocol`), length(`protocol`) == 1) - self$`protocol` <- `protocol` - } - if (!missing(`list_path`)) { - stopifnot(is.character(`list_path`), length(`list_path`) == 1) - self$`list_path` <- `list_path` - } - }, - toJSON = function() { - IntegrationInnerObject <- list() - if (!is.null(self$`name`)) { - IntegrationInnerObject[['name']] <- self$`name` - } - if (!is.null(self$`protocol`)) { - IntegrationInnerObject[['protocol']] <- self$`protocol` - } - if (!is.null(self$`list_path`)) { - IntegrationInnerObject[['list_path']] <- self$`list_path` - } - - IntegrationInnerObject - }, - fromJSON = function(IntegrationInnerJson) { - IntegrationInnerObject <- jsonlite::fromJSON(IntegrationInnerJson) - if (!is.null(IntegrationInnerObject$`name`)) { - self$`name` <- IntegrationInnerObject$`name` - } - if (!is.null(IntegrationInnerObject$`protocol`)) { - self$`protocol` <- IntegrationInnerObject$`protocol` - } - if (!is.null(IntegrationInnerObject$`list_path`)) { - self$`list_path` <- IntegrationInnerObject$`list_path` - } - }, - toJSONString = function() { - sprintf( - '{ - "name": %s, - "protocol": %s, - "list_path": %s - }', - self$`name`, - self$`protocol`, - self$`list_path` - ) - }, - fromJSONString = function(IntegrationInnerJson) { - IntegrationInnerObject <- jsonlite::fromJSON(IntegrationInnerJson) - self$`name` <- IntegrationInnerObject$`name` - self$`protocol` <- IntegrationInnerObject$`protocol` - self$`list_path` <- IntegrationInnerObject$`list_path` - } - ) -) diff --git a/R/R/Issue.r b/R/R/Issue.r index 6a04aaf..9007cdd 100644 --- a/R/R/Issue.r +++ b/R/R/Issue.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git @@ -21,7 +21,6 @@ #' @field created_at #' @field updated_at #' @field pull_request -#' @field closed #' #' @importFrom R6 R6Class #' @importFrom jsonlite fromJSON toJSON @@ -42,8 +41,7 @@ Issue <- R6::R6Class( `created_at` = NULL, `updated_at` = NULL, `pull_request` = NULL, - `closed` = NULL, - initialize = function(`id`, `number`, `user`, `title`, `body`, `labels`, `milestone`, `assignee`, `state`, `comments`, `created_at`, `updated_at`, `pull_request`, `closed`){ + initialize = function(`id`, `number`, `user`, `title`, `body`, `labels`, `milestone`, `assignee`, `state`, `comments`, `created_at`, `updated_at`, `pull_request`){ if (!missing(`id`)) { stopifnot(is.numeric(`id`), length(`id`) == 1) self$`id` <- `id` @@ -57,11 +55,11 @@ Issue <- R6::R6Class( self$`user` <- `user` } if (!missing(`title`)) { - stopifnot(R6::is.R6(`title`)) + stopifnot(is.character(`title`), length(`title`) == 1) self$`title` <- `title` } if (!missing(`body`)) { - stopifnot(R6::is.R6(`body`)) + stopifnot(is.character(`body`), length(`body`) == 1) self$`body` <- `body` } if (!missing(`labels`)) { @@ -97,9 +95,6 @@ Issue <- R6::R6Class( stopifnot(R6::is.R6(`pull_request`)) self$`pull_request` <- `pull_request` } - if (!missing(`closed`)) { - self$`closed` <- `closed` - } }, toJSON = function() { IssueObject <- list() @@ -113,10 +108,10 @@ Issue <- R6::R6Class( IssueObject[['user']] <- self$`user`$toJSON() } if (!is.null(self$`title`)) { - IssueObject[['title']] <- self$`title`$toJSON() + IssueObject[['title']] <- self$`title` } if (!is.null(self$`body`)) { - IssueObject[['body']] <- self$`body`$toJSON() + IssueObject[['body']] <- self$`body` } if (!is.null(self$`labels`)) { IssueObject[['labels']] <- lapply(self$`labels`, function(x) x$toJSON()) @@ -142,9 +137,6 @@ Issue <- R6::R6Class( if (!is.null(self$`pull_request`)) { IssueObject[['pull_request']] <- self$`pull_request`$toJSON() } - if (!is.null(self$`closed`)) { - IssueObject[['closed']] <- self$`closed` - } IssueObject }, @@ -157,34 +149,30 @@ Issue <- R6::R6Class( self$`number` <- IssueObject$`number` } if (!is.null(IssueObject$`user`)) { - userObject <- User$new() + userObject <- ComponentsschemasUserYaml$new() userObject$fromJSON(jsonlite::toJSON(IssueObject$user, auto_unbox = TRUE)) self$`user` <- userObject } if (!is.null(IssueObject$`title`)) { - titleObject <- Title$new() - titleObject$fromJSON(jsonlite::toJSON(IssueObject$title, auto_unbox = TRUE)) - self$`title` <- titleObject + self$`title` <- IssueObject$`title` } if (!is.null(IssueObject$`body`)) { - bodyObject <- Body$new() - bodyObject$fromJSON(jsonlite::toJSON(IssueObject$body, auto_unbox = TRUE)) - self$`body` <- bodyObject + self$`body` <- IssueObject$`body` } if (!is.null(IssueObject$`labels`)) { self$`labels` <- lapply(IssueObject$`labels`, function(x) { - labelsObject <- IssueLabels$new() + labelsObject <- TODO_OBJECT_MAPPING$new() labelsObject$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE)) labelsObject }) } if (!is.null(IssueObject$`milestone`)) { - milestoneObject <- IssueMilestone$new() + milestoneObject <- TODO_OBJECT_MAPPING$new() milestoneObject$fromJSON(jsonlite::toJSON(IssueObject$milestone, auto_unbox = TRUE)) self$`milestone` <- milestoneObject } if (!is.null(IssueObject$`assignee`)) { - assigneeObject <- IssueAssignee$new() + assigneeObject <- ComponentsschemasUserYaml$new() assigneeObject$fromJSON(jsonlite::toJSON(IssueObject$assignee, auto_unbox = TRUE)) self$`assignee` <- assigneeObject } @@ -205,9 +193,6 @@ Issue <- R6::R6Class( pull_requestObject$fromJSON(jsonlite::toJSON(IssueObject$pull_request, auto_unbox = TRUE)) self$`pull_request` <- pull_requestObject } - if (!is.null(IssueObject$`closed`)) { - self$`closed` <- IssueObject$`closed` - } }, toJSONString = function() { sprintf( @@ -224,14 +209,13 @@ Issue <- R6::R6Class( "comments": %d, "created_at": %s, "updated_at": %s, - "pull_request": %s, - "closed": %s + "pull_request": %s }', self$`id`, self$`number`, self$`user`$toJSON(), - self$`title`$toJSON(), - self$`body`$toJSON(), + self$`title`, + self$`body`, lapply(self$`labels`, function(x) paste(x$toJSON(), sep=",")), self$`milestone`$toJSON(), self$`assignee`$toJSON(), @@ -239,32 +223,28 @@ Issue <- R6::R6Class( self$`comments`, self$`created_at`, self$`updated_at`, - self$`pull_request`$toJSON(), - self$`closed` + self$`pull_request`$toJSON() ) }, fromJSONString = function(IssueJson) { IssueObject <- jsonlite::fromJSON(IssueJson) self$`id` <- IssueObject$`id` self$`number` <- IssueObject$`number` - UserObject <- User$new() - self$`user` <- UserObject$fromJSON(jsonlite::toJSON(IssueObject$user, auto_unbox = TRUE)) - TitleObject <- Title$new() - self$`title` <- TitleObject$fromJSON(jsonlite::toJSON(IssueObject$title, auto_unbox = TRUE)) - BodyObject <- Body$new() - self$`body` <- BodyObject$fromJSON(jsonlite::toJSON(IssueObject$body, auto_unbox = TRUE)) - self$`labels` <- lapply(IssueObject$`labels`, function(x) IssueLabels$new()$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE))) - IssueMilestoneObject <- IssueMilestone$new() - self$`milestone` <- IssueMilestoneObject$fromJSON(jsonlite::toJSON(IssueObject$milestone, auto_unbox = TRUE)) - IssueAssigneeObject <- IssueAssignee$new() - self$`assignee` <- IssueAssigneeObject$fromJSON(jsonlite::toJSON(IssueObject$assignee, auto_unbox = TRUE)) + ComponentsschemasUserYamlObject <- ComponentsschemasUserYaml$new() + self$`user` <- ComponentsschemasUserYamlObject$fromJSON(jsonlite::toJSON(IssueObject$user, auto_unbox = TRUE)) + self$`title` <- IssueObject$`title` + self$`body` <- IssueObject$`body` + self$`labels` <- lapply(IssueObject$`labels`, function(x) TODO_OBJECT_MAPPING$new()$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE))) + TODO_OBJECT_MAPPINGObject <- TODO_OBJECT_MAPPING$new() + self$`milestone` <- TODO_OBJECT_MAPPINGObject$fromJSON(jsonlite::toJSON(IssueObject$milestone, auto_unbox = TRUE)) + ComponentsschemasUserYamlObject <- ComponentsschemasUserYaml$new() + self$`assignee` <- ComponentsschemasUserYamlObject$fromJSON(jsonlite::toJSON(IssueObject$assignee, auto_unbox = TRUE)) self$`state` <- IssueObject$`state` self$`comments` <- IssueObject$`comments` self$`created_at` <- IssueObject$`created_at` self$`updated_at` <- IssueObject$`updated_at` TODO_OBJECT_MAPPINGObject <- TODO_OBJECT_MAPPING$new() self$`pull_request` <- TODO_OBJECT_MAPPINGObject$fromJSON(jsonlite::toJSON(IssueObject$pull_request, auto_unbox = TRUE)) - self$`closed` <- IssueObject$`closed` } ) ) diff --git a/R/R/IssueAssignee.r b/R/R/IssueAssignee.r deleted file mode 100644 index 21b57ab..0000000 --- a/R/R/IssueAssignee.r +++ /dev/null @@ -1,113 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' IssueAssignee Class -#' -#' @field id -#' @field login -#' @field full_name -#' @field avatar_url -#' @field username -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -IssueAssignee <- R6::R6Class( - 'IssueAssignee', - public = list( - `id` = NULL, - `login` = NULL, - `full_name` = NULL, - `avatar_url` = NULL, - `username` = NULL, - initialize = function(`id`, `login`, `full_name`, `avatar_url`, `username`){ - if (!missing(`id`)) { - stopifnot(is.numeric(`id`), length(`id`) == 1) - self$`id` <- `id` - } - if (!missing(`login`)) { - stopifnot(is.character(`login`), length(`login`) == 1) - self$`login` <- `login` - } - if (!missing(`full_name`)) { - stopifnot(is.character(`full_name`), length(`full_name`) == 1) - self$`full_name` <- `full_name` - } - if (!missing(`avatar_url`)) { - stopifnot(is.character(`avatar_url`), length(`avatar_url`) == 1) - self$`avatar_url` <- `avatar_url` - } - if (!missing(`username`)) { - stopifnot(is.character(`username`), length(`username`) == 1) - self$`username` <- `username` - } - }, - toJSON = function() { - IssueAssigneeObject <- list() - if (!is.null(self$`id`)) { - IssueAssigneeObject[['id']] <- self$`id` - } - if (!is.null(self$`login`)) { - IssueAssigneeObject[['login']] <- self$`login` - } - if (!is.null(self$`full_name`)) { - IssueAssigneeObject[['full_name']] <- self$`full_name` - } - if (!is.null(self$`avatar_url`)) { - IssueAssigneeObject[['avatar_url']] <- self$`avatar_url` - } - if (!is.null(self$`username`)) { - IssueAssigneeObject[['username']] <- self$`username` - } - - IssueAssigneeObject - }, - fromJSON = function(IssueAssigneeJson) { - IssueAssigneeObject <- jsonlite::fromJSON(IssueAssigneeJson) - if (!is.null(IssueAssigneeObject$`id`)) { - self$`id` <- IssueAssigneeObject$`id` - } - if (!is.null(IssueAssigneeObject$`login`)) { - self$`login` <- IssueAssigneeObject$`login` - } - if (!is.null(IssueAssigneeObject$`full_name`)) { - self$`full_name` <- IssueAssigneeObject$`full_name` - } - if (!is.null(IssueAssigneeObject$`avatar_url`)) { - self$`avatar_url` <- IssueAssigneeObject$`avatar_url` - } - if (!is.null(IssueAssigneeObject$`username`)) { - self$`username` <- IssueAssigneeObject$`username` - } - }, - toJSONString = function() { - sprintf( - '{ - "id": %d, - "login": %s, - "full_name": %s, - "avatar_url": %s, - "username": %s - }', - self$`id`, - self$`login`, - self$`full_name`, - self$`avatar_url`, - self$`username` - ) - }, - fromJSONString = function(IssueAssigneeJson) { - IssueAssigneeObject <- jsonlite::fromJSON(IssueAssigneeJson) - self$`id` <- IssueAssigneeObject$`id` - self$`login` <- IssueAssigneeObject$`login` - self$`full_name` <- IssueAssigneeObject$`full_name` - self$`avatar_url` <- IssueAssigneeObject$`avatar_url` - self$`username` <- IssueAssigneeObject$`username` - } - ) -) diff --git a/R/R/IssueLabels.r b/R/R/IssueLabels.r deleted file mode 100644 index e4563ba..0000000 --- a/R/R/IssueLabels.r +++ /dev/null @@ -1,98 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' IssueLabels Class -#' -#' @field id -#' @field name -#' @field color -#' @field url -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -IssueLabels <- R6::R6Class( - 'IssueLabels', - public = list( - `id` = NULL, - `name` = NULL, - `color` = NULL, - `url` = NULL, - initialize = function(`id`, `name`, `color`, `url`){ - if (!missing(`id`)) { - stopifnot(is.numeric(`id`), length(`id`) == 1) - self$`id` <- `id` - } - if (!missing(`name`)) { - stopifnot(is.character(`name`), length(`name`) == 1) - self$`name` <- `name` - } - if (!missing(`color`)) { - stopifnot(is.character(`color`), length(`color`) == 1) - self$`color` <- `color` - } - if (!missing(`url`)) { - stopifnot(is.character(`url`), length(`url`) == 1) - self$`url` <- `url` - } - }, - toJSON = function() { - IssueLabelsObject <- list() - if (!is.null(self$`id`)) { - IssueLabelsObject[['id']] <- self$`id` - } - if (!is.null(self$`name`)) { - IssueLabelsObject[['name']] <- self$`name` - } - if (!is.null(self$`color`)) { - IssueLabelsObject[['color']] <- self$`color` - } - if (!is.null(self$`url`)) { - IssueLabelsObject[['url']] <- self$`url` - } - - IssueLabelsObject - }, - fromJSON = function(IssueLabelsJson) { - IssueLabelsObject <- jsonlite::fromJSON(IssueLabelsJson) - if (!is.null(IssueLabelsObject$`id`)) { - self$`id` <- IssueLabelsObject$`id` - } - if (!is.null(IssueLabelsObject$`name`)) { - self$`name` <- IssueLabelsObject$`name` - } - if (!is.null(IssueLabelsObject$`color`)) { - self$`color` <- IssueLabelsObject$`color` - } - if (!is.null(IssueLabelsObject$`url`)) { - self$`url` <- IssueLabelsObject$`url` - } - }, - toJSONString = function() { - sprintf( - '{ - "id": %d, - "name": %s, - "color": %s, - "url": %s - }', - self$`id`, - self$`name`, - self$`color`, - self$`url` - ) - }, - fromJSONString = function(IssueLabelsJson) { - IssueLabelsObject <- jsonlite::fromJSON(IssueLabelsJson) - self$`id` <- IssueLabelsObject$`id` - self$`name` <- IssueLabelsObject$`name` - self$`color` <- IssueLabelsObject$`color` - self$`url` <- IssueLabelsObject$`url` - } - ) -) diff --git a/R/R/IssueMilestone.r b/R/R/IssueMilestone.r deleted file mode 100644 index b9ac719..0000000 --- a/R/R/IssueMilestone.r +++ /dev/null @@ -1,158 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' IssueMilestone Class -#' -#' @field id -#' @field title -#' @field description -#' @field state -#' @field open_issues -#' @field closed_issues -#' @field closed_at -#' @field due_on -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -IssueMilestone <- R6::R6Class( - 'IssueMilestone', - public = list( - `id` = NULL, - `title` = NULL, - `description` = NULL, - `state` = NULL, - `open_issues` = NULL, - `closed_issues` = NULL, - `closed_at` = NULL, - `due_on` = NULL, - initialize = function(`id`, `title`, `description`, `state`, `open_issues`, `closed_issues`, `closed_at`, `due_on`){ - if (!missing(`id`)) { - stopifnot(is.numeric(`id`), length(`id`) == 1) - self$`id` <- `id` - } - if (!missing(`title`)) { - stopifnot(is.character(`title`), length(`title`) == 1) - self$`title` <- `title` - } - if (!missing(`description`)) { - stopifnot(is.character(`description`), length(`description`) == 1) - self$`description` <- `description` - } - if (!missing(`state`)) { - stopifnot(is.character(`state`), length(`state`) == 1) - self$`state` <- `state` - } - if (!missing(`open_issues`)) { - stopifnot(is.numeric(`open_issues`), length(`open_issues`) == 1) - self$`open_issues` <- `open_issues` - } - if (!missing(`closed_issues`)) { - stopifnot(is.numeric(`closed_issues`), length(`closed_issues`) == 1) - self$`closed_issues` <- `closed_issues` - } - if (!missing(`closed_at`)) { - stopifnot(is.character(`closed_at`), length(`closed_at`) == 1) - self$`closed_at` <- `closed_at` - } - if (!missing(`due_on`)) { - stopifnot(is.character(`due_on`), length(`due_on`) == 1) - self$`due_on` <- `due_on` - } - }, - toJSON = function() { - IssueMilestoneObject <- list() - if (!is.null(self$`id`)) { - IssueMilestoneObject[['id']] <- self$`id` - } - if (!is.null(self$`title`)) { - IssueMilestoneObject[['title']] <- self$`title` - } - if (!is.null(self$`description`)) { - IssueMilestoneObject[['description']] <- self$`description` - } - if (!is.null(self$`state`)) { - IssueMilestoneObject[['state']] <- self$`state` - } - if (!is.null(self$`open_issues`)) { - IssueMilestoneObject[['open_issues']] <- self$`open_issues` - } - if (!is.null(self$`closed_issues`)) { - IssueMilestoneObject[['closed_issues']] <- self$`closed_issues` - } - if (!is.null(self$`closed_at`)) { - IssueMilestoneObject[['closed_at']] <- self$`closed_at` - } - if (!is.null(self$`due_on`)) { - IssueMilestoneObject[['due_on']] <- self$`due_on` - } - - IssueMilestoneObject - }, - fromJSON = function(IssueMilestoneJson) { - IssueMilestoneObject <- jsonlite::fromJSON(IssueMilestoneJson) - if (!is.null(IssueMilestoneObject$`id`)) { - self$`id` <- IssueMilestoneObject$`id` - } - if (!is.null(IssueMilestoneObject$`title`)) { - self$`title` <- IssueMilestoneObject$`title` - } - if (!is.null(IssueMilestoneObject$`description`)) { - self$`description` <- IssueMilestoneObject$`description` - } - if (!is.null(IssueMilestoneObject$`state`)) { - self$`state` <- IssueMilestoneObject$`state` - } - if (!is.null(IssueMilestoneObject$`open_issues`)) { - self$`open_issues` <- IssueMilestoneObject$`open_issues` - } - if (!is.null(IssueMilestoneObject$`closed_issues`)) { - self$`closed_issues` <- IssueMilestoneObject$`closed_issues` - } - if (!is.null(IssueMilestoneObject$`closed_at`)) { - self$`closed_at` <- IssueMilestoneObject$`closed_at` - } - if (!is.null(IssueMilestoneObject$`due_on`)) { - self$`due_on` <- IssueMilestoneObject$`due_on` - } - }, - toJSONString = function() { - sprintf( - '{ - "id": %d, - "title": %s, - "description": %s, - "state": %s, - "open_issues": %d, - "closed_issues": %d, - "closed_at": %s, - "due_on": %s - }', - self$`id`, - self$`title`, - self$`description`, - self$`state`, - self$`open_issues`, - self$`closed_issues`, - self$`closed_at`, - self$`due_on` - ) - }, - fromJSONString = function(IssueMilestoneJson) { - IssueMilestoneObject <- jsonlite::fromJSON(IssueMilestoneJson) - self$`id` <- IssueMilestoneObject$`id` - self$`title` <- IssueMilestoneObject$`title` - self$`description` <- IssueMilestoneObject$`description` - self$`state` <- IssueMilestoneObject$`state` - self$`open_issues` <- IssueMilestoneObject$`open_issues` - self$`closed_issues` <- IssueMilestoneObject$`closed_issues` - self$`closed_at` <- IssueMilestoneObject$`closed_at` - self$`due_on` <- IssueMilestoneObject$`due_on` - } - ) -) diff --git a/R/R/Issues.r b/R/R/Issues.r index bb3e1c2..979e989 100644 --- a/R/R/Issues.r +++ b/R/R/Issues.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/IssuesApi.r b/R/R/IssuesApi.r deleted file mode 100644 index 617c184..0000000 --- a/R/R/IssuesApi.r +++ /dev/null @@ -1,192 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title Issues operations -#' @description dagshub_api.Issues -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' create_issue Create an issue -#' -#' -#' edit_issue Edit an issue -#' -#' -#' get_issue Get a single issue -#' -#' -#' list_repo_issues List issues for a repository -#' -#' } -#' -#' @export -IssuesApi <- R6::R6Class( - 'IssuesApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - create_issue = function(owner, repo, body, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`body`)) { - body <- `body`$toJSONString() - } else { - body <- NULL - } - - urlPath <- "/repos/{owner}/{repo}/issues" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "POST", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - returnObject <- Issue$new() - result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) - Response$new(returnObject, resp) - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - edit_issue = function(owner, repo, body, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`body`)) { - body <- `body`$toJSONString() - } else { - body <- NULL - } - - urlPath <- "/repos/{owner}/{repo}/issues" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "PATCH", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - returnObject <- Issue$new() - result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) - Response$new(returnObject, resp) - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - get_issue = function(owner, repo, index, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/issues/{index}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`index`)) { - urlPath <- gsub(paste0("\\{", "index", "\\}"), `index`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - returnObject <- Issue$new() - result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) - Response$new(returnObject, resp) - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - list_repo_issues = function(owner, repo, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/issues" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - returnObject <- Issues$new() - result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) - Response$new(returnObject, resp) - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/R/Labels.r b/R/R/Labels.r deleted file mode 100644 index 45eb09b..0000000 --- a/R/R/Labels.r +++ /dev/null @@ -1,38 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' Labels Class -#' -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -Labels <- R6::R6Class( - 'Labels', - public = list( - initialize = function(){ - }, - toJSON = function() { - LabelsObject <- list() - - LabelsObject - }, - fromJSON = function(LabelsJson) { - LabelsObject <- jsonlite::fromJSON(LabelsJson) - }, - toJSONString = function() { - sprintf( - '{ - }', - ) - }, - fromJSONString = function(LabelsJson) { - LabelsObject <- jsonlite::fromJSON(LabelsJson) - } - ) -) diff --git a/R/R/MigrateRepo.r b/R/R/MigrateRepo.r deleted file mode 100644 index 25908c5..0000000 --- a/R/R/MigrateRepo.r +++ /dev/null @@ -1,157 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' MigrateRepo Class -#' -#' @field clone_addr -#' @field auth_username -#' @field auth_password -#' @field user_id -#' @field repo_name -#' @field mirror -#' @field visibility -#' @field description -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -MigrateRepo <- R6::R6Class( - 'MigrateRepo', - public = list( - `clone_addr` = NULL, - `auth_username` = NULL, - `auth_password` = NULL, - `user_id` = NULL, - `repo_name` = NULL, - `mirror` = NULL, - `visibility` = NULL, - `description` = NULL, - initialize = function(`clone_addr`, `auth_username`, `auth_password`, `user_id`, `repo_name`, `mirror`, `visibility`, `description`){ - if (!missing(`clone_addr`)) { - stopifnot(is.character(`clone_addr`), length(`clone_addr`) == 1) - self$`clone_addr` <- `clone_addr` - } - if (!missing(`auth_username`)) { - stopifnot(is.character(`auth_username`), length(`auth_username`) == 1) - self$`auth_username` <- `auth_username` - } - if (!missing(`auth_password`)) { - stopifnot(is.character(`auth_password`), length(`auth_password`) == 1) - self$`auth_password` <- `auth_password` - } - if (!missing(`user_id`)) { - stopifnot(is.numeric(`user_id`), length(`user_id`) == 1) - self$`user_id` <- `user_id` - } - if (!missing(`repo_name`)) { - stopifnot(is.character(`repo_name`), length(`repo_name`) == 1) - self$`repo_name` <- `repo_name` - } - if (!missing(`mirror`)) { - self$`mirror` <- `mirror` - } - if (!missing(`visibility`)) { - stopifnot(is.character(`visibility`), length(`visibility`) == 1) - self$`visibility` <- `visibility` - } - if (!missing(`description`)) { - stopifnot(is.character(`description`), length(`description`) == 1) - self$`description` <- `description` - } - }, - toJSON = function() { - MigrateRepoObject <- list() - if (!is.null(self$`clone_addr`)) { - MigrateRepoObject[['clone_addr']] <- self$`clone_addr` - } - if (!is.null(self$`auth_username`)) { - MigrateRepoObject[['auth_username']] <- self$`auth_username` - } - if (!is.null(self$`auth_password`)) { - MigrateRepoObject[['auth_password']] <- self$`auth_password` - } - if (!is.null(self$`user_id`)) { - MigrateRepoObject[['user_id']] <- self$`user_id` - } - if (!is.null(self$`repo_name`)) { - MigrateRepoObject[['repo_name']] <- self$`repo_name` - } - if (!is.null(self$`mirror`)) { - MigrateRepoObject[['mirror']] <- self$`mirror` - } - if (!is.null(self$`visibility`)) { - MigrateRepoObject[['visibility']] <- self$`visibility` - } - if (!is.null(self$`description`)) { - MigrateRepoObject[['description']] <- self$`description` - } - - MigrateRepoObject - }, - fromJSON = function(MigrateRepoJson) { - MigrateRepoObject <- jsonlite::fromJSON(MigrateRepoJson) - if (!is.null(MigrateRepoObject$`clone_addr`)) { - self$`clone_addr` <- MigrateRepoObject$`clone_addr` - } - if (!is.null(MigrateRepoObject$`auth_username`)) { - self$`auth_username` <- MigrateRepoObject$`auth_username` - } - if (!is.null(MigrateRepoObject$`auth_password`)) { - self$`auth_password` <- MigrateRepoObject$`auth_password` - } - if (!is.null(MigrateRepoObject$`user_id`)) { - self$`user_id` <- MigrateRepoObject$`user_id` - } - if (!is.null(MigrateRepoObject$`repo_name`)) { - self$`repo_name` <- MigrateRepoObject$`repo_name` - } - if (!is.null(MigrateRepoObject$`mirror`)) { - self$`mirror` <- MigrateRepoObject$`mirror` - } - if (!is.null(MigrateRepoObject$`visibility`)) { - self$`visibility` <- MigrateRepoObject$`visibility` - } - if (!is.null(MigrateRepoObject$`description`)) { - self$`description` <- MigrateRepoObject$`description` - } - }, - toJSONString = function() { - sprintf( - '{ - "clone_addr": %s, - "auth_username": %s, - "auth_password": %s, - "user_id": %d, - "repo_name": %s, - "mirror": %s, - "visibility": %s, - "description": %s - }', - self$`clone_addr`, - self$`auth_username`, - self$`auth_password`, - self$`user_id`, - self$`repo_name`, - self$`mirror`, - self$`visibility`, - self$`description` - ) - }, - fromJSONString = function(MigrateRepoJson) { - MigrateRepoObject <- jsonlite::fromJSON(MigrateRepoJson) - self$`clone_addr` <- MigrateRepoObject$`clone_addr` - self$`auth_username` <- MigrateRepoObject$`auth_username` - self$`auth_password` <- MigrateRepoObject$`auth_password` - self$`user_id` <- MigrateRepoObject$`user_id` - self$`repo_name` <- MigrateRepoObject$`repo_name` - self$`mirror` <- MigrateRepoObject$`mirror` - self$`visibility` <- MigrateRepoObject$`visibility` - self$`description` <- MigrateRepoObject$`description` - } - ) -) diff --git a/R/R/Milestone.r b/R/R/Milestone.r deleted file mode 100644 index 491e465..0000000 --- a/R/R/Milestone.r +++ /dev/null @@ -1,38 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' Milestone Class -#' -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -Milestone <- R6::R6Class( - 'Milestone', - public = list( - initialize = function(){ - }, - toJSON = function() { - MilestoneObject <- list() - - MilestoneObject - }, - fromJSON = function(MilestoneJson) { - MilestoneObject <- jsonlite::fromJSON(MilestoneJson) - }, - toJSONString = function() { - sprintf( - '{ - }', - ) - }, - fromJSONString = function(MilestoneJson) { - MilestoneObject <- jsonlite::fromJSON(MilestoneJson) - } - ) -) diff --git a/R/R/PatchIssue.r b/R/R/PatchIssue.r index 62adab3..cef5a98 100644 --- a/R/R/PatchIssue.r +++ b/R/R/PatchIssue.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git @@ -70,27 +70,27 @@ PatchIssue <- R6::R6Class( fromJSON = function(PatchIssueJson) { PatchIssueObject <- jsonlite::fromJSON(PatchIssueJson) if (!is.null(PatchIssueObject$`title`)) { - titleObject <- Title$new() + titleObject <- ComponentsschemasTitleYaml$new() titleObject$fromJSON(jsonlite::toJSON(PatchIssueObject$title, auto_unbox = TRUE)) self$`title` <- titleObject } if (!is.null(PatchIssueObject$`body`)) { - bodyObject <- Body$new() + bodyObject <- ComponentsschemasBodyYaml$new() bodyObject$fromJSON(jsonlite::toJSON(PatchIssueObject$body, auto_unbox = TRUE)) self$`body` <- bodyObject } if (!is.null(PatchIssueObject$`assignee`)) { - assigneeObject <- Assignee$new() + assigneeObject <- ComponentsschemasAssigneeYaml$new() assigneeObject$fromJSON(jsonlite::toJSON(PatchIssueObject$assignee, auto_unbox = TRUE)) self$`assignee` <- assigneeObject } if (!is.null(PatchIssueObject$`milestone`)) { - milestoneObject <- Milestone$new() + milestoneObject <- ComponentsschemasMilestoneYaml$new() milestoneObject$fromJSON(jsonlite::toJSON(PatchIssueObject$milestone, auto_unbox = TRUE)) self$`milestone` <- milestoneObject } if (!is.null(PatchIssueObject$`state`)) { - stateObject <- State$new() + stateObject <- ComponentsschemasStateYaml$new() stateObject$fromJSON(jsonlite::toJSON(PatchIssueObject$state, auto_unbox = TRUE)) self$`state` <- stateObject } @@ -113,16 +113,16 @@ PatchIssue <- R6::R6Class( }, fromJSONString = function(PatchIssueJson) { PatchIssueObject <- jsonlite::fromJSON(PatchIssueJson) - TitleObject <- Title$new() - self$`title` <- TitleObject$fromJSON(jsonlite::toJSON(PatchIssueObject$title, auto_unbox = TRUE)) - BodyObject <- Body$new() - self$`body` <- BodyObject$fromJSON(jsonlite::toJSON(PatchIssueObject$body, auto_unbox = TRUE)) - AssigneeObject <- Assignee$new() - self$`assignee` <- AssigneeObject$fromJSON(jsonlite::toJSON(PatchIssueObject$assignee, auto_unbox = TRUE)) - MilestoneObject <- Milestone$new() - self$`milestone` <- MilestoneObject$fromJSON(jsonlite::toJSON(PatchIssueObject$milestone, auto_unbox = TRUE)) - StateObject <- State$new() - self$`state` <- StateObject$fromJSON(jsonlite::toJSON(PatchIssueObject$state, auto_unbox = TRUE)) + ComponentsschemasTitleYamlObject <- ComponentsschemasTitleYaml$new() + self$`title` <- ComponentsschemasTitleYamlObject$fromJSON(jsonlite::toJSON(PatchIssueObject$title, auto_unbox = TRUE)) + ComponentsschemasBodyYamlObject <- ComponentsschemasBodyYaml$new() + self$`body` <- ComponentsschemasBodyYamlObject$fromJSON(jsonlite::toJSON(PatchIssueObject$body, auto_unbox = TRUE)) + ComponentsschemasAssigneeYamlObject <- ComponentsschemasAssigneeYaml$new() + self$`assignee` <- ComponentsschemasAssigneeYamlObject$fromJSON(jsonlite::toJSON(PatchIssueObject$assignee, auto_unbox = TRUE)) + ComponentsschemasMilestoneYamlObject <- ComponentsschemasMilestoneYaml$new() + self$`milestone` <- ComponentsschemasMilestoneYamlObject$fromJSON(jsonlite::toJSON(PatchIssueObject$milestone, auto_unbox = TRUE)) + ComponentsschemasStateYamlObject <- ComponentsschemasStateYaml$new() + self$`state` <- ComponentsschemasStateYamlObject$fromJSON(jsonlite::toJSON(PatchIssueObject$state, auto_unbox = TRUE)) } ) ) diff --git a/R/R/PostIssue.r b/R/R/PostIssue.r index ee998d0..9efab63 100644 --- a/R/R/PostIssue.r +++ b/R/R/PostIssue.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git @@ -79,32 +79,32 @@ PostIssue <- R6::R6Class( fromJSON = function(PostIssueJson) { PostIssueObject <- jsonlite::fromJSON(PostIssueJson) if (!is.null(PostIssueObject$`title`)) { - titleObject <- Title$new() + titleObject <- ComponentsschemasTitleYaml$new() titleObject$fromJSON(jsonlite::toJSON(PostIssueObject$title, auto_unbox = TRUE)) self$`title` <- titleObject } if (!is.null(PostIssueObject$`body`)) { - bodyObject <- Body$new() + bodyObject <- ComponentsschemasBodyYaml$new() bodyObject$fromJSON(jsonlite::toJSON(PostIssueObject$body, auto_unbox = TRUE)) self$`body` <- bodyObject } if (!is.null(PostIssueObject$`assignee`)) { - assigneeObject <- Assignee$new() + assigneeObject <- ComponentsschemasAssigneeYaml$new() assigneeObject$fromJSON(jsonlite::toJSON(PostIssueObject$assignee, auto_unbox = TRUE)) self$`assignee` <- assigneeObject } if (!is.null(PostIssueObject$`milestone`)) { - milestoneObject <- Milestone$new() + milestoneObject <- ComponentsschemasMilestoneYaml$new() milestoneObject$fromJSON(jsonlite::toJSON(PostIssueObject$milestone, auto_unbox = TRUE)) self$`milestone` <- milestoneObject } if (!is.null(PostIssueObject$`labels`)) { - labelsObject <- Labels$new() + labelsObject <- ComponentsschemasLabelsYaml$new() labelsObject$fromJSON(jsonlite::toJSON(PostIssueObject$labels, auto_unbox = TRUE)) self$`labels` <- labelsObject } if (!is.null(PostIssueObject$`closed`)) { - closedObject <- Closed$new() + closedObject <- ComponentsschemasClosedYaml$new() closedObject$fromJSON(jsonlite::toJSON(PostIssueObject$closed, auto_unbox = TRUE)) self$`closed` <- closedObject } @@ -129,18 +129,18 @@ PostIssue <- R6::R6Class( }, fromJSONString = function(PostIssueJson) { PostIssueObject <- jsonlite::fromJSON(PostIssueJson) - TitleObject <- Title$new() - self$`title` <- TitleObject$fromJSON(jsonlite::toJSON(PostIssueObject$title, auto_unbox = TRUE)) - BodyObject <- Body$new() - self$`body` <- BodyObject$fromJSON(jsonlite::toJSON(PostIssueObject$body, auto_unbox = TRUE)) - AssigneeObject <- Assignee$new() - self$`assignee` <- AssigneeObject$fromJSON(jsonlite::toJSON(PostIssueObject$assignee, auto_unbox = TRUE)) - MilestoneObject <- Milestone$new() - self$`milestone` <- MilestoneObject$fromJSON(jsonlite::toJSON(PostIssueObject$milestone, auto_unbox = TRUE)) - LabelsObject <- Labels$new() - self$`labels` <- LabelsObject$fromJSON(jsonlite::toJSON(PostIssueObject$labels, auto_unbox = TRUE)) - ClosedObject <- Closed$new() - self$`closed` <- ClosedObject$fromJSON(jsonlite::toJSON(PostIssueObject$closed, auto_unbox = TRUE)) + ComponentsschemasTitleYamlObject <- ComponentsschemasTitleYaml$new() + self$`title` <- ComponentsschemasTitleYamlObject$fromJSON(jsonlite::toJSON(PostIssueObject$title, auto_unbox = TRUE)) + ComponentsschemasBodyYamlObject <- ComponentsschemasBodyYaml$new() + self$`body` <- ComponentsschemasBodyYamlObject$fromJSON(jsonlite::toJSON(PostIssueObject$body, auto_unbox = TRUE)) + ComponentsschemasAssigneeYamlObject <- ComponentsschemasAssigneeYaml$new() + self$`assignee` <- ComponentsschemasAssigneeYamlObject$fromJSON(jsonlite::toJSON(PostIssueObject$assignee, auto_unbox = TRUE)) + ComponentsschemasMilestoneYamlObject <- ComponentsschemasMilestoneYaml$new() + self$`milestone` <- ComponentsschemasMilestoneYamlObject$fromJSON(jsonlite::toJSON(PostIssueObject$milestone, auto_unbox = TRUE)) + ComponentsschemasLabelsYamlObject <- ComponentsschemasLabelsYaml$new() + self$`labels` <- ComponentsschemasLabelsYamlObject$fromJSON(jsonlite::toJSON(PostIssueObject$labels, auto_unbox = TRUE)) + ComponentsschemasClosedYamlObject <- ComponentsschemasClosedYaml$new() + self$`closed` <- ComponentsschemasClosedYamlObject$fromJSON(jsonlite::toJSON(PostIssueObject$closed, auto_unbox = TRUE)) } ) ) diff --git a/R/R/PutFile.r b/R/R/PutFile.r index 281bd14..0fd7446 100644 --- a/R/R/PutFile.r +++ b/R/R/PutFile.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/ReleasesApi.r b/R/R/ReleasesApi.r deleted file mode 100644 index 56f4ee9..0000000 --- a/R/R/ReleasesApi.r +++ /dev/null @@ -1,69 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title Releases operations -#' @description dagshub_api.Releases -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' list_releases List Releases -#' -#' } -#' -#' @export -ReleasesApi <- R6::R6Class( - 'ReleasesApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - list_releases = function(owner, repo, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/releases" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/R/RepoHooksBody.r b/R/R/RepoHooksBody.r deleted file mode 100644 index b4b1f9a..0000000 --- a/R/R/RepoHooksBody.r +++ /dev/null @@ -1,89 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' RepoHooksBody Class -#' -#' @field type -#' @field config -#' @field events -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -RepoHooksBody <- R6::R6Class( - 'RepoHooksBody', - public = list( - `type` = NULL, - `config` = NULL, - `events` = NULL, - initialize = function(`type`, `config`, `events`){ - if (!missing(`type`)) { - stopifnot(is.character(`type`), length(`type`) == 1) - self$`type` <- `type` - } - if (!missing(`config`)) { - stopifnot(R6::is.R6(`config`)) - self$`config` <- `config` - } - if (!missing(`events`)) { - stopifnot(R6::is.R6(`events`)) - self$`events` <- `events` - } - }, - toJSON = function() { - RepoHooksBodyObject <- list() - if (!is.null(self$`type`)) { - RepoHooksBodyObject[['type']] <- self$`type` - } - if (!is.null(self$`config`)) { - RepoHooksBodyObject[['config']] <- self$`config`$toJSON() - } - if (!is.null(self$`events`)) { - RepoHooksBodyObject[['events']] <- self$`events`$toJSON() - } - - RepoHooksBodyObject - }, - fromJSON = function(RepoHooksBodyJson) { - RepoHooksBodyObject <- jsonlite::fromJSON(RepoHooksBodyJson) - if (!is.null(RepoHooksBodyObject$`type`)) { - self$`type` <- RepoHooksBodyObject$`type` - } - if (!is.null(RepoHooksBodyObject$`config`)) { - configObject <- WebhookConfig$new() - configObject$fromJSON(jsonlite::toJSON(RepoHooksBodyObject$config, auto_unbox = TRUE)) - self$`config` <- configObject - } - if (!is.null(RepoHooksBodyObject$`events`)) { - eventsObject <- WebhookEvents$new() - eventsObject$fromJSON(jsonlite::toJSON(RepoHooksBodyObject$events, auto_unbox = TRUE)) - self$`events` <- eventsObject - } - }, - toJSONString = function() { - sprintf( - '{ - "type": %s, - "config": %s, - "events": %s - }', - self$`type`, - self$`config`$toJSON(), - self$`events`$toJSON() - ) - }, - fromJSONString = function(RepoHooksBodyJson) { - RepoHooksBodyObject <- jsonlite::fromJSON(RepoHooksBodyJson) - self$`type` <- RepoHooksBodyObject$`type` - WebhookConfigObject <- WebhookConfig$new() - self$`config` <- WebhookConfigObject$fromJSON(jsonlite::toJSON(RepoHooksBodyObject$config, auto_unbox = TRUE)) - WebhookEventsObject <- WebhookEvents$new() - self$`events` <- WebhookEventsObject$fromJSON(jsonlite::toJSON(RepoHooksBodyObject$events, auto_unbox = TRUE)) - } - ) -) diff --git a/R/R/RepositoryApi.r b/R/R/RepositoryApi.r deleted file mode 100644 index 8847cda..0000000 --- a/R/R/RepositoryApi.r +++ /dev/null @@ -1,294 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title Repository operations -#' @description dagshub_api.Repository -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' create_org_repo Create in organization -#' -#' -#' create_repo Create -#' -#' -#' get_repo Get repository information -#' -#' -#' list_my_repos List your repositories -#' -#' -#' list_org_repos List organization repositories -#' -#' -#' list_user_repos List user repositories -#' -#' -#' migrate_repo Migrate repository -#' -#' -#' search Search repositories -#' -#' } -#' -#' @export -RepositoryApi <- R6::R6Class( - 'RepositoryApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - create_org_repo = function(orgname, body, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`body`)) { - body <- `body`$toJSONString() - } else { - body <- NULL - } - - urlPath <- "/org/{orgname}/repos" - if (!missing(`orgname`)) { - urlPath <- gsub(paste0("\\{", "orgname", "\\}"), `orgname`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "POST", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - create_repo = function(body, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`body`)) { - body <- `body`$toJSONString() - } else { - body <- NULL - } - - urlPath <- "/user/repos" - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "POST", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - get_repo = function(owner, repo, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - list_my_repos = function(...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/user/repos" - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - returnObject <- Object$new() - result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) - Response$new(returnObject, resp) - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - list_org_repos = function(orgname, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/orgs/{orgname}/repos" - if (!missing(`orgname`)) { - urlPath <- gsub(paste0("\\{", "orgname", "\\}"), `orgname`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - list_user_repos = function(username, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/users/{username}/repos" - if (!missing(`username`)) { - urlPath <- gsub(paste0("\\{", "username", "\\}"), `username`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - migrate_repo = function(body, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`body`)) { - body <- `body`$toJSONString() - } else { - body <- NULL - } - - urlPath <- "/repos/migrate" - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "POST", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - search = function(q, uid, limit, page, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`q`)) { - queryParams['q'] <- q - } - - if (!missing(`uid`)) { - queryParams['uid'] <- uid - } - - if (!missing(`limit`)) { - queryParams['limit'] <- limit - } - - if (!missing(`page`)) { - queryParams['page'] <- page - } - - urlPath <- "/repos/search" - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - returnObject <- Object$new() - result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) - Response$new(returnObject, resp) - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/R/Response.r b/R/R/Response.r deleted file mode 100644 index 42873be..0000000 --- a/R/R/Response.r +++ /dev/null @@ -1,15 +0,0 @@ -#' Response Class -#' -#' Response Class -#' @export -Response <- R6::R6Class( - 'Response', - public = list( - content = NULL, - response = NULL, - initialize = function(content, response){ - self$content <- content - self$response <- response - } - ) -) \ No newline at end of file diff --git a/R/R/State.r b/R/R/State.r deleted file mode 100644 index 33f2ccf..0000000 --- a/R/R/State.r +++ /dev/null @@ -1,38 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' State Class -#' -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -State <- R6::R6Class( - 'State', - public = list( - initialize = function(){ - }, - toJSON = function() { - StateObject <- list() - - StateObject - }, - fromJSON = function(StateJson) { - StateObject <- jsonlite::fromJSON(StateJson) - }, - toJSONString = function() { - sprintf( - '{ - }', - ) - }, - fromJSONString = function(StateJson) { - StateObject <- jsonlite::fromJSON(StateJson) - } - ) -) diff --git a/R/R/StorageIntegrationsApi.r b/R/R/StorageIntegrationsApi.r deleted file mode 100644 index b390116..0000000 --- a/R/R/StorageIntegrationsApi.r +++ /dev/null @@ -1,175 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title StorageIntegrations operations -#' @description dagshub_api.StorageIntegrations -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' get_bucket_content List contents in the path -#' -#' -#' get_bucket_file Get file in the bucket -#' -#' -#' get_buckets List integrated storages in the repository -#' -#' } -#' -#' @export -StorageIntegrationsApi <- R6::R6Class( - 'StorageIntegrationsApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - get_bucket_content = function(owner, repo, protocol, bucket, path, include_size, limit, from_token, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`include_size`)) { - queryParams['include_size'] <- include_size - } - - if (!missing(`limit`)) { - queryParams['limit'] <- limit - } - - if (!missing(`from_token`)) { - queryParams['from_token'] <- from_token - } - - urlPath <- "/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`protocol`)) { - urlPath <- gsub(paste0("\\{", "protocol", "\\}"), `protocol`, urlPath) - } - - if (!missing(`bucket`)) { - urlPath <- gsub(paste0("\\{", "bucket", "\\}"), `bucket`, urlPath) - } - - if (!missing(`path`)) { - urlPath <- gsub(paste0("\\{", "path", "\\}"), `path`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - returnObject <- Files1$new() - result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) - Response$new(returnObject, resp) - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - get_bucket_file = function(owner, repo, protocol, bucket, path, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`protocol`)) { - urlPath <- gsub(paste0("\\{", "protocol", "\\}"), `protocol`, urlPath) - } - - if (!missing(`bucket`)) { - urlPath <- gsub(paste0("\\{", "bucket", "\\}"), `bucket`, urlPath) - } - - if (!missing(`path`)) { - urlPath <- gsub(paste0("\\{", "path", "\\}"), `path`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - get_buckets = function(owner, repo, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/storage" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - returnObject <- Integration$new() - result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) - Response$new(returnObject, resp) - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/R/Title.r b/R/R/Title.r deleted file mode 100644 index 9cef8ab..0000000 --- a/R/R/Title.r +++ /dev/null @@ -1,38 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' Title Class -#' -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -Title <- R6::R6Class( - 'Title', - public = list( - initialize = function(){ - }, - toJSON = function() { - TitleObject <- list() - - TitleObject - }, - fromJSON = function(TitleJson) { - TitleObject <- jsonlite::fromJSON(TitleJson) - }, - toJSONString = function() { - sprintf( - '{ - }', - ) - }, - fromJSONString = function(TitleJson) { - TitleObject <- jsonlite::fromJSON(TitleJson) - } - ) -) diff --git a/R/R/User.r b/R/R/User.r index c0a4091..8c1b2f6 100644 --- a/R/R/User.r +++ b/R/R/User.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git @@ -10,9 +10,13 @@ #' #' @field id #' @field login +#' @field username #' @field full_name #' @field avatar_url -#' @field username +#' @field public_email +#' @field website +#' @field company +#' @field description #' #' @importFrom R6 R6Class #' @importFrom jsonlite fromJSON toJSON @@ -22,10 +26,14 @@ User <- R6::R6Class( public = list( `id` = NULL, `login` = NULL, + `username` = NULL, `full_name` = NULL, `avatar_url` = NULL, - `username` = NULL, - initialize = function(`id`, `login`, `full_name`, `avatar_url`, `username`){ + `public_email` = NULL, + `website` = NULL, + `company` = NULL, + `description` = NULL, + initialize = function(`id`, `login`, `username`, `full_name`, `avatar_url`, `public_email`, `website`, `company`, `description`){ if (!missing(`id`)) { stopifnot(is.numeric(`id`), length(`id`) == 1) self$`id` <- `id` @@ -34,6 +42,10 @@ User <- R6::R6Class( stopifnot(is.character(`login`), length(`login`) == 1) self$`login` <- `login` } + if (!missing(`username`)) { + stopifnot(is.character(`username`), length(`username`) == 1) + self$`username` <- `username` + } if (!missing(`full_name`)) { stopifnot(is.character(`full_name`), length(`full_name`) == 1) self$`full_name` <- `full_name` @@ -42,9 +54,21 @@ User <- R6::R6Class( stopifnot(is.character(`avatar_url`), length(`avatar_url`) == 1) self$`avatar_url` <- `avatar_url` } - if (!missing(`username`)) { - stopifnot(is.character(`username`), length(`username`) == 1) - self$`username` <- `username` + if (!missing(`public_email`)) { + stopifnot(is.character(`public_email`), length(`public_email`) == 1) + self$`public_email` <- `public_email` + } + if (!missing(`website`)) { + stopifnot(is.character(`website`), length(`website`) == 1) + self$`website` <- `website` + } + if (!missing(`company`)) { + stopifnot(is.character(`company`), length(`company`) == 1) + self$`company` <- `company` + } + if (!missing(`description`)) { + stopifnot(is.character(`description`), length(`description`) == 1) + self$`description` <- `description` } }, toJSON = function() { @@ -55,14 +79,26 @@ User <- R6::R6Class( if (!is.null(self$`login`)) { UserObject[['login']] <- self$`login` } + if (!is.null(self$`username`)) { + UserObject[['username']] <- self$`username` + } if (!is.null(self$`full_name`)) { UserObject[['full_name']] <- self$`full_name` } if (!is.null(self$`avatar_url`)) { UserObject[['avatar_url']] <- self$`avatar_url` } - if (!is.null(self$`username`)) { - UserObject[['username']] <- self$`username` + if (!is.null(self$`public_email`)) { + UserObject[['public_email']] <- self$`public_email` + } + if (!is.null(self$`website`)) { + UserObject[['website']] <- self$`website` + } + if (!is.null(self$`company`)) { + UserObject[['company']] <- self$`company` + } + if (!is.null(self$`description`)) { + UserObject[['description']] <- self$`description` } UserObject @@ -75,14 +111,26 @@ User <- R6::R6Class( if (!is.null(UserObject$`login`)) { self$`login` <- UserObject$`login` } + if (!is.null(UserObject$`username`)) { + self$`username` <- UserObject$`username` + } if (!is.null(UserObject$`full_name`)) { self$`full_name` <- UserObject$`full_name` } if (!is.null(UserObject$`avatar_url`)) { self$`avatar_url` <- UserObject$`avatar_url` } - if (!is.null(UserObject$`username`)) { - self$`username` <- UserObject$`username` + if (!is.null(UserObject$`public_email`)) { + self$`public_email` <- UserObject$`public_email` + } + if (!is.null(UserObject$`website`)) { + self$`website` <- UserObject$`website` + } + if (!is.null(UserObject$`company`)) { + self$`company` <- UserObject$`company` + } + if (!is.null(UserObject$`description`)) { + self$`description` <- UserObject$`description` } }, toJSONString = function() { @@ -90,24 +138,36 @@ User <- R6::R6Class( '{ "id": %d, "login": %s, + "username": %s, "full_name": %s, "avatar_url": %s, - "username": %s + "public_email": %s, + "website": %s, + "company": %s, + "description": %s }', self$`id`, self$`login`, + self$`username`, self$`full_name`, self$`avatar_url`, - self$`username` + self$`public_email`, + self$`website`, + self$`company`, + self$`description` ) }, fromJSONString = function(UserJson) { UserObject <- jsonlite::fromJSON(UserJson) self$`id` <- UserObject$`id` self$`login` <- UserObject$`login` + self$`username` <- UserObject$`username` self$`full_name` <- UserObject$`full_name` self$`avatar_url` <- UserObject$`avatar_url` - self$`username` <- UserObject$`username` + self$`public_email` <- UserObject$`public_email` + self$`website` <- UserObject$`website` + self$`company` <- UserObject$`company` + self$`description` <- UserObject$`description` } ) ) diff --git a/R/R/UserApi.r b/R/R/UserApi.r deleted file mode 100644 index bf0589e..0000000 --- a/R/R/UserApi.r +++ /dev/null @@ -1,90 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title User operations -#' @description dagshub_api.User -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' get_authenticated_user Get authenticated user information -#' -#' -#' get_user Get information about a user -#' -#' } -#' -#' @export -UserApi <- R6::R6Class( - 'UserApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - get_authenticated_user = function(...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/user" - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - get_user = function(username, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/users/{username}" - if (!missing(`username`)) { - urlPath <- gsub(paste0("\\{", "username", "\\}"), `username`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/R/WebhookConfig.r b/R/R/WebhookConfig.r deleted file mode 100644 index 321a9f1..0000000 --- a/R/R/WebhookConfig.r +++ /dev/null @@ -1,83 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' WebhookConfig Class -#' -#' @field url -#' @field content_type -#' @field secret -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -WebhookConfig <- R6::R6Class( - 'WebhookConfig', - public = list( - `url` = NULL, - `content_type` = NULL, - `secret` = NULL, - initialize = function(`url`, `content_type`, `secret`){ - if (!missing(`url`)) { - stopifnot(is.character(`url`), length(`url`) == 1) - self$`url` <- `url` - } - if (!missing(`content_type`)) { - stopifnot(is.character(`content_type`), length(`content_type`) == 1) - self$`content_type` <- `content_type` - } - if (!missing(`secret`)) { - stopifnot(is.character(`secret`), length(`secret`) == 1) - self$`secret` <- `secret` - } - }, - toJSON = function() { - WebhookConfigObject <- list() - if (!is.null(self$`url`)) { - WebhookConfigObject[['url']] <- self$`url` - } - if (!is.null(self$`content_type`)) { - WebhookConfigObject[['content_type']] <- self$`content_type` - } - if (!is.null(self$`secret`)) { - WebhookConfigObject[['secret']] <- self$`secret` - } - - WebhookConfigObject - }, - fromJSON = function(WebhookConfigJson) { - WebhookConfigObject <- jsonlite::fromJSON(WebhookConfigJson) - if (!is.null(WebhookConfigObject$`url`)) { - self$`url` <- WebhookConfigObject$`url` - } - if (!is.null(WebhookConfigObject$`content_type`)) { - self$`content_type` <- WebhookConfigObject$`content_type` - } - if (!is.null(WebhookConfigObject$`secret`)) { - self$`secret` <- WebhookConfigObject$`secret` - } - }, - toJSONString = function() { - sprintf( - '{ - "url": %s, - "content_type": %s, - "secret": %s - }', - self$`url`, - self$`content_type`, - self$`secret` - ) - }, - fromJSONString = function(WebhookConfigJson) { - WebhookConfigObject <- jsonlite::fromJSON(WebhookConfigJson) - self$`url` <- WebhookConfigObject$`url` - self$`content_type` <- WebhookConfigObject$`content_type` - self$`secret` <- WebhookConfigObject$`secret` - } - ) -) diff --git a/R/R/WebhookEvents.r b/R/R/WebhookEvents.r deleted file mode 100644 index 32d90f3..0000000 --- a/R/R/WebhookEvents.r +++ /dev/null @@ -1,38 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git - -#' WebhookEvents Class -#' -#' -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -WebhookEvents <- R6::R6Class( - 'WebhookEvents', - public = list( - initialize = function(){ - }, - toJSON = function() { - WebhookEventsObject <- list() - - WebhookEventsObject - }, - fromJSON = function(WebhookEventsJson) { - WebhookEventsObject <- jsonlite::fromJSON(WebhookEventsJson) - }, - toJSONString = function() { - sprintf( - '{ - }', - ) - }, - fromJSONString = function(WebhookEventsJson) { - WebhookEventsObject <- jsonlite::fromJSON(WebhookEventsJson) - } - ) -) diff --git a/R/R/WebhooksApi.r b/R/R/WebhooksApi.r deleted file mode 100644 index 7b0730e..0000000 --- a/R/R/WebhooksApi.r +++ /dev/null @@ -1,188 +0,0 @@ -# DagsHub API -# -# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -# -# OpenAPI spec version: 1.0.2 -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -#' @title Webhooks operations -#' @description dagshub_api.Webhooks -#' -#' @field path Stores url path of the request. -#' @field apiClient Handles the client-server communication. -#' @field userAgent Set the user agent of the request. -#' -#' @importFrom R6 R6Class -#' -#' @section Methods: -#' \describe{ -#' -#' create_hook Create a hook -#' -#' -#' delete_hook Delete a hook -#' -#' -#' edit_hook Edit a hook -#' -#' -#' list_hooks List hooks -#' -#' } -#' -#' @export -WebhooksApi <- R6::R6Class( - 'WebhooksApi', - public = list( - userAgent = "Swagger-Codegen/1.0.3/r", - apiClient = NULL, - initialize = function(apiClient){ - if (!missing(apiClient)) { - self$apiClient <- apiClient - } - else { - self$apiClient <- ApiClient$new() - } - }, - create_hook = function(owner, repo, body, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`body`)) { - body <- `body`$toJSONString() - } else { - body <- NULL - } - - urlPath <- "/repos/{owner}/{repo}/hooks" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "POST", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - delete_hook = function(owner, repo, id, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/hooks/{id}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`id`)) { - urlPath <- gsub(paste0("\\{", "id", "\\}"), `id`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "DELETE", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - edit_hook = function(owner, repo, id, body, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - if (!missing(`body`)) { - body <- `body`$toJSONString() - } else { - body <- NULL - } - - urlPath <- "/repos/{owner}/{repo}/hooks/{id}" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - if (!missing(`id`)) { - urlPath <- gsub(paste0("\\{", "id", "\\}"), `id`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "PATCH", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - list_hooks = function(owner, repo, ...){ - args <- list(...) - queryParams <- list() - headerParams <- character() - - urlPath <- "/repos/{owner}/{repo}/hooks" - if (!missing(`owner`)) { - urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) - } - - if (!missing(`repo`)) { - urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) - } - - resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), - method = "GET", - queryParams = queryParams, - headerParams = headerParams, - body = body, - ...) - - if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { - # void response, no need to return anything - } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { - Response$new("API client error", resp) - } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { - Response$new("API server error", resp) - } - - } - ) -) diff --git a/R/README.md b/R/README.md deleted file mode 100644 index 950264a..0000000 --- a/R/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# R API client for dagshub_api - -This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - -## Overview -This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [OpenAPI/Swagger spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. - -- API version: 1.0.2 -- Package version: 1.0.3 -- Build package: io.swagger.codegen.v3.generators.r.RClientCodegen - -## Installation -You'll need the `devtools` package in order to build the API. -Make sure you have a proper CRAN repository from which you can download packages. - -### Prerequisites -Install the `devtools` package with the following command. -```R -if(!require(devtools)) { install.packages("devtools") } -``` - -### Installation of the API package -Make sure you set the working directory to where the API code is located. -Then execute -```R -library(devtools) -install(".") -``` - -## Author - - diff --git a/R/git_push.sh b/R/git_push.sh deleted file mode 100644 index 5a6f47a..0000000 --- a/R/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="DagsHub" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="api-clients" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/Scala/.gitignore b/Scala/.gitignore deleted file mode 100644 index ad2b0d3..0000000 --- a/Scala/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# scala specific -*.class -*.log - -# sbt specific -.cache -.history -.lib/ -dist/* -target/ -lib_managed/ -src_managed/ -project/boot/ -project/plugins/project/ - -# Scala-IDE specific -.scala_dependencies -.worksheet - -# IntelliJ specific -.idea -*.iml diff --git a/Scala/.swagger-codegen-ignore b/Scala/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/Scala/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/Scala/.swagger-codegen/VERSION b/Scala/.swagger-codegen/VERSION deleted file mode 100644 index 053a355..0000000 --- a/Scala/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.35 \ No newline at end of file diff --git a/Scala/README.md b/Scala/README.md deleted file mode 100644 index ecc6938..0000000 --- a/Scala/README.md +++ /dev/null @@ -1,177 +0,0 @@ -# NAME - -DagsHub API - -This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - -# VERSION - -Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - -- API version: 1.0.2 -- Package version: -- Build package: io.swagger.codegen.v3.generators.scala.ScalaClientCodegen - -# Requirements - -Building the API client library requires [Maven](https://maven.apache.org/) to be installed. - -## Installation - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn deploy -``` - -Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - io.swagger - swagger-scala-client - 1.0.0 - compile - -``` - -### Gradle users - -Add this dependency to your project's build file: - -```groovy -compile "io.swagger:swagger-scala-client:1.0.0" -``` - -### SBT users - -```scala -libraryDependencies += "io.swagger" % "swagger-scala-client" % "1.0.0" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://dagshub.com/api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*BranchesApi* | [**getBranch**](BranchesApi.md#getBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch -*BranchesApi* | [**listBranches**](BranchesApi.md#listBranches) | **GET** /repos/{owner}/{repo}/branches | List Branches -*CollaboratorsApi* | [**addCollaborator**](CollaboratorsApi.md#addCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator -*CollaboratorsApi* | [**getCollaborators**](CollaboratorsApi.md#getCollaborators) | **GET** /repos/{owner}/{repo}/collaborators | Get collaborators -*CollaboratorsApi* | [**removeCollaborator**](CollaboratorsApi.md#removeCollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete collaborator -*CommitsApi* | [**getCommit**](CommitsApi.md#getCommit) | **GET** /repos/{owner}/{repo}/commits/{sha} | Get a single commit -*ContentApi* | [**getArchive**](ContentApi.md#getArchive) | **GET** /repos/{owner}/{repo}/archive/{ref}{format} | Download archive -*ContentApi* | [**getContent**](ContentApi.md#getContent) | **GET** /repos/{owner}/{repo}/content/{branch}/{path} | List data in a repository folder -*ContentApi* | [**getRaw**](ContentApi.md#getRaw) | **GET** /repos/{owner}/{repo}/raw/{ref}/{path} | Download raw content -*ContentApi* | [**uploadContent**](ContentApi.md#uploadContent) | **PUT** /repos/{owner}/{repo}/content/{branch}/{path} | Upload data to a repository -*ExperimentsApi* | [**addExperimentLabel**](ExperimentsApi.md#addExperimentLabel) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Add label to experiment -*ExperimentsApi* | [**deleteExperiment**](ExperimentsApi.md#deleteExperiment) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Delete experiment -*ExperimentsApi* | [**deleteExperimentLabel**](ExperimentsApi.md#deleteExperimentLabel) | **DELETE** /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} | Delete experiment label -*ExperimentsApi* | [**editExperiment**](ExperimentsApi.md#editExperiment) | **POST** /repos/{owner}/{repo}/experiments/experiment/{experimentKey} | Edit experiment info -*ExperimentsApi* | [**getExperimentMetrics**](ExperimentsApi.md#getExperimentMetrics) | **POST** /repos/{owner}/{repo}/experiments/metricsForExperiments | Get experiment metrics for experiment -*ExperimentsApi* | [**getExperiments**](ExperimentsApi.md#getExperiments) | **GET** /repos/{owner}/{repo}/experiments | List Experiments -*IssuesApi* | [**createIssue**](IssuesApi.md#createIssue) | **POST** /repos/{owner}/{repo}/issues | Create an issue -*IssuesApi* | [**editIssue**](IssuesApi.md#editIssue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue -*IssuesApi* | [**getIssue**](IssuesApi.md#getIssue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue -*IssuesApi* | [**listRepoIssues**](IssuesApi.md#listRepoIssues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository -*ReleasesApi* | [**listReleases**](ReleasesApi.md#listReleases) | **GET** /repos/{owner}/{repo}/releases | List Releases -*RepositoryApi* | [**createOrgRepo**](RepositoryApi.md#createOrgRepo) | **POST** /org/{orgname}/repos | Create in organization -*RepositoryApi* | [**createRepo**](RepositoryApi.md#createRepo) | **POST** /user/repos | Create -*RepositoryApi* | [**getRepo**](RepositoryApi.md#getRepo) | **GET** /repos/{owner}/{repo} | Get repository information -*RepositoryApi* | [**listMyRepos**](RepositoryApi.md#listMyRepos) | **GET** /user/repos | List your repositories -*RepositoryApi* | [**listOrgRepos**](RepositoryApi.md#listOrgRepos) | **GET** /orgs/{orgname}/repos | List organization repositories -*RepositoryApi* | [**listUserRepos**](RepositoryApi.md#listUserRepos) | **GET** /users/{username}/repos | List user repositories -*RepositoryApi* | [**migrateRepo**](RepositoryApi.md#migrateRepo) | **POST** /repos/migrate | Migrate repository -*RepositoryApi* | [**search**](RepositoryApi.md#search) | **GET** /repos/search | Search repositories -*StorageIntegrationsApi* | [**getBucketContent**](StorageIntegrationsApi.md#getBucketContent) | **GET** /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} | List contents in the path -*StorageIntegrationsApi* | [**getBucketFile**](StorageIntegrationsApi.md#getBucketFile) | **GET** /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} | Get file in the bucket -*StorageIntegrationsApi* | [**getBuckets**](StorageIntegrationsApi.md#getBuckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository -*UserApi* | [**getAuthenticatedUser**](UserApi.md#getAuthenticatedUser) | **GET** /user | Get authenticated user information -*UserApi* | [**getUser**](UserApi.md#getUser) | **GET** /users/{username} | Get information about a user -*WebhooksApi* | [**createHook**](WebhooksApi.md#createHook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook -*WebhooksApi* | [**deleteHook**](WebhooksApi.md#deleteHook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook -*WebhooksApi* | [**editHook**](WebhooksApi.md#editHook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook -*WebhooksApi* | [**listHooks**](WebhooksApi.md#listHooks) | **GET** /repos/{owner}/{repo}/hooks | List hooks - -## Documentation for Models - - - [Assignee](Assignee.md) - - [Body](Body.md) - - [Closed](Closed.md) - - [CollaboratorsCollaboratorBody](CollaboratorsCollaboratorBody.md) - - [CreateRepo](CreateRepo.md) - - [EditExperimentPost](EditExperimentPost.md) - - [ExperimentKeys](ExperimentKeys.md) - - [Files](Files.md) - - [Files1](Files1.md) - - [HooksIdBody](HooksIdBody.md) - - [Integration](Integration.md) - - [IntegrationInner](IntegrationInner.md) - - [Issue](Issue.md) - - [IssueAssignee](IssueAssignee.md) - - [IssueLabels](IssueLabels.md) - - [IssueMilestone](IssueMilestone.md) - - [Issues](Issues.md) - - [Labels](Labels.md) - - [MigrateRepo](MigrateRepo.md) - - [Milestone](Milestone.md) - - [PatchIssue](PatchIssue.md) - - [PostIssue](PostIssue.md) - - [PutFile](PutFile.md) - - [RepoHooksBody](RepoHooksBody.md) - - [State](State.md) - - [Title](Title.md) - - [User](User.md) - - [WebhookConfig](WebhookConfig.md) - - [WebhookEvents](WebhookEvents.md) - -## Documentation for Authorization - -Authentication schemes defined for the API: -### basicAuth - -- **Type**: HTTP basic authentication - -### tokenAuth - -- **Type**: API key -- **API key parameter name**: token -- **Location**: URL query string - - - -# BUILDING YOUR LIBRARY - -See the homepage `https://github.com/swagger-api/swagger-codegen` for full details. -But briefly, clone the git repository, build the codegen codebase, set up your build -config file, then run the API build script. You will need git, Java 7 or 8 and Apache -maven 3.0.3 or better already installed. - -Your library files will be built under `WWW::MyProjectName`. - - $ git clone https://github.com/swagger-api/swagger-codegen.git - $ cd swagger-codegen - $ mvn package - $ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \ - -i [URL or file path to JSON swagger API spec] \ - -l akka-scala \ - -c /path/to/config/file.json \ - -o /path/to/output/folder - -Bang, all done. Run the `autodoc` script in the `bin` directory to see the API -you just built. - -## Author - - diff --git a/Scala/build.gradle b/Scala/build.gradle deleted file mode 100644 index 707c4f9..0000000 --- a/Scala/build.gradle +++ /dev/null @@ -1,127 +0,0 @@ -apply plugin: 'idea' -apply plugin: 'eclipse' - -group = 'io.swagger' -version = '1.0.0' - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:1.5.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' - } -} - -repositories { - jcenter() -} - - -if(hasProperty('target') && target == 'android') { - - apply plugin: 'com.android.library' - apply plugin: 'com.github.dcendents.android-maven' - - android { - compileSdkVersion 23 - buildToolsVersion '23.0.2' - defaultConfig { - minSdkVersion 14 - targetSdkVersion 23 - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 - } - - // Rename the aar correctly - libraryVariants.all { variant -> - variant.outputs.each { output -> - def outputFile = output.outputFile - if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${project.name}-${variant.baseName}-${version}.aar" - output.outputFile = new File(outputFile.parent, fileName) - } - } - } - - dependencies { - provided 'javax.annotation:jsr250-api:1.0' - } - } - - afterEvaluate { - android.libraryVariants.all { variant -> - def task = project.tasks.create "jar${variant.name.capitalize()}", Jar - task.description = "Create jar artifact for ${variant.name}" - task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task); - } - } - - task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' - } - - artifacts { - archives sourcesJar - } - -} else { - - apply plugin: 'scala' - apply plugin: 'java' - apply plugin: 'maven' - - sourceCompatibility = JavaVersion.VERSION_1_7 - targetCompatibility = JavaVersion.VERSION_1_7 - - install { - repositories.mavenInstaller { - pom.artifactId = 'swagger-scala-client' - } - } - - task execute(type:JavaExec) { - main = System.getProperty('mainClass') - classpath = sourceSets.main.runtimeClasspath - } -} - -ext { - scala_version = "2.10.4" - joda_version = "1.2" - jodatime_version = "2.2" - jersey_version = "1.19" - swagger_core_version = "1.5.8" - jersey_async_version = "1.0.5" - jackson_version = "2.4.2" - junit_version = "4.8.1" - scala_test_version = "2.2.4" - swagger_async_httpclient_version = "0.3.5" -} - -repositories { - mavenLocal() - mavenCentral() -} - -dependencies { - compile "com.fasterxml.jackson.module:jackson-module-scala_2.10:$jackson_version" - compile "com.sun.jersey:jersey-client:$jersey_version" - compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version" - compile "org.jfarcand:jersey-ahc-client:$jersey_async_version" - compile "org.scala-lang:scala-library:$scala_version" - compile "io.swagger:swagger-core:$swagger_core_version" - testCompile "org.scalatest:scalatest_2.10:$scala_test_version" - testCompile "junit:junit:$junit_version" - compile "joda-time:joda-time:$jodatime_version" - compile "org.joda:joda-convert:$joda_version" - compile "com.wordnik.swagger:swagger-async-httpclient_2.10:$swagger_async_httpclient_version" -} diff --git a/Scala/build.sbt b/Scala/build.sbt deleted file mode 100644 index c6b665a..0000000 --- a/Scala/build.sbt +++ /dev/null @@ -1,32 +0,0 @@ -version := "1.0.0" -name := "swagger-scala-client" -organization := "io.swagger" -scalaVersion := "2.11.12" - -libraryDependencies ++= Seq( - "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.9.2", - "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.2", - "com.sun.jersey" % "jersey-core" % "1.19.4", - "com.sun.jersey" % "jersey-client" % "1.19.4", - "com.sun.jersey.contribs" % "jersey-multipart" % "1.19.4", - "org.jfarcand" % "jersey-ahc-client" % "1.0.5", - "io.swagger" % "swagger-core" % "1.5.8", - "joda-time" % "joda-time" % "2.9.9", - "org.joda" % "joda-convert" % "1.9.2", - "org.scalatest" %% "scalatest" % "3.0.4" % "test", - "junit" % "junit" % "4.12" % "test", - "com.wordnik.swagger" %% "swagger-async-httpclient" % "0.3.5" -) - -resolvers ++= Seq( - Resolver.mavenLocal -) - -scalacOptions := Seq( - "-unchecked", - "-deprecation", - "-feature" -) - -publishArtifact in (Compile, packageDoc) := false - diff --git a/Scala/git_push.sh b/Scala/git_push.sh deleted file mode 100644 index 715c961..0000000 --- a/Scala/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="DagsHub" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="api-clients" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/Scala/gradle.properties b/Scala/gradle.properties deleted file mode 100644 index 05644f0..0000000 --- a/Scala/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -# Uncomment to build for Android -#target = android \ No newline at end of file diff --git a/Scala/gradle/wrapper/gradle-wrapper.jar b/Scala/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index e69de29..0000000 diff --git a/Scala/gradle/wrapper/gradle-wrapper.properties b/Scala/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index b7a3647..0000000 --- a/Scala/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue May 17 23:08:05 CST 2016 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip diff --git a/Scala/gradlew b/Scala/gradlew deleted file mode 100644 index 9d82f78..0000000 --- a/Scala/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/Scala/gradlew.bat b/Scala/gradlew.bat deleted file mode 100644 index 5f19212..0000000 --- a/Scala/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/Scala/pom.xml b/Scala/pom.xml deleted file mode 100644 index 9fe5cd1..0000000 --- a/Scala/pom.xml +++ /dev/null @@ -1,255 +0,0 @@ - - 4.0.0 - io.swagger - swagger-scala-client - jar - swagger-scala-client - 1.0.0 - - - - maven-mongodb-plugin-repo - maven mongodb plugin repository - http://maven-mongodb-plugin.googlecode.com/svn/maven/repo - default - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M1 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.9.1 - - - add_sources - generate-sources - - add-source - - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - - 1.7 - 1.7 - - - - net.alchim31.maven - scala-maven-plugin - ${scala-maven-plugin-version} - - - scala-compile-first - process-resources - - add-source - compile - - - - scala-test-compile - process-test-resources - - testCompile - - - - - - -Xms128m - -Xmx1500m - - - - - - - - - org.scala-tools - maven-scala-plugin - - ${scala-version} - - - - - - - com.fasterxml.jackson.module - jackson-module-scala_2.11 - ${jackson-version} - - - com.fasterxml.jackson.datatype - jackson-datatype-joda - ${jackson-version} - - - com.sun.jersey - jersey-client - ${jersey-version} - - - com.sun.jersey.contribs - jersey-multipart - ${jersey-version} - - - org.jfarcand - jersey-ahc-client - ${jersey-async-version} - compile - - - org.scala-lang - scala-library - ${scala-version} - - - io.swagger - swagger-core - ${swagger-core-version} - - - org.scalatest - scalatest_2.11 - ${scala-test-version} - test - - - junit - junit - ${junit-version} - test - - - joda-time - joda-time - ${joda-time-version} - - - org.joda - joda-convert - ${joda-version} - - - com.wordnik.swagger - swagger-async-httpclient_2.11 - ${swagger-async-httpclient-version} - - - - 2.11.12 - 1.9.2 - 2.9.9 - 1.19.4 - 1.5.18 - 1.0.5 - 1.0.0 - 2.9.2 - - 4.13.1 - 3.1.5 - 3.0.4 - 0.3.5 - - UTF-8 - - diff --git a/Scala/settings.gradle b/Scala/settings.gradle deleted file mode 100644 index 5452c70..0000000 --- a/Scala/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "swagger-scala-client" \ No newline at end of file diff --git a/Scala/src/main/scala/io/swagger/client/ApiInvoker.scala b/Scala/src/main/scala/io/swagger/client/ApiInvoker.scala deleted file mode 100644 index 8d4c85f..0000000 --- a/Scala/src/main/scala/io/swagger/client/ApiInvoker.scala +++ /dev/null @@ -1,236 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client - -import com.sun.jersey.api.client.Client -import com.sun.jersey.api.client.ClientResponse -import com.sun.jersey.api.client.config.ClientConfig -import com.sun.jersey.api.client.config.DefaultClientConfig -import com.sun.jersey.api.client.filter.LoggingFilter - -import com.sun.jersey.core.util.MultivaluedMapImpl -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import java.io.File -import java.net.URLEncoder -import java.util.UUID -import javax.ws.rs.core.MediaType - -import scala.collection.JavaConverters._ -import scala.collection.mutable - -import com.fasterxml.jackson.module.scala.DefaultScalaModule -import com.fasterxml.jackson.datatype.joda.JodaModule -import com.fasterxml.jackson.core.JsonGenerator.Feature -import com.fasterxml.jackson.databind._ -import com.fasterxml.jackson.annotation._ -import com.fasterxml.jackson.databind.annotation.JsonSerialize - -object ScalaJsonUtil { - def getJsonMapper: ObjectMapper = { - val mapper = new ObjectMapper() - mapper.registerModule(new DefaultScalaModule()) - mapper.registerModule(new JodaModule()) - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL) - mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT) - mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false) - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) - mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY) - mapper - } -} - -class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper, - httpHeaders: mutable.HashMap[String, String] = mutable.HashMap(), - hostMap: mutable.HashMap[String, Client] = mutable.HashMap(), - asyncHttpClient: Boolean = false, - authScheme: String = "", - authPreemptive: Boolean = false -) { - - var defaultHeaders: mutable.HashMap[String, String] = httpHeaders - - def escape(value: String): String = { - URLEncoder.encode(value, "utf-8").replaceAll("\\+", "%20") - } - def escape(values: List[String]): String = { - values.map(escape).mkString(",") - } - - def escape(value: Long): String = value.toString - def escape(value: Double): String = value.toString - def escape(value: Float): String = value.toString - def escape(value: UUID): String = value.toString - - def deserialize(json: String, containerType: String, cls: Class[_]) = { - if (cls == classOf[String]) { - json match { - case s: String => - if (s.startsWith("\"") && s.endsWith("\"") && s.length > 1) { - s.substring(1, s.length - 1) - } else { - s - } - case _ => null - } - } else { - containerType.toLowerCase match { - case "array" => - val typeInfo = mapper.getTypeFactory.constructCollectionType(classOf[java.util.List[_]], cls) - val response = mapper.readValue(json, typeInfo).asInstanceOf[java.util.List[_]] - response.asScala.toList - case "list" => - val typeInfo = mapper.getTypeFactory.constructCollectionType(classOf[java.util.List[_]], cls) - val response = mapper.readValue(json, typeInfo).asInstanceOf[java.util.List[_]] - response.asScala.toList - case _ => - json match { - case e: String if "\"\"" == e => null - case _ => mapper.readValue(json, cls) - } - } - } - } - - def serialize(obj: AnyRef): String = { - if (obj != null) { - obj match { - case e: List[_] => mapper.writeValueAsString(obj.asInstanceOf[List[_]].asJava) - case _ => mapper.writeValueAsString(obj) - } - } else { - null - } - } - - def invokeApi( - host: String, - path: String, - method: String, - queryParams: Map[String, String], - formParams: Map[String, String], - body: AnyRef, - headerParams: Map[String, String], - contentType: String -): String = { - val client = getClient(host) - - val querystring = queryParams.filter(k => k._2 != null).map(k => escape(k._1) + "=" + escape(k._2)).mkString("?", "&", "") - val builder = client.resource(host + path + querystring).accept(contentType) - headerParams.map(p => builder.header(p._1, p._2)) - defaultHeaders.foreach(p => { - if (!headerParams.contains(p._1) && p._2 != null) { - builder.header(p._1, p._2) - } - }) - var formData: MultivaluedMapImpl = null - if (contentType == "application/x-www-form-urlencoded") { - formData = new MultivaluedMapImpl() - formParams.foreach(p => formData.add(p._1, p._2)) - } - - val response: ClientResponse = method match { - case "GET" => builder.get(classOf[ClientResponse]) - case "POST" => - if (formData != null && formData.size() > 0) { - builder.post(classOf[ClientResponse], formData) - } else if (body != null && body.isInstanceOf[File]) { - val file = body.asInstanceOf[File] - val form = new FormDataMultiPart() - form.field("filename", file.getName) - form.bodyPart(new FileDataBodyPart("file", file, MediaType.MULTIPART_FORM_DATA_TYPE)) - builder.post(classOf[ClientResponse], form) - } else { - if (body == null) { - builder.post(classOf[ClientResponse], serialize(body)) - } else { - builder.`type`(contentType).post(classOf[ClientResponse], serialize(body)) - } - } - case "PUT" => - if (formData != null) { - builder.post(classOf[ClientResponse], formData) - } else if (body == null) { - builder.put(classOf[ClientResponse], null) - } else { - builder.`type`(contentType).put(classOf[ClientResponse], serialize(body)) - } - case "DELETE" => builder.delete(classOf[ClientResponse]) - case "PATCH" => - if(formData != null) { - builder.header("X-HTTP-Method-Override", "PATCH").post(classOf[ClientResponse], formData) - } else if(body == null) { - builder.header("X-HTTP-Method-Override", "PATCH").post(classOf[ClientResponse], null) - } else { - builder.header("X-HTTP-Method-Override", "PATCH").`type`(contentType).post(classOf[ClientResponse], serialize(body)) - } - case _ => null - } - response.getStatusInfo.getStatusCode match { - case 204 => "" - case code: Int if Range(200, 299).contains(code) => - if (response.hasEntity) { - response.getEntity(classOf[String]) - } else { - "" - } - case _ => - val entity = if (response.hasEntity) { - response.getEntity(classOf[String]) - } else { - "no data" - } - throw new ApiException(response.getStatusInfo.getStatusCode, entity) - } - } - - def getClient(host: String): Client = { - if (hostMap.contains(host)) { - hostMap(host) - } else { - val client = newClient(host) - // client.addFilter(new LoggingFilter()) - hostMap += host -> client - client - } - } - - def newClient(host: String): Client = if (asyncHttpClient) { - import com.ning.http.client.Realm - import org.sonatype.spice.jersey.client.ahc.AhcHttpClient - import org.sonatype.spice.jersey.client.ahc.config.DefaultAhcConfig - - val config: DefaultAhcConfig = new DefaultAhcConfig() - if (!authScheme.isEmpty) { - val authSchemeEnum = Realm.AuthScheme.valueOf(authScheme) - config - .getAsyncHttpClientConfigBuilder - .setRealm(new Realm.RealmBuilder().setScheme(authSchemeEnum) - .setUsePreemptiveAuth(authPreemptive).build) - } - AhcHttpClient.create(config) - } else { - Client.create() - } -} - -object ApiInvoker extends ApiInvoker( - mapper = ScalaJsonUtil.getJsonMapper, - httpHeaders = mutable.HashMap(), - hostMap = mutable.HashMap(), - asyncHttpClient = false, - authScheme = "", - authPreemptive = false -) - -class ApiException(val code: Int, msg: String) extends RuntimeException(msg) diff --git a/Scala/src/main/scala/io/swagger/client/AsyncClient.scala b/Scala/src/main/scala/io/swagger/client/AsyncClient.scala deleted file mode 100644 index 44b642c..0000000 --- a/Scala/src/main/scala/io/swagger/client/AsyncClient.scala +++ /dev/null @@ -1,20 +0,0 @@ -package io.swagger.client - -import io.swagger.client.api._ - -import com.wordnik.swagger.client._ - -import java.io.Closeable - -class AsyncClient(config: SwaggerConfig) extends Closeable { - lazy val locator: ServiceLocator = config.locator - lazy val name: String = config.name - - private[this] val client = transportClient - - protected def transportClient: TransportClient = new RestClient(config) - - def close() { - client.close() - } -} diff --git a/Scala/src/main/scala/io/swagger/client/api/BranchesApi.scala b/Scala/src/main/scala/io/swagger/client/api/BranchesApi.scala deleted file mode 100644 index 847b33a..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/BranchesApi.scala +++ /dev/null @@ -1,191 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class BranchesApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new BranchesApiAsyncHelper(client, config) - - /** - * Get Branch - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @return void - */ - def getBranch(owner: String, repo: String, branch: String) = { - val await = Try(Await.result(getBranchAsync(owner, repo, branch), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Get Branch asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @return Future(void) - */ - def getBranchAsync(owner: String, repo: String, branch: String) = { - helper.getBranch(owner, repo, branch) - } - - /** - * List Branches - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - def listBranches(owner: String, repo: String) = { - val await = Try(Await.result(listBranchesAsync(owner, repo), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List Branches asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Future(void) - */ - def listBranchesAsync(owner: String, repo: String) = { - helper.listBranches(owner, repo) - } - -} - -class BranchesApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def getBranch(owner: String, - repo: String, - branch: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/branches/{branch}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "branch" + "\\}", branch.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling BranchesApi->getBranch") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling BranchesApi->getBranch") - - if (branch == null) throw new Exception("Missing required parameter 'branch' when calling BranchesApi->getBranch") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def listBranches(owner: String, - repo: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/branches") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling BranchesApi->listBranches") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling BranchesApi->listBranches") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/api/CollaboratorsApi.scala b/Scala/src/main/scala/io/swagger/client/api/CollaboratorsApi.scala deleted file mode 100644 index 6aec03e..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/CollaboratorsApi.scala +++ /dev/null @@ -1,252 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.model.CollaboratorsCollaboratorBody -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class CollaboratorsApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new CollaboratorsApiAsyncHelper(client, config) - - /** - * Add user as a collaborator - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param collaborator collaborator username - * @param body (optional) - * @return void - */ - def addCollaborator(owner: String, repo: String, collaborator: String, body: Option[CollaboratorsCollaboratorBody] = None) = { - val await = Try(Await.result(addCollaboratorAsync(owner, repo, collaborator, body), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Add user as a collaborator asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param collaborator collaborator username - * @param body (optional) - * @return Future(void) - */ - def addCollaboratorAsync(owner: String, repo: String, collaborator: String, body: Option[CollaboratorsCollaboratorBody] = None) = { - helper.addCollaborator(owner, repo, collaborator, body) - } - - /** - * Get collaborators - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - def getCollaborators(owner: String, repo: String) = { - val await = Try(Await.result(getCollaboratorsAsync(owner, repo), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Get collaborators asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Future(void) - */ - def getCollaboratorsAsync(owner: String, repo: String) = { - helper.getCollaborators(owner, repo) - } - - /** - * Delete collaborator - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param collaborator collaborator username - * @return void - */ - def removeCollaborator(owner: String, repo: String, collaborator: String) = { - val await = Try(Await.result(removeCollaboratorAsync(owner, repo, collaborator), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Delete collaborator asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param collaborator collaborator username - * @return Future(void) - */ - def removeCollaboratorAsync(owner: String, repo: String, collaborator: String) = { - helper.removeCollaborator(owner, repo, collaborator) - } - -} - -class CollaboratorsApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def addCollaborator(owner: String, - repo: String, - collaborator: String, - body: Option[CollaboratorsCollaboratorBody] = None - )(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[Option[CollaboratorsCollaboratorBody]]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/collaborators/{collaborator}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "collaborator" + "\\}", collaborator.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling CollaboratorsApi->addCollaborator") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling CollaboratorsApi->addCollaborator") - - if (collaborator == null) throw new Exception("Missing required parameter 'collaborator' when calling CollaboratorsApi->addCollaborator") - - - val resFuture = client.submit("PUT", path, queryParams.toMap, headerParams.toMap, writer.write(body)) - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def getCollaborators(owner: String, - repo: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/collaborators") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling CollaboratorsApi->getCollaborators") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling CollaboratorsApi->getCollaborators") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def removeCollaborator(owner: String, - repo: String, - collaborator: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/collaborators/{collaborator}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "collaborator" + "\\}", collaborator.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling CollaboratorsApi->removeCollaborator") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling CollaboratorsApi->removeCollaborator") - - if (collaborator == null) throw new Exception("Missing required parameter 'collaborator' when calling CollaboratorsApi->removeCollaborator") - - - val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/api/CommitsApi.scala b/Scala/src/main/scala/io/swagger/client/api/CommitsApi.scala deleted file mode 100644 index a85a3f3..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/CommitsApi.scala +++ /dev/null @@ -1,141 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class CommitsApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new CommitsApiAsyncHelper(client, config) - - /** - * Get a single commit - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param sha a SHA1 of a commit - * @return void - */ - def getCommit(owner: String, repo: String, sha: String) = { - val await = Try(Await.result(getCommitAsync(owner, repo, sha), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Get a single commit asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param sha a SHA1 of a commit - * @return Future(void) - */ - def getCommitAsync(owner: String, repo: String, sha: String) = { - helper.getCommit(owner, repo, sha) - } - -} - -class CommitsApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def getCommit(owner: String, - repo: String, - sha: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/commits/{sha}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "sha" + "\\}", sha.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling CommitsApi->getCommit") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling CommitsApi->getCommit") - - if (sha == null) throw new Exception("Missing required parameter 'sha' when calling CommitsApi->getCommit") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/api/ContentApi.scala b/Scala/src/main/scala/io/swagger/client/api/ContentApi.scala deleted file mode 100644 index 6403023..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/ContentApi.scala +++ /dev/null @@ -1,364 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.model.Files -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class ContentApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new ContentApiAsyncHelper(client, config) - - /** - * Download archive - * This method returns archive by given format. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param ref The name of the commit/branch/tag - * @param format The format of archive, either .zip or .tar.gz - * @return void - */ - def getArchive(owner: String, repo: String, ref: String, format: String) = { - val await = Try(Await.result(getArchiveAsync(owner, repo, ref, format), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Download archive asynchronously - * This method returns archive by given format. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param ref The name of the commit/branch/tag - * @param format The format of archive, either .zip or .tar.gz - * @return Future(void) - */ - def getArchiveAsync(owner: String, repo: String, ref: String, format: String) = { - helper.getArchive(owner, repo, ref, format) - } - - /** - * List data in a repository folder - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @param `path` path of a folder in the repository - * @param includeSize (optional, default to false) - * @return Files - */ - def getContent(owner: String, repo: String, branch: String, `path`: String, includeSize: Option[Boolean] = Option(false)): Option[Files] = { - val await = Try(Await.result(getContentAsync(owner, repo, branch, `path`, includeSize), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List data in a repository folder asynchronously - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @param `path` path of a folder in the repository - * @param includeSize (optional, default to false) - * @return Future(Files) - */ - def getContentAsync(owner: String, repo: String, branch: String, `path`: String, includeSize: Option[Boolean] = Option(false)): Future[Files] = { - helper.getContent(owner, repo, branch, `path`, includeSize) - } - - /** - * Download raw content - * This method returns the raw content of a file. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param ref The name of the commit/branch/tag - * @param `path` The content path - * @return void - */ - def getRaw(owner: String, repo: String, ref: String, `path`: String) = { - val await = Try(Await.result(getRawAsync(owner, repo, ref, `path`), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Download raw content asynchronously - * This method returns the raw content of a file. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param ref The name of the commit/branch/tag - * @param `path` The content path - * @return Future(void) - */ - def getRawAsync(owner: String, repo: String, ref: String, `path`: String) = { - helper.getRaw(owner, repo, ref, `path`) - } - - /** - * Upload data to a repository - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @param `path` path of a folder in the repository - * @param commitSummary (optional) - * @param commitMessage (optional) - * @param commitChoice (optional) - * @param lastCommit (optional) - * @param newBranchName (optional) - * @param versioning (optional) - * @param files (optional) - * @return void - */ - def uploadContent(owner: String, repo: String, branch: String, `path`: String, commitSummary: Option[String] = None, commitMessage: Option[String] = None, commitChoice: Option[String] = None, lastCommit: Option[String] = None, newBranchName: Option[String] = None, versioning: Option[String] = None, files: Option[String] = None) = { - val await = Try(Await.result(uploadContentAsync(owner, repo, branch, `path`, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Upload data to a repository asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param branch branch of the repository - * @param `path` path of a folder in the repository - * @param commitSummary (optional) - * @param commitMessage (optional) - * @param commitChoice (optional) - * @param lastCommit (optional) - * @param newBranchName (optional) - * @param versioning (optional) - * @param files (optional) - * @return Future(void) - */ - def uploadContentAsync(owner: String, repo: String, branch: String, `path`: String, commitSummary: Option[String] = None, commitMessage: Option[String] = None, commitChoice: Option[String] = None, lastCommit: Option[String] = None, newBranchName: Option[String] = None, versioning: Option[String] = None, files: Option[String] = None) = { - helper.uploadContent(owner, repo, branch, `path`, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files) - } - -} - -class ContentApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def getArchive(owner: String, - repo: String, - ref: String, - format: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/archive/{ref}{format}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "ref" + "\\}", ref.toString) - replaceAll("\\{" + "format" + "\\}", format.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ContentApi->getArchive") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ContentApi->getArchive") - - if (ref == null) throw new Exception("Missing required parameter 'ref' when calling ContentApi->getArchive") - - if (format == null) throw new Exception("Missing required parameter 'format' when calling ContentApi->getArchive") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def getContent(owner: String, - repo: String, - branch: String, - `path`: String, - includeSize: Option[Boolean] = Option(false) - )(implicit reader: ClientResponseReader[Files]): Future[Files] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/content/{branch}/{path}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "branch" + "\\}", branch.toString) - replaceAll("\\{" + "path" + "\\}", `path`.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ContentApi->getContent") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ContentApi->getContent") - - if (branch == null) throw new Exception("Missing required parameter 'branch' when calling ContentApi->getContent") - - if (`path` == null) throw new Exception("Missing required parameter '`path`' when calling ContentApi->getContent") - - includeSize match { - case Some(param) => queryParams += "include_size" -> param.toString - case _ => queryParams - } - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def getRaw(owner: String, - repo: String, - ref: String, - `path`: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/raw/{ref}/{path}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "ref" + "\\}", ref.toString) - replaceAll("\\{" + "path" + "\\}", `path`.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ContentApi->getRaw") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ContentApi->getRaw") - - if (ref == null) throw new Exception("Missing required parameter 'ref' when calling ContentApi->getRaw") - - if (`path` == null) throw new Exception("Missing required parameter '`path`' when calling ContentApi->getRaw") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def uploadContent(owner: String, - repo: String, - branch: String, - `path`: String, - commitSummary: Option[String] = None, - commitMessage: Option[String] = None, - commitChoice: Option[String] = None, - lastCommit: Option[String] = None, - newBranchName: Option[String] = None, - versioning: Option[String] = None, - files: Option[String] = None - )(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/content/{branch}/{path}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "branch" + "\\}", branch.toString) - replaceAll("\\{" + "path" + "\\}", `path`.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ContentApi->uploadContent") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ContentApi->uploadContent") - - if (branch == null) throw new Exception("Missing required parameter 'branch' when calling ContentApi->uploadContent") - - if (`path` == null) throw new Exception("Missing required parameter '`path`' when calling ContentApi->uploadContent") - - - val resFuture = client.submit("PUT", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/api/ExperimentsApi.scala b/Scala/src/main/scala/io/swagger/client/api/ExperimentsApi.scala deleted file mode 100644 index 1f9f0d0..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/ExperimentsApi.scala +++ /dev/null @@ -1,431 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.model.EditExperimentPost -import io.swagger.client.model.ExperimentKeys -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class ExperimentsApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new ExperimentsApiAsyncHelper(client, config) - - /** - * Add label to experiment - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param experimentLabel A label for the experiment, max 128 characters. - * @return void - */ - def addExperimentLabel(owner: String, repo: String, experimentKey: String, experimentLabel: String) = { - val await = Try(Await.result(addExperimentLabelAsync(owner, repo, experimentKey, experimentLabel), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Add label to experiment asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param experimentLabel A label for the experiment, max 128 characters. - * @return Future(void) - */ - def addExperimentLabelAsync(owner: String, repo: String, experimentKey: String, experimentLabel: String) = { - helper.addExperimentLabel(owner, repo, experimentKey, experimentLabel) - } - - /** - * Delete experiment - * Support both git and MLflow experiments - * - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @return void - */ - def deleteExperiment(owner: String, repo: String, experimentKey: String) = { - val await = Try(Await.result(deleteExperimentAsync(owner, repo, experimentKey), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Delete experiment asynchronously - * Support both git and MLflow experiments - * - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @return Future(void) - */ - def deleteExperimentAsync(owner: String, repo: String, experimentKey: String) = { - helper.deleteExperiment(owner, repo, experimentKey) - } - - /** - * Delete experiment label - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param experimentLabel A label for the experiment, max 128 characters. - * @return void - */ - def deleteExperimentLabel(owner: String, repo: String, experimentKey: String, experimentLabel: String) = { - val await = Try(Await.result(deleteExperimentLabelAsync(owner, repo, experimentKey, experimentLabel), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Delete experiment label asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param experimentLabel A label for the experiment, max 128 characters. - * @return Future(void) - */ - def deleteExperimentLabelAsync(owner: String, repo: String, experimentKey: String, experimentLabel: String) = { - helper.deleteExperimentLabel(owner, repo, experimentKey, experimentLabel) - } - - /** - * Edit experiment info - * Edit experiment info, currently supports just changing experiment name. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param body (optional) - * @return void - */ - def editExperiment(owner: String, repo: String, experimentKey: String, body: Option[EditExperimentPost] = None) = { - val await = Try(Await.result(editExperimentAsync(owner, repo, experimentKey, body), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Edit experiment info asynchronously - * Edit experiment info, currently supports just changing experiment name. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param experimentKey a valid experiment key - * @param body (optional) - * @return Future(void) - */ - def editExperimentAsync(owner: String, repo: String, experimentKey: String, body: Option[EditExperimentPost] = None) = { - helper.editExperiment(owner, repo, experimentKey, body) - } - - /** - * Get experiment metrics for experiment - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return void - */ - def getExperimentMetrics(owner: String, repo: String, body: Option[ExperimentKeys] = None) = { - val await = Try(Await.result(getExperimentMetricsAsync(owner, repo, body), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Get experiment metrics for experiment asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return Future(void) - */ - def getExperimentMetricsAsync(owner: String, repo: String, body: Option[ExperimentKeys] = None) = { - helper.getExperimentMetrics(owner, repo, body) - } - - /** - * List Experiments - * Get a list of experiments in the given repository - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - def getExperiments(owner: String, repo: String) = { - val await = Try(Await.result(getExperimentsAsync(owner, repo), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List Experiments asynchronously - * Get a list of experiments in the given repository - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Future(void) - */ - def getExperimentsAsync(owner: String, repo: String) = { - helper.getExperiments(owner, repo) - } - -} - -class ExperimentsApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def addExperimentLabel(owner: String, - repo: String, - experimentKey: String, - experimentLabel: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "experimentKey" + "\\}", experimentKey.toString) - replaceAll("\\{" + "experimentLabel" + "\\}", experimentLabel.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ExperimentsApi->addExperimentLabel") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ExperimentsApi->addExperimentLabel") - - if (experimentKey == null) throw new Exception("Missing required parameter 'experimentKey' when calling ExperimentsApi->addExperimentLabel") - - if (experimentLabel == null) throw new Exception("Missing required parameter 'experimentLabel' when calling ExperimentsApi->addExperimentLabel") - - - val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def deleteExperiment(owner: String, - repo: String, - experimentKey: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/experiments/experiment/{experimentKey}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "experimentKey" + "\\}", experimentKey.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ExperimentsApi->deleteExperiment") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ExperimentsApi->deleteExperiment") - - if (experimentKey == null) throw new Exception("Missing required parameter 'experimentKey' when calling ExperimentsApi->deleteExperiment") - - - val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def deleteExperimentLabel(owner: String, - repo: String, - experimentKey: String, - experimentLabel: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "experimentKey" + "\\}", experimentKey.toString) - replaceAll("\\{" + "experimentLabel" + "\\}", experimentLabel.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ExperimentsApi->deleteExperimentLabel") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ExperimentsApi->deleteExperimentLabel") - - if (experimentKey == null) throw new Exception("Missing required parameter 'experimentKey' when calling ExperimentsApi->deleteExperimentLabel") - - if (experimentLabel == null) throw new Exception("Missing required parameter 'experimentLabel' when calling ExperimentsApi->deleteExperimentLabel") - - - val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def editExperiment(owner: String, - repo: String, - experimentKey: String, - body: Option[EditExperimentPost] = None - )(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[Option[EditExperimentPost]]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/experiments/experiment/{experimentKey}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "experimentKey" + "\\}", experimentKey.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ExperimentsApi->editExperiment") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ExperimentsApi->editExperiment") - - if (experimentKey == null) throw new Exception("Missing required parameter 'experimentKey' when calling ExperimentsApi->editExperiment") - - - val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def getExperimentMetrics(owner: String, - repo: String, - body: Option[ExperimentKeys] = None - )(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[Option[ExperimentKeys]]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/experiments/metricsForExperiments") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ExperimentsApi->getExperimentMetrics") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ExperimentsApi->getExperimentMetrics") - - - val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def getExperiments(owner: String, - repo: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/experiments") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ExperimentsApi->getExperiments") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ExperimentsApi->getExperiments") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/api/IssuesApi.scala b/Scala/src/main/scala/io/swagger/client/api/IssuesApi.scala deleted file mode 100644 index 7c0069d..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/IssuesApi.scala +++ /dev/null @@ -1,301 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.model.Issue -import io.swagger.client.model.Issues -import io.swagger.client.model.PatchIssue -import io.swagger.client.model.PostIssue -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class IssuesApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new IssuesApiAsyncHelper(client, config) - - /** - * Create an issue - * Any user with read access to a repository can create an issue. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return Issue - */ - def createIssue(owner: String, repo: String, body: Option[PostIssue] = None): Option[Issue] = { - val await = Try(Await.result(createIssueAsync(owner, repo, body), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Create an issue asynchronously - * Any user with read access to a repository can create an issue. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return Future(Issue) - */ - def createIssueAsync(owner: String, repo: String, body: Option[PostIssue] = None): Future[Issue] = { - helper.createIssue(owner, repo, body) - } - - /** - * Edit an issue - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return Issue - */ - def editIssue(owner: String, repo: String, body: Option[PatchIssue] = None): Option[Issue] = { - val await = Try(Await.result(editIssueAsync(owner, repo, body), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Edit an issue asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return Future(Issue) - */ - def editIssueAsync(owner: String, repo: String, body: Option[PatchIssue] = None): Future[Issue] = { - helper.editIssue(owner, repo, body) - } - - /** - * Get a single issue - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param index the index of an issue or a pull request - * @return Issue - */ - def getIssue(owner: String, repo: String, index: Integer): Option[Issue] = { - val await = Try(Await.result(getIssueAsync(owner, repo, index), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Get a single issue asynchronously - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * - * @param owner owner of the repository - * @param repo name of the repository - * @param index the index of an issue or a pull request - * @return Future(Issue) - */ - def getIssueAsync(owner: String, repo: String, index: Integer): Future[Issue] = { - helper.getIssue(owner, repo, index) - } - - /** - * List issues for a repository - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Issues - */ - def listRepoIssues(owner: String, repo: String): Option[Issues] = { - val await = Try(Await.result(listRepoIssuesAsync(owner, repo), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List issues for a repository asynchronously - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Future(Issues) - */ - def listRepoIssuesAsync(owner: String, repo: String): Future[Issues] = { - helper.listRepoIssues(owner, repo) - } - -} - -class IssuesApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def createIssue(owner: String, - repo: String, - body: Option[PostIssue] = None - )(implicit reader: ClientResponseReader[Issue], writer: RequestWriter[Option[PostIssue]]): Future[Issue] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/issues") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling IssuesApi->createIssue") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling IssuesApi->createIssue") - - - val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def editIssue(owner: String, - repo: String, - body: Option[PatchIssue] = None - )(implicit reader: ClientResponseReader[Issue], writer: RequestWriter[Option[PatchIssue]]): Future[Issue] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/issues") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling IssuesApi->editIssue") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling IssuesApi->editIssue") - - - val resFuture = client.submit("PATCH", path, queryParams.toMap, headerParams.toMap, writer.write(body)) - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def getIssue(owner: String, - repo: String, - index: Integer)(implicit reader: ClientResponseReader[Issue]): Future[Issue] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/issues/{index}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "index" + "\\}", index.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling IssuesApi->getIssue") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling IssuesApi->getIssue") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def listRepoIssues(owner: String, - repo: String)(implicit reader: ClientResponseReader[Issues]): Future[Issues] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/issues") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling IssuesApi->listRepoIssues") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling IssuesApi->listRepoIssues") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/api/ReleasesApi.scala b/Scala/src/main/scala/io/swagger/client/api/ReleasesApi.scala deleted file mode 100644 index 98fbe65..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/ReleasesApi.scala +++ /dev/null @@ -1,135 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class ReleasesApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new ReleasesApiAsyncHelper(client, config) - - /** - * List Releases - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - def listReleases(owner: String, repo: String) = { - val await = Try(Await.result(listReleasesAsync(owner, repo), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List Releases asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Future(void) - */ - def listReleasesAsync(owner: String, repo: String) = { - helper.listReleases(owner, repo) - } - -} - -class ReleasesApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def listReleases(owner: String, - repo: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/releases") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling ReleasesApi->listReleases") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling ReleasesApi->listReleases") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/api/RepositoryApi.scala b/Scala/src/main/scala/io/swagger/client/api/RepositoryApi.scala deleted file mode 100644 index 61e7dce..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/RepositoryApi.scala +++ /dev/null @@ -1,462 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.model.CreateRepo -import io.swagger.client.model.MigrateRepo -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class RepositoryApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new RepositoryApiAsyncHelper(client, config) - - /** - * Create in organization - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * - * @param orgname A DagsHub organization name - * @param body (optional) - * @return void - */ - def createOrgRepo(orgname: String, body: Option[CreateRepo] = None) = { - val await = Try(Await.result(createOrgRepoAsync(orgname, body), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Create in organization asynchronously - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * - * @param orgname A DagsHub organization name - * @param body (optional) - * @return Future(void) - */ - def createOrgRepoAsync(orgname: String, body: Option[CreateRepo] = None) = { - helper.createOrgRepo(orgname, body) - } - - /** - * Create - * Create a new repository for the authenticated user. - * - * @param body (optional) - * @return void - */ - def createRepo(body: Option[CreateRepo] = None) = { - val await = Try(Await.result(createRepoAsync(body), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Create asynchronously - * Create a new repository for the authenticated user. - * - * @param body (optional) - * @return Future(void) - */ - def createRepoAsync(body: Option[CreateRepo] = None) = { - helper.createRepo(body) - } - - /** - * Get repository information - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - def getRepo(owner: String, repo: String) = { - val await = Try(Await.result(getRepoAsync(owner, repo), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Get repository information asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Future(void) - */ - def getRepoAsync(owner: String, repo: String) = { - helper.getRepo(owner, repo) - } - - /** - * List your repositories - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * - * @return void - */ - def listMyRepos() = { - val await = Try(Await.result(listMyReposAsync(), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List your repositories asynchronously - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * - * @return Future(void) - */ - def listMyReposAsync() = { - helper.listMyRepos() - } - - /** - * List organization repositories - * List repositories that are accessible to the authenticated user. - * - * @param orgname A DagsHub organization name - * @return void - */ - def listOrgRepos(orgname: String) = { - val await = Try(Await.result(listOrgReposAsync(orgname), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List organization repositories asynchronously - * List repositories that are accessible to the authenticated user. - * - * @param orgname A DagsHub organization name - * @return Future(void) - */ - def listOrgReposAsync(orgname: String) = { - helper.listOrgRepos(orgname) - } - - /** - * List user repositories - * List public repositories for the specified user. - * - * @param username A DagsHub username or organization name - * @return void - */ - def listUserRepos(username: String) = { - val await = Try(Await.result(listUserReposAsync(username), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List user repositories asynchronously - * List public repositories for the specified user. - * - * @param username A DagsHub username or organization name - * @return Future(void) - */ - def listUserReposAsync(username: String) = { - helper.listUserRepos(username) - } - - /** - * Migrate repository - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * - * @param body (optional) - * @return void - */ - def migrateRepo(body: Option[MigrateRepo] = None) = { - val await = Try(Await.result(migrateRepoAsync(body), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Migrate repository asynchronously - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * - * @param body (optional) - * @return Future(void) - */ - def migrateRepoAsync(body: Option[MigrateRepo] = None) = { - helper.migrateRepo(body) - } - - /** - * Search repositories - * - * - * @param q - * @param uid User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - * @param limit Maximum number of repositories in search results. (optional, default to 10) - * @param page Page number. Default is 1. (optional, default to 1) - * @return void - */ - def search(q: String, uid: Option[Integer] = Option(0), limit: Option[Integer] = Option(10), page: Option[Integer] = Option(1)) = { - val await = Try(Await.result(searchAsync(q, uid, limit, page), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Search repositories asynchronously - * - * - * @param q - * @param uid User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - * @param limit Maximum number of repositories in search results. (optional, default to 10) - * @param page Page number. Default is 1. (optional, default to 1) - * @return Future(void) - */ - def searchAsync(q: String, uid: Option[Integer] = Option(0), limit: Option[Integer] = Option(10), page: Option[Integer] = Option(1)) = { - helper.search(q, uid, limit, page) - } - -} - -class RepositoryApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def createOrgRepo(orgname: String, - body: Option[CreateRepo] = None - )(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[Option[CreateRepo]]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/org/{orgname}/repos") - replaceAll("\\{" + "orgname" + "\\}", orgname.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (orgname == null) throw new Exception("Missing required parameter 'orgname' when calling RepositoryApi->createOrgRepo") - - - val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def createRepo(body: Option[CreateRepo] = None - )(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[Option[CreateRepo]]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/user/repos")) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - - val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def getRepo(owner: String, - repo: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling RepositoryApi->getRepo") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling RepositoryApi->getRepo") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def listMyRepos()(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/user/repos")) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def listOrgRepos(orgname: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/orgs/{orgname}/repos") - replaceAll("\\{" + "orgname" + "\\}", orgname.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (orgname == null) throw new Exception("Missing required parameter 'orgname' when calling RepositoryApi->listOrgRepos") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def listUserRepos(username: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/users/{username}/repos") - replaceAll("\\{" + "username" + "\\}", username.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (username == null) throw new Exception("Missing required parameter 'username' when calling RepositoryApi->listUserRepos") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def migrateRepo(body: Option[MigrateRepo] = None - )(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[Option[MigrateRepo]]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/migrate")) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - - val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def search(q: String, - uid: Option[Integer] = Option(0), - limit: Option[Integer] = Option(10), - page: Option[Integer] = Option(1) - )(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/search")) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (q == null) throw new Exception("Missing required parameter 'q' when calling RepositoryApi->search") - - queryParams += "q" -> q.toString - uid match { - case Some(param) => queryParams += "uid" -> param.toString - case _ => queryParams - } - limit match { - case Some(param) => queryParams += "limit" -> param.toString - case _ => queryParams - } - page match { - case Some(param) => queryParams += "page" -> param.toString - case _ => queryParams - } - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/api/StorageIntegrationsApi.scala b/Scala/src/main/scala/io/swagger/client/api/StorageIntegrationsApi.scala deleted file mode 100644 index 92c5164..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/StorageIntegrationsApi.scala +++ /dev/null @@ -1,295 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.model.Files_1 -import io.swagger.client.model.Integration -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class StorageIntegrationsApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new StorageIntegrationsApiAsyncHelper(client, config) - - /** - * List contents in the path - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param protocol protocol of the storage integration - * @param bucket name and prefix of the bucket integration - * @param `path` path of a folder in the repository - * @param includeSize (optional, default to false) - * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) - * @return Files_1 - */ - def getBucketContent(owner: String, repo: String, protocol: String, bucket: String, `path`: String, includeSize: Option[Boolean] = Option(false), limit: Option[Integer] = Option(100), fromToken: Option[String] = None): Option[Files_1] = { - val await = Try(Await.result(getBucketContentAsync(owner, repo, protocol, bucket, `path`, includeSize, limit, fromToken), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List contents in the path asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param protocol protocol of the storage integration - * @param bucket name and prefix of the bucket integration - * @param `path` path of a folder in the repository - * @param includeSize (optional, default to false) - * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) - * @return Future(Files_1) - */ - def getBucketContentAsync(owner: String, repo: String, protocol: String, bucket: String, `path`: String, includeSize: Option[Boolean] = Option(false), limit: Option[Integer] = Option(100), fromToken: Option[String] = None): Future[Files_1] = { - helper.getBucketContent(owner, repo, protocol, bucket, `path`, includeSize, limit, fromToken) - } - - /** - * Get file in the bucket - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param protocol protocol of the storage integration - * @param bucket name and prefix of the bucket integration - * @param `path` The content path - * @return void - */ - def getBucketFile(owner: String, repo: String, protocol: String, bucket: String, `path`: String) = { - val await = Try(Await.result(getBucketFileAsync(owner, repo, protocol, bucket, `path`), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Get file in the bucket asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param protocol protocol of the storage integration - * @param bucket name and prefix of the bucket integration - * @param `path` The content path - * @return Future(void) - */ - def getBucketFileAsync(owner: String, repo: String, protocol: String, bucket: String, `path`: String) = { - helper.getBucketFile(owner, repo, protocol, bucket, `path`) - } - - /** - * List integrated storages in the repository - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Integration - */ - def getBuckets(owner: String, repo: String): Option[Integration] = { - val await = Try(Await.result(getBucketsAsync(owner, repo), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List integrated storages in the repository asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Future(Integration) - */ - def getBucketsAsync(owner: String, repo: String): Future[Integration] = { - helper.getBuckets(owner, repo) - } - -} - -class StorageIntegrationsApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def getBucketContent(owner: String, - repo: String, - protocol: String, - bucket: String, - `path`: String, - includeSize: Option[Boolean] = Option(false), - limit: Option[Integer] = Option(100), - fromToken: Option[String] = None - )(implicit reader: ClientResponseReader[Files_1]): Future[Files_1] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "protocol" + "\\}", protocol.toString) - replaceAll("\\{" + "bucket" + "\\}", bucket.toString) - replaceAll("\\{" + "path" + "\\}", `path`.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling StorageIntegrationsApi->getBucketContent") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling StorageIntegrationsApi->getBucketContent") - - if (protocol == null) throw new Exception("Missing required parameter 'protocol' when calling StorageIntegrationsApi->getBucketContent") - - if (bucket == null) throw new Exception("Missing required parameter 'bucket' when calling StorageIntegrationsApi->getBucketContent") - - if (`path` == null) throw new Exception("Missing required parameter '`path`' when calling StorageIntegrationsApi->getBucketContent") - - includeSize match { - case Some(param) => queryParams += "include_size" -> param.toString - case _ => queryParams - } - limit match { - case Some(param) => queryParams += "limit" -> param.toString - case _ => queryParams - } - fromToken match { - case Some(param) => queryParams += "from_token" -> param.toString - case _ => queryParams - } - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def getBucketFile(owner: String, - repo: String, - protocol: String, - bucket: String, - `path`: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "protocol" + "\\}", protocol.toString) - replaceAll("\\{" + "bucket" + "\\}", bucket.toString) - replaceAll("\\{" + "path" + "\\}", `path`.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling StorageIntegrationsApi->getBucketFile") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling StorageIntegrationsApi->getBucketFile") - - if (protocol == null) throw new Exception("Missing required parameter 'protocol' when calling StorageIntegrationsApi->getBucketFile") - - if (bucket == null) throw new Exception("Missing required parameter 'bucket' when calling StorageIntegrationsApi->getBucketFile") - - if (`path` == null) throw new Exception("Missing required parameter '`path`' when calling StorageIntegrationsApi->getBucketFile") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def getBuckets(owner: String, - repo: String)(implicit reader: ClientResponseReader[Integration]): Future[Integration] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/storage") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling StorageIntegrationsApi->getBuckets") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling StorageIntegrationsApi->getBuckets") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/api/UserApi.scala b/Scala/src/main/scala/io/swagger/client/api/UserApi.scala deleted file mode 100644 index 79c10af..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/UserApi.scala +++ /dev/null @@ -1,168 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class UserApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new UserApiAsyncHelper(client, config) - - /** - * Get authenticated user information - * - * - * @return void - */ - def getAuthenticatedUser() = { - val await = Try(Await.result(getAuthenticatedUserAsync(), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Get authenticated user information asynchronously - * - * - * @return Future(void) - */ - def getAuthenticatedUserAsync() = { - helper.getAuthenticatedUser() - } - - /** - * Get information about a user - * - * - * @param username A DagsHub username or organization name - * @return void - */ - def getUser(username: String) = { - val await = Try(Await.result(getUserAsync(username), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Get information about a user asynchronously - * - * - * @param username A DagsHub username or organization name - * @return Future(void) - */ - def getUserAsync(username: String) = { - helper.getUser(username) - } - -} - -class UserApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def getAuthenticatedUser()(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/user")) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def getUser(username: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/users/{username}") - replaceAll("\\{" + "username" + "\\}", username.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (username == null) throw new Exception("Missing required parameter 'username' when calling UserApi->getUser") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/api/WebhooksApi.scala b/Scala/src/main/scala/io/swagger/client/api/WebhooksApi.scala deleted file mode 100644 index dfab8e2..0000000 --- a/Scala/src/main/scala/io/swagger/client/api/WebhooksApi.scala +++ /dev/null @@ -1,303 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import java.text.SimpleDateFormat - -import io.swagger.client.model.HooksIdBody -import io.swagger.client.model.RepoHooksBody -import io.swagger.client.{ApiInvoker, ApiException} - -import com.sun.jersey.multipart.FormDataMultiPart -import com.sun.jersey.multipart.file.FileDataBodyPart - -import javax.ws.rs.core.MediaType - -import java.io.File -import java.util.Date -import java.util.TimeZone - -import scala.collection.mutable.HashMap - -import com.wordnik.swagger.client._ -import scala.concurrent.Future -import collection.mutable - -import java.net.URI - -import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ -import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ - -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent._ -import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} - -import org.json4s._ - -class WebhooksApi( - val defBasePath: String = "https://dagshub.com/api/v1", - defApiInvoker: ApiInvoker = ApiInvoker -) { - private lazy val dateTimeFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - private val dateFormatter = { - val formatter = new SimpleDateFormat("yyyy-MM-dd") - formatter.setTimeZone(TimeZone.getTimeZone("UTC")) - formatter - } - implicit val formats = new org.json4s.DefaultFormats { - override def dateFormatter = dateTimeFormatter - } - implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader - implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader - implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader - implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader - implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter - implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter - - var basePath: String = defBasePath - var apiInvoker: ApiInvoker = defApiInvoker - - def addHeader(key: String, value: String): mutable.HashMap[String, String] = { - apiInvoker.defaultHeaders += key -> value - } - - val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) - val client = new RestClient(config) - val helper = new WebhooksApiAsyncHelper(client, config) - - /** - * Create a hook - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return void - */ - def createHook(owner: String, repo: String, body: Option[RepoHooksBody] = None) = { - val await = Try(Await.result(createHookAsync(owner, repo, body), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Create a hook asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param body (optional) - * @return Future(void) - */ - def createHookAsync(owner: String, repo: String, body: Option[RepoHooksBody] = None) = { - helper.createHook(owner, repo, body) - } - - /** - * Delete a hook - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param id - * @return void - */ - def deleteHook(owner: String, repo: String, id: Integer) = { - val await = Try(Await.result(deleteHookAsync(owner, repo, id), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Delete a hook asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param id - * @return Future(void) - */ - def deleteHookAsync(owner: String, repo: String, id: Integer) = { - helper.deleteHook(owner, repo, id) - } - - /** - * Edit a hook - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param id - * @param body (optional) - * @return void - */ - def editHook(owner: String, repo: String, id: Integer, body: Option[HooksIdBody] = None) = { - val await = Try(Await.result(editHookAsync(owner, repo, id, body), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * Edit a hook asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @param id - * @param body (optional) - * @return Future(void) - */ - def editHookAsync(owner: String, repo: String, id: Integer, body: Option[HooksIdBody] = None) = { - helper.editHook(owner, repo, id, body) - } - - /** - * List hooks - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return void - */ - def listHooks(owner: String, repo: String) = { - val await = Try(Await.result(listHooksAsync(owner, repo), Duration.Inf)) - await match { - case Success(i) => Some(await.get) - case Failure(t) => None - } - } - - /** - * List hooks asynchronously - * - * - * @param owner owner of the repository - * @param repo name of the repository - * @return Future(void) - */ - def listHooksAsync(owner: String, repo: String) = { - helper.listHooks(owner, repo) - } - -} - -class WebhooksApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { - - def createHook(owner: String, - repo: String, - body: Option[RepoHooksBody] = None - )(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[Option[RepoHooksBody]]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/hooks") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling WebhooksApi->createHook") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling WebhooksApi->createHook") - - - val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def deleteHook(owner: String, - repo: String, - id: Integer)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/hooks/{id}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "id" + "\\}", id.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling WebhooksApi->deleteHook") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling WebhooksApi->deleteHook") - - - val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def editHook(owner: String, - repo: String, - id: Integer, - body: Option[HooksIdBody] = None - )(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[Option[HooksIdBody]]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/hooks/{id}") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString) - replaceAll("\\{" + "id" + "\\}", id.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling WebhooksApi->editHook") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling WebhooksApi->editHook") - - - val resFuture = client.submit("PATCH", path, queryParams.toMap, headerParams.toMap, writer.write(body)) - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - def listHooks(owner: String, - repo: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { - // create path and map variables - val path = (addFmt("/repos/{owner}/{repo}/hooks") - replaceAll("\\{" + "owner" + "\\}", owner.toString) - replaceAll("\\{" + "repo" + "\\}", repo.toString)) - - // query params - val queryParams = new mutable.HashMap[String, String] - val headerParams = new mutable.HashMap[String, String] - - if (owner == null) throw new Exception("Missing required parameter 'owner' when calling WebhooksApi->listHooks") - - if (repo == null) throw new Exception("Missing required parameter 'repo' when calling WebhooksApi->listHooks") - - - val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") - resFuture flatMap { resp => - process(reader.read(resp)) - } - } - - -} diff --git a/Scala/src/main/scala/io/swagger/client/model/Body.scala b/Scala/src/main/scala/io/swagger/client/model/Body.scala deleted file mode 100644 index fc414ee..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/Body.scala +++ /dev/null @@ -1,21 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * The contents of the issue. - * - */ -case class Body ( -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/CollaboratorsCollaboratorBody.scala b/Scala/src/main/scala/io/swagger/client/model/CollaboratorsCollaboratorBody.scala deleted file mode 100644 index 3a75eab..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/CollaboratorsCollaboratorBody.scala +++ /dev/null @@ -1,21 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * @param permission The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. - */ -case class CollaboratorsCollaboratorBody ( - permission: Option[String] = None -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/CreateRepo.scala b/Scala/src/main/scala/io/swagger/client/model/CreateRepo.scala deleted file mode 100644 index cdb8df2..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/CreateRepo.scala +++ /dev/null @@ -1,35 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * @param name name of the repository for example: '''repo-name''' - * @param description A short description of the repository - * @param `private` Either true to create a private repository, or false to create a public one. - * @param autoInit Pass true to create an initial commit with README, .gitignore and LICENSE. - * @param projectTemplate Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - * @param gitignores Desired language .gitignore templates to apply. Use the name of the templates. for example: '''Go, Sublime Text''' - * @param license Desired LICENSE template to apply. Use the name of the template. for example: '''MIT License''' - * @param readme Desired README template to apply. Use the name of the template. - */ -case class CreateRepo ( - name: String, - description: Option[String] = None, - `private`: Option[Boolean] = None, - autoInit: Option[Boolean] = None, - projectTemplate: Option[String] = None, - gitignores: Option[String] = None, - license: Option[String] = None, - readme: Option[String] = None -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/EditExperimentPost.scala b/Scala/src/main/scala/io/swagger/client/model/EditExperimentPost.scala deleted file mode 100644 index 7c3577e..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/EditExperimentPost.scala +++ /dev/null @@ -1,21 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * @param name for example: '''Awesome Experiment''' - */ -case class EditExperimentPost ( - name: String -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/ExperimentKeys.scala b/Scala/src/main/scala/io/swagger/client/model/ExperimentKeys.scala index 47f31f6..1894bf1 100644 --- a/Scala/src/main/scala/io/swagger/client/model/ExperimentKeys.scala +++ b/Scala/src/main/scala/io/swagger/client/model/ExperimentKeys.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Closed.scala b/Scala/src/main/scala/io/swagger/client/model/ExperimentMetricsResponse.scala similarity index 79% rename from Scala/src/main/scala/io/swagger/client/model/Closed.scala rename to Scala/src/main/scala/io/swagger/client/model/ExperimentMetricsResponse.scala index 71224f4..d0a0b05 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Closed.scala +++ b/Scala/src/main/scala/io/swagger/client/model/ExperimentMetricsResponse.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,11 +11,12 @@ */ package io.swagger.client.model +import java.util.HashMap /** - * Indicate initial issue state as closed (**true**) or open (**false**). + * Map of experiment IDs to their metrics by path * */ -case class Closed ( +case class ExperimentMetricsResponse ( ) diff --git a/Scala/src/main/scala/io/swagger/client/model/Assignee.scala b/Scala/src/main/scala/io/swagger/client/model/ExperimentsResponse.scala similarity index 53% rename from Scala/src/main/scala/io/swagger/client/model/Assignee.scala rename to Scala/src/main/scala/io/swagger/client/model/ExperimentsResponse.scala index 918ff2e..15759d4 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Assignee.scala +++ b/Scala/src/main/scala/io/swagger/client/model/ExperimentsResponse.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -13,9 +13,13 @@ package io.swagger.client.model /** - * Username for the user that this issue should be assigned to. **Note:** Only users with write access can set the assignee for new issues. The assignee is silently dropped otherwise. - * + * @param experiments Map of experiment ID to experiment details + * @param isEditor Whether the authenticated user can edit experiments in this repo + * @param nextPageToken Pagination token for the next page of results (empty string when no more pages) */ -case class Assignee ( +case class ExperimentsResponse ( + experiments: Option[Map[String, ./components/schemas/Experiment.yaml]] = None, + isEditor: Option[Boolean] = None, + nextPageToken: Option[String] = None ) diff --git a/Scala/src/main/scala/io/swagger/client/model/Files.scala b/Scala/src/main/scala/io/swagger/client/model/Files.scala index 8b5691c..f85d9ae 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Files.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Files.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,7 +11,6 @@ */ package io.swagger.client.model -import java.io.File import scala.collection.mutable.ListBuffer /** diff --git a/Scala/src/main/scala/io/swagger/client/model/Files1.scala b/Scala/src/main/scala/io/swagger/client/model/Files1.scala index 0cc5828..cb9c6ac 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Files1.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Files1.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,16 +11,13 @@ */ package io.swagger.client.model -import java.io.File /** * @param entries - * @param limit - * @param nextToken + * @param nextToken Next token to continue pagination from */ case class Files1 ( - entries: Option[List[File]] = None, - limit: Option[Integer] = None, + entries: Option[List[./components/schemas/File.yaml]] = None, nextToken: Option[String] = None ) diff --git a/Scala/src/main/scala/io/swagger/client/model/HooksIdBody.scala b/Scala/src/main/scala/io/swagger/client/model/HooksIdBody.scala deleted file mode 100644 index f60319c..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/HooksIdBody.scala +++ /dev/null @@ -1,25 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * @param config - * @param events - * @param active Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. - */ -case class HooksIdBody ( - config: Option[WebhookConfig] = None, - events: Option[WebhookEvents] = None, - active: Option[Boolean] = None -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/Integration.scala b/Scala/src/main/scala/io/swagger/client/model/Integration.scala index 4de41ba..a0d6585 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Integration.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Integration.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/IntegrationInner.scala b/Scala/src/main/scala/io/swagger/client/model/IntegrationInner.scala deleted file mode 100644 index 39fad96..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/IntegrationInner.scala +++ /dev/null @@ -1,25 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * @param name Name/path of the bucket - * @param protocol Protocol used by the integration - * @param listPath URL to list the root of this bucket - */ -case class IntegrationInner ( - name: Option[String] = None, - protocol: Option[String] = None, - listPath: Option[String] = None -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/Issue.scala b/Scala/src/main/scala/io/swagger/client/model/Issue.scala index b65fd0a..d80f20e 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Issue.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Issue.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -11,10 +11,11 @@ */ package io.swagger.client.model +import java.util.Date /** * @param id - * @param number + * @param number Issue index within the repository * @param user * @param title * @param body @@ -25,23 +26,21 @@ package io.swagger.client.model * @param comments * @param createdAt * @param updatedAt - * @param pullRequest - * @param closed + * @param pullRequest Present when the issue is associated with a pull request */ case class Issue ( - id: Option[Integer] = None, - number: Option[Integer] = None, - user: Option[User] = None, - title: Title, - body: Body, - labels: List[Issue_labels], - milestone: Issue_milestone, - assignee: Issue_assignee, + id: Option[Long] = None, + number: Option[Long] = None, + user: Option[./components/schemas/User.yaml] = None, + title: Option[String] = None, + body: Option[String] = None, + labels: Option[List[Any]] = None, + milestone: Option[Any] = None, + assignee: Option[./components/schemas/User.yaml] = None, state: Option[String] = None, comments: Option[Integer] = None, - createdAt: Option[String] = None, - updatedAt: Option[String] = None, - pullRequest: Option[Any] = None, - closed: Boolean + createdAt: Option[Date] = None, + updatedAt: Option[Date] = None, + pullRequest: Option[Any] = None ) diff --git a/Scala/src/main/scala/io/swagger/client/model/IssueAssignee.scala b/Scala/src/main/scala/io/swagger/client/model/IssueAssignee.scala deleted file mode 100644 index 853780c..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/IssueAssignee.scala +++ /dev/null @@ -1,29 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * @param id - * @param login - * @param fullName - * @param avatarUrl - * @param username - */ -case class IssueAssignee ( - id: Option[Integer] = None, - login: Option[String] = None, - fullName: Option[String] = None, - avatarUrl: Option[String] = None, - username: Option[String] = None -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/IssueLabels.scala b/Scala/src/main/scala/io/swagger/client/model/IssueLabels.scala deleted file mode 100644 index e8ae56b..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/IssueLabels.scala +++ /dev/null @@ -1,27 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * @param id - * @param name - * @param color - * @param url - */ -case class IssueLabels ( - id: Option[Integer] = None, - name: Option[String] = None, - color: Option[String] = None, - url: Option[String] = None -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/IssueMilestone.scala b/Scala/src/main/scala/io/swagger/client/model/IssueMilestone.scala deleted file mode 100644 index 1f81cb0..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/IssueMilestone.scala +++ /dev/null @@ -1,35 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * @param id - * @param title - * @param description - * @param state - * @param openIssues - * @param closedIssues - * @param closedAt - * @param dueOn - */ -case class IssueMilestone ( - id: Option[Integer] = None, - title: Option[String] = None, - description: Option[String] = None, - state: Option[String] = None, - openIssues: Option[Integer] = None, - closedIssues: Option[Integer] = None, - closedAt: Option[String] = None, - dueOn: Option[String] = None -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/Issues.scala b/Scala/src/main/scala/io/swagger/client/model/Issues.scala index 9dce607..fea81d0 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Issues.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Issues.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Labels.scala b/Scala/src/main/scala/io/swagger/client/model/Labels.scala deleted file mode 100644 index b6eaefe..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/Labels.scala +++ /dev/null @@ -1,22 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - -import scala.collection.mutable.ListBuffer - -/** - * Labels **ID** to associate with this issue. **Note:** Only users with write access can set labels for new issues. Labels are silently dropped otherwise. - * - */ -case class Labels ( -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/MigrateRepo.scala b/Scala/src/main/scala/io/swagger/client/model/MigrateRepo.scala deleted file mode 100644 index 8642dda..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/MigrateRepo.scala +++ /dev/null @@ -1,35 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * @param cloneAddr Remote Git address (HTTP/HTTPS URL or local path) - * @param authUsername Authorization username - * @param authPassword Authorization password - * @param userId User ID who takes ownership of this repository - * @param repoName Name of the repository for example: '''repo-name''' - * @param mirror Repository will be a mirror (connected repository). - * @param visibility Repository will be private or public. - * @param description Description of the repository for example: '''This is a repository''' - */ -case class MigrateRepo ( - cloneAddr: String, - authUsername: Option[String] = None, - authPassword: Option[String] = None, - userId: Integer, - repoName: Option[String] = None, - mirror: Option[Boolean] = None, - visibility: Option[String] = None, - description: Option[String] = None -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/Milestone.scala b/Scala/src/main/scala/io/swagger/client/model/Milestone.scala deleted file mode 100644 index 6796f2c..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/Milestone.scala +++ /dev/null @@ -1,21 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * The **ID** of the milestone to associate this issue with. **Note:** Only users with write access can set the milestone for new issues. The milestone is silently dropped otherwise. - * - */ -case class Milestone ( -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/PatchIssue.scala b/Scala/src/main/scala/io/swagger/client/model/PatchIssue.scala index 9dd2a20..ed138a7 100644 --- a/Scala/src/main/scala/io/swagger/client/model/PatchIssue.scala +++ b/Scala/src/main/scala/io/swagger/client/model/PatchIssue.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -20,10 +20,10 @@ package io.swagger.client.model * @param state */ case class PatchIssue ( - title: Option[Title] = None, - body: Option[Body] = None, - assignee: Option[Assignee] = None, - milestone: Option[Milestone] = None, - state: Option[State] = None + title: Option[./components/schemas/Title.yaml] = None, + body: Option[./components/schemas/Body.yaml] = None, + assignee: Option[./components/schemas/Assignee.yaml] = None, + milestone: Option[./components/schemas/Milestone.yaml] = None, + state: Option[./components/schemas/State.yaml] = None ) diff --git a/Scala/src/main/scala/io/swagger/client/model/PostIssue.scala b/Scala/src/main/scala/io/swagger/client/model/PostIssue.scala index d5763c8..30a63e2 100644 --- a/Scala/src/main/scala/io/swagger/client/model/PostIssue.scala +++ b/Scala/src/main/scala/io/swagger/client/model/PostIssue.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -21,11 +21,11 @@ package io.swagger.client.model * @param closed */ case class PostIssue ( - title: Option[Title] = None, - body: Option[Body] = None, - assignee: Option[Assignee] = None, - milestone: Option[Milestone] = None, - labels: Option[Labels] = None, - closed: Option[Closed] = None + title: Option[./components/schemas/Title.yaml] = None, + body: Option[./components/schemas/Body.yaml] = None, + assignee: Option[./components/schemas/Assignee.yaml] = None, + milestone: Option[./components/schemas/Milestone.yaml] = None, + labels: Option[./components/schemas/Labels.yaml] = None, + closed: Option[./components/schemas/Closed.yaml] = None ) diff --git a/Scala/src/main/scala/io/swagger/client/model/PutFile.scala b/Scala/src/main/scala/io/swagger/client/model/PutFile.scala index 2b14cca..16a6759 100644 --- a/Scala/src/main/scala/io/swagger/client/model/PutFile.scala +++ b/Scala/src/main/scala/io/swagger/client/model/PutFile.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/RepoHooksBody.scala b/Scala/src/main/scala/io/swagger/client/model/RepoHooksBody.scala deleted file mode 100644 index 32661be..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/RepoHooksBody.scala +++ /dev/null @@ -1,25 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * @param `type` The type of webhook for example: '''discord''' - * @param config - * @param events - */ -case class RepoHooksBody ( - `type`: String, - config: WebhookConfig, - events: Option[WebhookEvents] = None -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/State.scala b/Scala/src/main/scala/io/swagger/client/model/State.scala deleted file mode 100644 index 577bbc4..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/State.scala +++ /dev/null @@ -1,19 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - */ -case class State ( -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/Title.scala b/Scala/src/main/scala/io/swagger/client/model/Title.scala deleted file mode 100644 index 34438a7..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/Title.scala +++ /dev/null @@ -1,21 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * The title of the issue - * - */ -case class Title ( -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/User.scala b/Scala/src/main/scala/io/swagger/client/model/User.scala index 00ab209..6565b84 100644 --- a/Scala/src/main/scala/io/swagger/client/model/User.scala +++ b/Scala/src/main/scala/io/swagger/client/model/User.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -15,15 +15,23 @@ package io.swagger.client.model /** * @param id * @param login + * @param username Alias for login (legacy compatibility) * @param fullName * @param avatarUrl - * @param username + * @param publicEmail + * @param website + * @param company + * @param description */ case class User ( - id: Option[Integer] = None, + id: Option[Long] = None, login: Option[String] = None, + username: Option[String] = None, fullName: Option[String] = None, avatarUrl: Option[String] = None, - username: Option[String] = None + publicEmail: Option[String] = None, + website: Option[String] = None, + company: Option[String] = None, + description: Option[String] = None ) diff --git a/Scala/src/main/scala/io/swagger/client/model/WebhookConfig.scala b/Scala/src/main/scala/io/swagger/client/model/WebhookConfig.scala deleted file mode 100644 index 09dacfe..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/WebhookConfig.scala +++ /dev/null @@ -1,27 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - - -/** - * Key/value pairs to provide settings for this hook - * - * @param url A string defining the URL to which the payloads will be delivered. for example: '''http://yourwebsite.io''' - * @param `contentType` A string defining the media type used to serialize the payloads. for example: '''json''' - * @param secret An optional string that's passed with the HTTP requests body. for example: '''supersecretkey''' - */ -case class WebhookConfig ( - url: String, - `contentType`: String, - secret: Option[String] = None -) - diff --git a/Scala/src/main/scala/io/swagger/client/model/WebhookEvents.scala b/Scala/src/main/scala/io/swagger/client/model/WebhookEvents.scala deleted file mode 100644 index b21ac76..0000000 --- a/Scala/src/main/scala/io/swagger/client/model/WebhookEvents.scala +++ /dev/null @@ -1,22 +0,0 @@ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - -import scala.collection.mutable.ListBuffer - -/** - * Determines what events the hook is triggered format. - * - */ -case class WebhookEvents ( -) - diff --git a/Swift/.gitignore b/Swift/.gitignore deleted file mode 100644 index 5e5d5ce..0000000 --- a/Swift/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/Swift/.swagger-codegen-ignore b/Swift/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/Swift/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/Swift/.swagger-codegen/VERSION b/Swift/.swagger-codegen/VERSION deleted file mode 100644 index 053a355..0000000 --- a/Swift/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.35 \ No newline at end of file diff --git a/Swift/Cartfile b/Swift/Cartfile deleted file mode 100644 index 86748c6..0000000 --- a/Swift/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "Alamofire/Alamofire" ~> 4.9.0 diff --git a/Swift/SwaggerClient.podspec b/Swift/SwaggerClient.podspec deleted file mode 100644 index 170b6b6..0000000 --- a/Swift/SwaggerClient.podspec +++ /dev/null @@ -1,12 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'SwaggerClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.version = '0.0.1' - s.source = { :git => 'git@github.com:swagger-api/swagger-mustache.git', :tag => 'v1.0.0' } - s.authors = 'Swagger Codegen' - s.license = 'Proprietary' - s.source_files = 'SwaggerClient/Classes/**/*.swift' - s.dependency 'Alamofire', '~> 4.9.0' -end diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIHelper.swift b/Swift/SwaggerClient/Classes/Swaggers/APIHelper.swift deleted file mode 100644 index 81e7286..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIHelper.swift +++ /dev/null @@ -1,65 +0,0 @@ -// APIHelper.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? Array { - result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - - public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? Array { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} - diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs.swift deleted file mode 100644 index 207819f..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs.swift +++ /dev/null @@ -1,61 +0,0 @@ -// APIs.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - -open class SwaggerClientAPI { - public static var basePath = "https://dagshub.com/api/v1" - public static var credential: URLCredential? - public static var customHeaders: [String:String] = [:] - public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String:String] - public let parameters: [String:Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> ())? - - required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(SwaggerClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders:[String:String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = SwaggerClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/BranchesAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/BranchesAPI.swift deleted file mode 100644 index 6291f75..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/BranchesAPI.swift +++ /dev/null @@ -1,120 +0,0 @@ -// -// BranchesAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class BranchesAPI { - /** - Get Branch - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter branch: (path) branch of the repository - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getBranch(owner: String, repo: String, branch: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getBranchWithRequestBuilder(owner: owner, repo: repo, branch: branch).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Get Branch - - GET /repos/{owner}/{repo}/branches/{branch} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter branch: (path) branch of the repository - - - returns: RequestBuilder - */ - open class func getBranchWithRequestBuilder(owner: String, repo: String, branch: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/branches/{branch}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let branchPreEscape = "\(branch)" - let branchPostEscape = branchPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{branch}", with: branchPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - List Branches - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter completion: completion handler to receive the data and the error objects - */ - open class func listBranches(owner: String, repo: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - listBranchesWithRequestBuilder(owner: owner, repo: repo).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - List Branches - - GET /repos/{owner}/{repo}/branches - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - - returns: RequestBuilder - */ - open class func listBranchesWithRequestBuilder(owner: String, repo: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/branches" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/CollaboratorsAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/CollaboratorsAPI.swift deleted file mode 100644 index 88a7b26..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/CollaboratorsAPI.swift +++ /dev/null @@ -1,178 +0,0 @@ -// -// CollaboratorsAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class CollaboratorsAPI { - /** - Add user as a collaborator - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter collaborator: (path) collaborator username - - parameter body: (body) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func addCollaborator(owner: String, repo: String, collaborator: String, body: CollaboratorsCollaboratorBody? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - addCollaboratorWithRequestBuilder(owner: owner, repo: repo, collaborator: collaborator, body: body).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Add user as a collaborator - - PUT /repos/{owner}/{repo}/collaborators/{collaborator} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter collaborator: (path) collaborator username - - parameter body: (body) (optional) - - - returns: RequestBuilder - */ - open class func addCollaboratorWithRequestBuilder(owner: String, repo: String, collaborator: String, body: CollaboratorsCollaboratorBody? = nil) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/collaborators/{collaborator}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let collaboratorPreEscape = "\(collaborator)" - let collaboratorPostEscape = collaboratorPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{collaborator}", with: collaboratorPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - /** - Get collaborators - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getCollaborators(owner: String, repo: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getCollaboratorsWithRequestBuilder(owner: owner, repo: repo).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Get collaborators - - GET /repos/{owner}/{repo}/collaborators - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - - returns: RequestBuilder - */ - open class func getCollaboratorsWithRequestBuilder(owner: String, repo: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/collaborators" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - Delete collaborator - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter collaborator: (path) collaborator username - - parameter completion: completion handler to receive the data and the error objects - */ - open class func removeCollaborator(owner: String, repo: String, collaborator: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - removeCollaboratorWithRequestBuilder(owner: owner, repo: repo, collaborator: collaborator).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Delete collaborator - - DELETE /repos/{owner}/{repo}/collaborators/{collaborator} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter collaborator: (path) collaborator username - - - returns: RequestBuilder - */ - open class func removeCollaboratorWithRequestBuilder(owner: String, repo: String, collaborator: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/collaborators/{collaborator}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let collaboratorPreEscape = "\(collaborator)" - let collaboratorPostEscape = collaboratorPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{collaborator}", with: collaboratorPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/CommitsAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/CommitsAPI.swift deleted file mode 100644 index 0205732..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/CommitsAPI.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// CommitsAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class CommitsAPI { - /** - Get a single commit - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter sha: (path) a SHA1 of a commit - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getCommit(owner: String, repo: String, sha: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getCommitWithRequestBuilder(owner: owner, repo: repo, sha: sha).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Get a single commit - - GET /repos/{owner}/{repo}/commits/{sha} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter sha: (path) a SHA1 of a commit - - - returns: RequestBuilder - */ - open class func getCommitWithRequestBuilder(owner: String, repo: String, sha: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/commits/{sha}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let shaPreEscape = "\(sha)" - let shaPostEscape = shaPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{sha}", with: shaPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/ContentAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/ContentAPI.swift deleted file mode 100644 index 859d3d9..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/ContentAPI.swift +++ /dev/null @@ -1,323 +0,0 @@ -// -// ContentAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class ContentAPI { - /** - * enum for parameter format - */ - public enum Format_getArchive: String { - case zip = ".zip" - case tarGz = ".tar.gz" - } - - /** - Download archive - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter ref: (path) The name of the commit/branch/tag - - parameter format: (path) The format of archive, either .zip or .tar.gz - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getArchive(owner: String, repo: String, ref: String, format: Format_getArchive, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getArchiveWithRequestBuilder(owner: owner, repo: repo, ref: ref, format: format).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Download archive - - GET /repos/{owner}/{repo}/archive/{ref}{format} - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter ref: (path) The name of the commit/branch/tag - - parameter format: (path) The format of archive, either .zip or .tar.gz - - - returns: RequestBuilder - */ - open class func getArchiveWithRequestBuilder(owner: String, repo: String, ref: String, format: Format_getArchive) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/archive/{ref}{format}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let refPreEscape = "\(ref)" - let refPostEscape = refPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{ref}", with: refPostEscape, options: .literal, range: nil) - let formatPreEscape = "\(format.rawValue)" - let formatPostEscape = formatPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{format}", with: formatPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - List data in a repository folder - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter branch: (path) branch of the repository - - parameter path: (path) path of a folder in the repository - - parameter includeSize: (query) (optional, default to false) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getContent(owner: String, repo: String, branch: String, path: String, includeSize: Bool? = nil, completion: @escaping ((_ data: Files?,_ error: Error?) -> Void)) { - getContentWithRequestBuilder(owner: owner, repo: repo, branch: branch, path: path, includeSize: includeSize).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - List data in a repository folder - - GET /repos/{owner}/{repo}/content/{branch}/{path} - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - examples: [{contentType=application/json, example=[ { - "path" : "images/000.png", - "versioning" : "dvc", - "size" : 421, - "download_url" : "https://dagshub.com/Simon/baby-yoda-segmentation-dataset/raw/master/images/000.png", - "content_url" : "https://dagshub.com/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png", - "type" : "[file]", - "hash" : "79fb7f8632d7e15b3b46a7411d08bcdd" -}, { - "path" : "images/000.png", - "versioning" : "dvc", - "size" : 421, - "download_url" : "https://dagshub.com/Simon/baby-yoda-segmentation-dataset/raw/master/images/000.png", - "content_url" : "https://dagshub.com/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png", - "type" : "[file]", - "hash" : "79fb7f8632d7e15b3b46a7411d08bcdd" -} ]}] - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter branch: (path) branch of the repository - - parameter path: (path) path of a folder in the repository - - parameter includeSize: (query) (optional, default to false) - - - returns: RequestBuilder - */ - open class func getContentWithRequestBuilder(owner: String, repo: String, branch: String, path: String, includeSize: Bool? = nil) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/content/{branch}/{path}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let branchPreEscape = "\(branch)" - let branchPostEscape = branchPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{branch}", with: branchPostEscape, options: .literal, range: nil) - let pathPreEscape = "\(path)" - let pathPostEscape = pathPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{path}", with: pathPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "include_size": includeSize - ]) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - Download raw content - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter ref: (path) The name of the commit/branch/tag - - parameter path: (path) The content path - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getRaw(owner: String, repo: String, ref: String, path: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getRawWithRequestBuilder(owner: owner, repo: repo, ref: ref, path: path).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Download raw content - - GET /repos/{owner}/{repo}/raw/{ref}/{path} - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter ref: (path) The name of the commit/branch/tag - - parameter path: (path) The content path - - - returns: RequestBuilder - */ - open class func getRawWithRequestBuilder(owner: String, repo: String, ref: String, path: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/raw/{ref}/{path}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let refPreEscape = "\(ref)" - let refPostEscape = refPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{ref}", with: refPostEscape, options: .literal, range: nil) - let pathPreEscape = "\(path)" - let pathPostEscape = pathPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{path}", with: pathPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - * enum for parameter commitChoice - */ - public enum CommitChoice_uploadContent: String { - case direct = "direct" - case commitToNewBranch = "commit-to-new-branch" - } - - /** - * enum for parameter versioning - */ - public enum Versioning_uploadContent: String { - case auto = "auto" - case dvc = "dvc" - case git = "git" - case bucket = "bucket" - } - - /** - Upload data to a repository - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter branch: (path) branch of the repository - - parameter path: (path) path of a folder in the repository - - parameter commitSummary: (form) (optional) - - parameter commitMessage: (form) (optional) - - parameter commitChoice: (form) (optional) - - parameter lastCommit: (form) (optional) - - parameter newBranchName: (form) (optional) - - parameter versioning: (form) (optional) - - parameter files: (form) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadContent(owner: String, repo: String, branch: String, path: String, commitSummary: String? = nil, commitMessage: String? = nil, commitChoice: CommitChoice_uploadContent? = nil, lastCommit: String? = nil, newBranchName: String? = nil, versioning: Versioning_uploadContent? = nil, files: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - uploadContentWithRequestBuilder(owner: owner, repo: repo, branch: branch, path: path, commitSummary: commitSummary, commitMessage: commitMessage, commitChoice: commitChoice, lastCommit: lastCommit, newBranchName: newBranchName, versioning: versioning, files: files).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Upload data to a repository - - PUT /repos/{owner}/{repo}/content/{branch}/{path} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter branch: (path) branch of the repository - - parameter path: (path) path of a folder in the repository - - parameter commitSummary: (form) (optional) - - parameter commitMessage: (form) (optional) - - parameter commitChoice: (form) (optional) - - parameter lastCommit: (form) (optional) - - parameter newBranchName: (form) (optional) - - parameter versioning: (form) (optional) - - parameter files: (form) (optional) - - - returns: RequestBuilder - */ - open class func uploadContentWithRequestBuilder(owner: String, repo: String, branch: String, path: String, commitSummary: String? = nil, commitMessage: String? = nil, commitChoice: CommitChoice_uploadContent? = nil, lastCommit: String? = nil, newBranchName: String? = nil, versioning: Versioning_uploadContent? = nil, files: String? = nil) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/content/{branch}/{path}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let branchPreEscape = "\(branch)" - let branchPostEscape = branchPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{branch}", with: branchPostEscape, options: .literal, range: nil) - let pathPreEscape = "\(path)" - let pathPostEscape = pathPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{path}", with: pathPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let formParams: [String:Any?] = [ - "commit_summary": commitSummary, - "commit_message": commitMessage, - "commit_choice": commitChoice?.rawValue, - "last_commit": lastCommit, - "new_branch_name": newBranchName, - "versioning": versioning?.rawValue, - "files": files - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/ExperimentsAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/ExperimentsAPI.swift deleted file mode 100644 index 84283d3..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/ExperimentsAPI.swift +++ /dev/null @@ -1,350 +0,0 @@ -// -// ExperimentsAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class ExperimentsAPI { - /** - Add label to experiment - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter experimentKey: (path) a valid experiment key - - parameter experimentLabel: (path) A label for the experiment, max 128 characters. - - parameter completion: completion handler to receive the data and the error objects - */ - open class func addExperimentLabel(owner: String, repo: String, experimentKey: String, experimentLabel: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - addExperimentLabelWithRequestBuilder(owner: owner, repo: repo, experimentKey: experimentKey, experimentLabel: experimentLabel).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Add label to experiment - - POST /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter experimentKey: (path) a valid experiment key - - parameter experimentLabel: (path) A label for the experiment, max 128 characters. - - - returns: RequestBuilder - */ - open class func addExperimentLabelWithRequestBuilder(owner: String, repo: String, experimentKey: String, experimentLabel: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let experimentKeyPreEscape = "\(experimentKey)" - let experimentKeyPostEscape = experimentKeyPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{experimentKey}", with: experimentKeyPostEscape, options: .literal, range: nil) - let experimentLabelPreEscape = "\(experimentLabel)" - let experimentLabelPostEscape = experimentLabelPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{experimentLabel}", with: experimentLabelPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - Delete experiment - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter experimentKey: (path) a valid experiment key - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteExperiment(owner: String, repo: String, experimentKey: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - deleteExperimentWithRequestBuilder(owner: owner, repo: repo, experimentKey: experimentKey).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Delete experiment - - DELETE /repos/{owner}/{repo}/experiments/experiment/{experimentKey} - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter experimentKey: (path) a valid experiment key - - - returns: RequestBuilder - */ - open class func deleteExperimentWithRequestBuilder(owner: String, repo: String, experimentKey: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let experimentKeyPreEscape = "\(experimentKey)" - let experimentKeyPostEscape = experimentKeyPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{experimentKey}", with: experimentKeyPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - Delete experiment label - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter experimentKey: (path) a valid experiment key - - parameter experimentLabel: (path) A label for the experiment, max 128 characters. - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteExperimentLabel(owner: String, repo: String, experimentKey: String, experimentLabel: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - deleteExperimentLabelWithRequestBuilder(owner: owner, repo: repo, experimentKey: experimentKey, experimentLabel: experimentLabel).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Delete experiment label - - DELETE /repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter experimentKey: (path) a valid experiment key - - parameter experimentLabel: (path) A label for the experiment, max 128 characters. - - - returns: RequestBuilder - */ - open class func deleteExperimentLabelWithRequestBuilder(owner: String, repo: String, experimentKey: String, experimentLabel: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let experimentKeyPreEscape = "\(experimentKey)" - let experimentKeyPostEscape = experimentKeyPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{experimentKey}", with: experimentKeyPostEscape, options: .literal, range: nil) - let experimentLabelPreEscape = "\(experimentLabel)" - let experimentLabelPostEscape = experimentLabelPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{experimentLabel}", with: experimentLabelPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - Edit experiment info - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter experimentKey: (path) a valid experiment key - - parameter body: (body) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func editExperiment(owner: String, repo: String, experimentKey: String, body: EditExperimentPost? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - editExperimentWithRequestBuilder(owner: owner, repo: repo, experimentKey: experimentKey, body: body).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Edit experiment info - - POST /repos/{owner}/{repo}/experiments/experiment/{experimentKey} - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter experimentKey: (path) a valid experiment key - - parameter body: (body) (optional) - - - returns: RequestBuilder - */ - open class func editExperimentWithRequestBuilder(owner: String, repo: String, experimentKey: String, body: EditExperimentPost? = nil) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/experiments/experiment/{experimentKey}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let experimentKeyPreEscape = "\(experimentKey)" - let experimentKeyPostEscape = experimentKeyPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{experimentKey}", with: experimentKeyPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - /** - Get experiment metrics for experiment - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter body: (body) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getExperimentMetrics(owner: String, repo: String, body: ExperimentKeys? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getExperimentMetricsWithRequestBuilder(owner: owner, repo: repo, body: body).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Get experiment metrics for experiment - - POST /repos/{owner}/{repo}/experiments/metricsForExperiments - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter body: (body) (optional) - - - returns: RequestBuilder - */ - open class func getExperimentMetricsWithRequestBuilder(owner: String, repo: String, body: ExperimentKeys? = nil) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/experiments/metricsForExperiments" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - /** - List Experiments - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getExperiments(owner: String, repo: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getExperimentsWithRequestBuilder(owner: owner, repo: repo).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - List Experiments - - GET /repos/{owner}/{repo}/experiments - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - - returns: RequestBuilder - */ - open class func getExperimentsWithRequestBuilder(owner: String, repo: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/experiments" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/IssuesAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/IssuesAPI.swift deleted file mode 100644 index cec7f28..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/IssuesAPI.swift +++ /dev/null @@ -1,296 +0,0 @@ -// -// IssuesAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class IssuesAPI { - /** - Create an issue - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter body: (body) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createIssue(owner: String, repo: String, body: PostIssue? = nil, completion: @escaping ((_ data: Issue?,_ error: Error?) -> Void)) { - createIssueWithRequestBuilder(owner: owner, repo: repo, body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - Create an issue - - POST /repos/{owner}/{repo}/issues - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - examples: [{contentType=application/json, example={ - "id" : 72, - "number" : 1, - "state" : "open", - "title" : "test issue", - "body" : "", - "user" : { - "id" : 3, - "username" : "user1", - "full_name" : "", - "email" : "fake@local", - "avatar_url" : "https://secure.gravatar.com/avatar/0207f4280f6c1bd45e1a2ed7cb1cca3d" - }, - "labels" : [ "bug" ], - "comments" : 1, - "created_at" : "2016-03-05T13:18:51-05:00", - "updated_at" : "2016-03-05T13:18:51-05:00" -}}] - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter body: (body) (optional) - - - returns: RequestBuilder - */ - open class func createIssueWithRequestBuilder(owner: String, repo: String, body: PostIssue? = nil) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/issues" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - /** - Edit an issue - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter body: (body) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func editIssue(owner: String, repo: String, body: PatchIssue? = nil, completion: @escaping ((_ data: Issue?,_ error: Error?) -> Void)) { - editIssueWithRequestBuilder(owner: owner, repo: repo, body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - Edit an issue - - PATCH /repos/{owner}/{repo}/issues - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - examples: [{contentType=application/json, example={ - "id" : 72, - "number" : 1, - "state" : "open", - "title" : "test issue", - "body" : "", - "user" : { - "id" : 3, - "username" : "user1", - "full_name" : "", - "email" : "fake@local", - "avatar_url" : "https://secure.gravatar.com/avatar/0207f4280f6c1bd45e1a2ed7cb1cca3d" - }, - "labels" : [ "bug" ], - "comments" : 1, - "created_at" : "2016-03-05T13:18:51-05:00", - "updated_at" : "2016-03-05T13:18:51-05:00" -}}] - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter body: (body) (optional) - - - returns: RequestBuilder - */ - open class func editIssueWithRequestBuilder(owner: String, repo: String, body: PatchIssue? = nil) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/issues" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - /** - Get a single issue - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter index: (path) the index of an issue or a pull request - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getIssue(owner: String, repo: String, index: Int, completion: @escaping ((_ data: Issue?,_ error: Error?) -> Void)) { - getIssueWithRequestBuilder(owner: owner, repo: repo, index: index).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - Get a single issue - - GET /repos/{owner}/{repo}/issues/{index} - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - examples: [{contentType=application/json, example={ - "id" : 72, - "number" : 1, - "state" : "open", - "title" : "test issue", - "body" : "", - "user" : { - "id" : 3, - "username" : "user1", - "full_name" : "", - "email" : "fake@local", - "avatar_url" : "https://secure.gravatar.com/avatar/0207f4280f6c1bd45e1a2ed7cb1cca3d" - }, - "labels" : [ "bug" ], - "comments" : 1, - "created_at" : "2016-03-05T13:18:51-05:00", - "updated_at" : "2016-03-05T13:18:51-05:00" -}}] - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter index: (path) the index of an issue or a pull request - - - returns: RequestBuilder - */ - open class func getIssueWithRequestBuilder(owner: String, repo: String, index: Int) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/issues/{index}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let indexPreEscape = "\(index)" - let indexPostEscape = indexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{index}", with: indexPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - List issues for a repository - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter completion: completion handler to receive the data and the error objects - */ - open class func listRepoIssues(owner: String, repo: String, completion: @escaping ((_ data: Issues?,_ error: Error?) -> Void)) { - listRepoIssuesWithRequestBuilder(owner: owner, repo: repo).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - List issues for a repository - - GET /repos/{owner}/{repo}/issues - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - examples: [{contentType=application/json, example=[ { - "id" : 72, - "number" : 1, - "state" : "open", - "title" : "test issue", - "body" : "", - "user" : { - "id" : 3, - "username" : "user1", - "full_name" : "", - "email" : "fake@local", - "avatar_url" : "https://secure.gravatar.com/avatar/0207f4280f6c1bd45e1a2ed7cb1cca3d" - }, - "labels" : [ "bug" ], - "comments" : 1, - "created_at" : "2016-03-05T13:18:51-05:00", - "updated_at" : "2016-03-05T13:18:51-05:00" -}, { - "id" : 72, - "number" : 1, - "state" : "open", - "title" : "test issue", - "body" : "", - "user" : { - "id" : 3, - "username" : "user1", - "full_name" : "", - "email" : "fake@local", - "avatar_url" : "https://secure.gravatar.com/avatar/0207f4280f6c1bd45e1a2ed7cb1cca3d" - }, - "labels" : [ "bug" ], - "comments" : 1, - "created_at" : "2016-03-05T13:18:51-05:00", - "updated_at" : "2016-03-05T13:18:51-05:00" -} ]}] - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - - returns: RequestBuilder - */ - open class func listRepoIssuesWithRequestBuilder(owner: String, repo: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/issues" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/ReleasesAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/ReleasesAPI.swift deleted file mode 100644 index 9501f9b..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/ReleasesAPI.swift +++ /dev/null @@ -1,64 +0,0 @@ -// -// ReleasesAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class ReleasesAPI { - /** - List Releases - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter completion: completion handler to receive the data and the error objects - */ - open class func listReleases(owner: String, repo: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - listReleasesWithRequestBuilder(owner: owner, repo: repo).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - List Releases - - GET /repos/{owner}/{repo}/releases - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - - returns: RequestBuilder - */ - open class func listReleasesWithRequestBuilder(owner: String, repo: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/releases" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/RepositoryAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/RepositoryAPI.swift deleted file mode 100644 index ced5d5c..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/RepositoryAPI.swift +++ /dev/null @@ -1,448 +0,0 @@ -// -// RepositoryAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class RepositoryAPI { - /** - Create in organization - - - parameter orgname: (path) A DagsHub organization name - - parameter body: (body) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createOrgRepo(orgname: String, body: CreateRepo? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - createOrgRepoWithRequestBuilder(orgname: orgname, body: body).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Create in organization - - POST /org/{orgname}/repos - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter orgname: (path) A DagsHub organization name - - parameter body: (body) (optional) - - - returns: RequestBuilder - */ - open class func createOrgRepoWithRequestBuilder(orgname: String, body: CreateRepo? = nil) -> RequestBuilder { - var path = "/org/{orgname}/repos" - let orgnamePreEscape = "\(orgname)" - let orgnamePostEscape = orgnamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{orgname}", with: orgnamePostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - /** - Create - - - parameter body: (body) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createRepo(body: CreateRepo? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - createRepoWithRequestBuilder(body: body).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Create - - POST /user/repos - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter body: (body) (optional) - - - returns: RequestBuilder - */ - open class func createRepoWithRequestBuilder(body: CreateRepo? = nil) -> RequestBuilder { - let path = "/user/repos" - let URLString = SwaggerClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - /** - Get repository information - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getRepo(owner: String, repo: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getRepoWithRequestBuilder(owner: owner, repo: repo).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Get repository information - - GET /repos/{owner}/{repo} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - - returns: RequestBuilder - */ - open class func getRepoWithRequestBuilder(owner: String, repo: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - List your repositories - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func listMyRepos(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - listMyReposWithRequestBuilder().execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - List your repositories - - GET /user/repos - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - examples: [{contentType=application/json, example=[ { - "id" : 2942, - "owner" : { - "id" : 23, - "login" : "DagsHub", - "full_name" : "DagsHub", - "avatar_url" : "https://dagshub.com/avatars/23", - "username" : "DagsHub" - }, - "name" : "audio-datasets", - "full_name" : "DagsHub/audio-datasets", - "description" : "Open-source audio datasets hosted on DagsHub", - "private" : false, - "fork" : false, - "parent" : null, - "empty" : false, - "mirror" : true, - "size" : 10121216, - "html_url" : "https://dagshub.com/DagsHub/audio-datasets", - "ssh_url" : "ssh://git@dagshub.com:2200/DagsHub/audio-datasets.git", - "clone_url" : "https://github.com/DAGsHub/audio-datasets.git", - "website" : "", - "stars_count" : 2, - "forks_count" : 2, - "watchers_count" : 7, - "open_issues_count" : 11, - "default_branch" : "main", - "created_at" : "2021-10-05T16:02:42Z", - "updated_at" : "2022-08-22T09:54:12Z", - "permissions" : { - "admin" : true, - "push" : true, - "pull" : true - } -} ]}] - - - returns: RequestBuilder - */ - open class func listMyReposWithRequestBuilder() -> RequestBuilder { - let path = "/user/repos" - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - List organization repositories - - - parameter orgname: (path) A DagsHub organization name - - parameter completion: completion handler to receive the data and the error objects - */ - open class func listOrgRepos(orgname: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - listOrgReposWithRequestBuilder(orgname: orgname).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - List organization repositories - - GET /orgs/{orgname}/repos - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter orgname: (path) A DagsHub organization name - - - returns: RequestBuilder - */ - open class func listOrgReposWithRequestBuilder(orgname: String) -> RequestBuilder { - var path = "/orgs/{orgname}/repos" - let orgnamePreEscape = "\(orgname)" - let orgnamePostEscape = orgnamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{orgname}", with: orgnamePostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - List user repositories - - - parameter username: (path) A DagsHub username or organization name - - parameter completion: completion handler to receive the data and the error objects - */ - open class func listUserRepos(username: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - listUserReposWithRequestBuilder(username: username).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - List user repositories - - GET /users/{username}/repos - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter username: (path) A DagsHub username or organization name - - - returns: RequestBuilder - */ - open class func listUserReposWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/users/{username}/repos" - let usernamePreEscape = "\(username)" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - Migrate repository - - - parameter body: (body) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func migrateRepo(body: MigrateRepo? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - migrateRepoWithRequestBuilder(body: body).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Migrate repository - - POST /repos/migrate - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter body: (body) (optional) - - - returns: RequestBuilder - */ - open class func migrateRepoWithRequestBuilder(body: MigrateRepo? = nil) -> RequestBuilder { - let path = "/repos/migrate" - let URLString = SwaggerClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - /** - Search repositories - - - parameter q: (query) - - parameter uid: (query) User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - - parameter limit: (query) Maximum number of repositories in search results. (optional, default to 10) - - parameter page: (query) Page number. Default is 1. (optional, default to 1) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func search(q: String, uid: Int? = nil, limit: Int? = nil, page: Int? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - searchWithRequestBuilder(q: q, uid: uid, limit: limit, page: page).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Search repositories - - GET /repos/search - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - examples: [{contentType=application/json, example={ - "data" : [ { - "id" : 1213, - "owner" : { - "id" : 6, - "login" : "DAGsHub-Official", - "full_name" : "DagsHub Official", - "avatar_url" : "https://dagshub.com/avatars/6", - "username" : "DAGsHub-Official" - }, - "name" : "dagshub-docs", - "full_name" : "DAGsHub-Official/dagshub-docs", - "description" : "Official repo for DagsHub documentation.", - "private" : false, - "fork" : false, - "parent" : null, - "empty" : false, - "mirror" : false, - "size" : 458313728, - "html_url" : "https://dagshub.com/DAGsHub-Official/dagshub-docs", - "ssh_url" : "ssh://git@dagshub.com:2200/DAGsHub-Official/dagshub-docs.git", - "clone_url" : "https://dagshub.com/DAGsHub-Official/dagshub-docs.git", - "website" : "https://dagshub.com/docs", - "stars_count" : 4, - "forks_count" : 11, - "watchers_count" : 1, - "open_issues_count" : 2, - "default_branch" : "main", - "created_at" : "2021-02-23T11:53:45Z", - "updated_at" : "2022-09-14T09:55:35Z" - } ], - "ok" : true -}}] - - parameter q: (query) - - parameter uid: (query) User ID to specify search whose repositories. Default is 0 and search all repositories (optional, default to 0) - - parameter limit: (query) Maximum number of repositories in search results. (optional, default to 10) - - parameter page: (query) Page number. Default is 1. (optional, default to 1) - - - returns: RequestBuilder - */ - open class func searchWithRequestBuilder(q: String, uid: Int? = nil, limit: Int? = nil, page: Int? = nil) -> RequestBuilder { - let path = "/repos/search" - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "q": q, - "uid": uid?.encodeToJSON(), - "limit": limit?.encodeToJSON(), - "page": page?.encodeToJSON() - ]) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/StorageIntegrationsAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/StorageIntegrationsAPI.swift deleted file mode 100644 index 3a4db53..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/StorageIntegrationsAPI.swift +++ /dev/null @@ -1,245 +0,0 @@ -// -// StorageIntegrationsAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class StorageIntegrationsAPI { - /** - * enum for parameter _protocol - */ - public enum ModelProtocol_getBucketContent: String { - case gs = "gs" - case s3 = "s3" - } - - /** - List contents in the path - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter _protocol: (path) protocol of the storage integration - - parameter bucket: (path) name and prefix of the bucket integration - - parameter path: (path) path of a folder in the repository - - parameter includeSize: (query) (optional, default to false) - - parameter limit: (query) Maximum amount of items to return (optional, default to 100) - - parameter fromToken: (query) Token, from which to continue iteration (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getBucketContent(owner: String, repo: String, _protocol: ModelProtocol_getBucketContent, bucket: String, path: String, includeSize: Bool? = nil, limit: Int? = nil, fromToken: String? = nil, completion: @escaping ((_ data: Files1?,_ error: Error?) -> Void)) { - getBucketContentWithRequestBuilder(owner: owner, repo: repo, _protocol: _protocol, bucket: bucket, path: path, includeSize: includeSize, limit: limit, fromToken: fromToken).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - List contents in the path - - GET /repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - examples: [{contentType=application/json, example={ - "entries" : [ { - "path" : "images/000.png", - "versioning" : "dvc", - "size" : 421, - "download_url" : "https://dagshub.com/Simon/baby-yoda-segmentation-dataset/raw/master/images/000.png", - "content_url" : "https://dagshub.com/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png", - "type" : "[file]", - "hash" : "79fb7f8632d7e15b3b46a7411d08bcdd" - }, { - "path" : "images/000.png", - "versioning" : "dvc", - "size" : 421, - "download_url" : "https://dagshub.com/Simon/baby-yoda-segmentation-dataset/raw/master/images/000.png", - "content_url" : "https://dagshub.com/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png", - "type" : "[file]", - "hash" : "79fb7f8632d7e15b3b46a7411d08bcdd" - } ], - "limit" : 0, - "next_token" : "next_token" -}}] - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter _protocol: (path) protocol of the storage integration - - parameter bucket: (path) name and prefix of the bucket integration - - parameter path: (path) path of a folder in the repository - - parameter includeSize: (query) (optional, default to false) - - parameter limit: (query) Maximum amount of items to return (optional, default to 100) - - parameter fromToken: (query) Token, from which to continue iteration (optional) - - - returns: RequestBuilder - */ - open class func getBucketContentWithRequestBuilder(owner: String, repo: String, _protocol: ModelProtocol_getBucketContent, bucket: String, path: String, includeSize: Bool? = nil, limit: Int? = nil, fromToken: String? = nil) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let _protocolPreEscape = "\(_protocol.rawValue)" - let _protocolPostEscape = _protocolPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{protocol}", with: _protocolPostEscape, options: .literal, range: nil) - let bucketPreEscape = "\(bucket)" - let bucketPostEscape = bucketPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{bucket}", with: bucketPostEscape, options: .literal, range: nil) - let pathPreEscape = "\(path)" - let pathPostEscape = pathPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{path}", with: pathPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "include_size": includeSize, - "limit": limit?.encodeToJSON(), - "from_token": fromToken - ]) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - * enum for parameter _protocol - */ - public enum ModelProtocol_getBucketFile: String { - case gs = "gs" - case s3 = "s3" - } - - /** - Get file in the bucket - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter _protocol: (path) protocol of the storage integration - - parameter bucket: (path) name and prefix of the bucket integration - - parameter path: (path) The content path - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getBucketFile(owner: String, repo: String, _protocol: ModelProtocol_getBucketFile, bucket: String, path: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getBucketFileWithRequestBuilder(owner: owner, repo: repo, _protocol: _protocol, bucket: bucket, path: path).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Get file in the bucket - - GET /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter _protocol: (path) protocol of the storage integration - - parameter bucket: (path) name and prefix of the bucket integration - - parameter path: (path) The content path - - - returns: RequestBuilder - */ - open class func getBucketFileWithRequestBuilder(owner: String, repo: String, _protocol: ModelProtocol_getBucketFile, bucket: String, path: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let _protocolPreEscape = "\(_protocol.rawValue)" - let _protocolPostEscape = _protocolPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{protocol}", with: _protocolPostEscape, options: .literal, range: nil) - let bucketPreEscape = "\(bucket)" - let bucketPostEscape = bucketPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{bucket}", with: bucketPostEscape, options: .literal, range: nil) - let pathPreEscape = "\(path)" - let pathPostEscape = pathPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{path}", with: pathPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - List integrated storages in the repository - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getBuckets(owner: String, repo: String, completion: @escaping ((_ data: Integration?,_ error: Error?) -> Void)) { - getBucketsWithRequestBuilder(owner: owner, repo: repo).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - List integrated storages in the repository - - GET /repos/{owner}/{repo}/storage - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - examples: [{contentType=application/json, example=[ { - "protocol" : "s3", - "name" : "name", - "list_path" : "list_path" -}, { - "protocol" : "s3", - "name" : "name", - "list_path" : "list_path" -} ]}] - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - - returns: RequestBuilder - */ - open class func getBucketsWithRequestBuilder(owner: String, repo: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/storage" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/UserAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/UserAPI.swift deleted file mode 100644 index a9cbead..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/UserAPI.swift +++ /dev/null @@ -1,100 +0,0 @@ -// -// UserAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class UserAPI { - /** - Get authenticated user information - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getAuthenticatedUser(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getAuthenticatedUserWithRequestBuilder().execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Get authenticated user information - - GET /user - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - - returns: RequestBuilder - */ - open class func getAuthenticatedUserWithRequestBuilder() -> RequestBuilder { - let path = "/user" - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - Get information about a user - - - parameter username: (path) A DagsHub username or organization name - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getUser(username: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - getUserWithRequestBuilder(username: username).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Get information about a user - - GET /users/{username} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter username: (path) A DagsHub username or organization name - - - returns: RequestBuilder - */ - open class func getUserWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/users/{username}" - let usernamePreEscape = "\(username)" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/WebhooksAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/WebhooksAPI.swift deleted file mode 100644 index 0629e16..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/WebhooksAPI.swift +++ /dev/null @@ -1,231 +0,0 @@ -// -// WebhooksAPI.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - - -open class WebhooksAPI { - /** - Create a hook - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter body: (body) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createHook(owner: String, repo: String, body: RepoHooksBody? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - createHookWithRequestBuilder(owner: owner, repo: repo, body: body).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Create a hook - - POST /repos/{owner}/{repo}/hooks - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter body: (body) (optional) - - - returns: RequestBuilder - */ - open class func createHookWithRequestBuilder(owner: String, repo: String, body: RepoHooksBody? = nil) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/hooks" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - /** - Delete a hook - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter _id: (path) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteHook(owner: String, repo: String, _id: Int, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - deleteHookWithRequestBuilder(owner: owner, repo: repo, _id: _id).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Delete a hook - - DELETE /repos/{owner}/{repo}/hooks/{id} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter _id: (path) - - - returns: RequestBuilder - */ - open class func deleteHookWithRequestBuilder(owner: String, repo: String, _id: Int) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/hooks/{id}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let _idPreEscape = "\(_id)" - let _idPostEscape = _idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{id}", with: _idPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - /** - Edit a hook - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter _id: (path) - - parameter body: (body) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func editHook(owner: String, repo: String, _id: Int, body: HooksIdBody? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - editHookWithRequestBuilder(owner: owner, repo: repo, _id: _id, body: body).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - Edit a hook - - PATCH /repos/{owner}/{repo}/hooks/{id} - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter _id: (path) - - parameter body: (body) (optional) - - - returns: RequestBuilder - */ - open class func editHookWithRequestBuilder(owner: String, repo: String, _id: Int, body: HooksIdBody? = nil) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/hooks/{id}" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let _idPreEscape = "\(_id)" - let _idPostEscape = _idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{id}", with: _idPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - /** - List hooks - - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - parameter completion: completion handler to receive the data and the error objects - */ - open class func listHooks(owner: String, repo: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { - listHooksWithRequestBuilder(owner: owner, repo: repo).execute { (response, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - - /** - List hooks - - GET /repos/{owner}/{repo}/hooks - - - - - BASIC: - - type: http - - name: basicAuth - - API Key: - - type: apiKey token (QUERY) - - name: tokenAuth - - parameter owner: (path) owner of the repository - - parameter repo: (path) name of the repository - - - returns: RequestBuilder - */ - open class func listHooksWithRequestBuilder(owner: String, repo: String) -> RequestBuilder { - var path = "/repos/{owner}/{repo}/hooks" - let ownerPreEscape = "\(owner)" - let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) - let repoPreEscape = "\(repo)" - let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) - let URLString = SwaggerClientAPI.basePath + path - let parameters: [String:Any]? = nil - let url = URLComponents(string: URLString) - - - let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/AlamofireImplementations.swift b/Swift/SwaggerClient/Classes/Swaggers/AlamofireImplementations.swift deleted file mode 100644 index f072650..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/AlamofireImplementations.swift +++ /dev/null @@ -1,422 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -// Store manager to retain its reference -private var managerStore: [String: Alamofire.SessionManager] = [:] - -// Sync queue to manage safe access to the store manager -private let syncQueue = DispatchQueue(label: "thread-safe-sync-queue", attributes: .concurrent) - -open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - open func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId:String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - syncQueue.async(flags: .barrier) { - managerStore[managerId] = manager - } - - let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } - else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - syncQueue.async(flags: .barrier) { - _ = managerStore.removeValue(forKey: managerId) - } - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename : String? = nil - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with:"") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url : URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -fileprivate enum DownloadException : Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - syncQueue.async(flags: .barrier) { - _ = managerStore.removeValue(forKey: managerId) - } - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? = nil - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/CodableHelper.swift b/Swift/SwaggerClient/Classes/Swaggers/CodableHelper.swift deleted file mode 100644 index c303941..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/CodableHelper.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - -public typealias EncodeResult = (data: Data?, error: Error?) - -enum DateError: String, Error { - case invalidDate -} - -open class CodableHelper { - - public static var dateformatter: DateFormatter? - - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable { - var returnedDecodable: T? = nil - var returnedError: Error? = nil - - let decoder = JSONDecoder() - - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in - let container = try decoder.singleValueContainer() - let dateStr = try container.decode(String.self) - - let formatters = [ - "yyyy-MM-dd", - "yyyy-MM-dd'T'HH:mm:ssZZZZZ", - "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ", - "yyyy-MM-dd'T'HH:mm:ss'Z'", - "yyyy-MM-dd'T'HH:mm:ss.SSS", - "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", - "yyyy-MM-dd HH:mm:ss" - ].map { (format: String) -> DateFormatter in - let formatter = DateFormatter() - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.dateFormat = format - return formatter - } - - for formatter in formatters { - - if let date = formatter.date(from: dateStr) { - return date - } - } - - throw DateError.invalidDate - }) - } - - do { - returnedDecodable = try decoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T : Encodable { - var returnedData: Data? - var returnedError: Error? = nil - - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX" - encoder.dateEncodingStrategy = .formatted(formatter) - - do { - returnedData = try encoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Configuration.swift b/Swift/SwaggerClient/Classes/Swaggers/Configuration.swift deleted file mode 100644 index 139bced..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} \ No newline at end of file diff --git a/Swift/SwaggerClient/Classes/Swaggers/Extensions.swift b/Swift/SwaggerClient/Classes/Swaggers/Extensions.swift deleted file mode 100644 index f9c33ea..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Extensions.swift +++ /dev/null @@ -1,173 +0,0 @@ -// Extensions.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -private let dateFormatter: DateFormatter = { - let fmt = DateFormatter() - fmt.dateFormat = Configuration.dateFormat - fmt.locale = Locale(identifier: "en_US_POSIX") - return fmt -}() - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { - var tmpArray: [T]? = nil - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { - var map: [Self.Key : T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} - - diff --git a/Swift/SwaggerClient/Classes/Swaggers/JSONEncodableEncoding.swift b/Swift/SwaggerClient/Classes/Swaggers/JSONEncodableEncoding.swift deleted file mode 100644 index 472e955..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? = nil - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/JSONEncodingHelper.swift b/Swift/SwaggerClient/Classes/Swaggers/JSONEncodingHelper.swift deleted file mode 100644 index 19ee06b..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? = nil - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? = nil - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/JSONValue.swift b/Swift/SwaggerClient/Classes/Swaggers/JSONValue.swift deleted file mode 100644 index 21a93ac..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/JSONValue.swift +++ /dev/null @@ -1,99 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - -public enum JSONValue: Codable, Equatable { - case string(String) - case int(Int) - case double(Double) - case bool(Bool) - case object([String: JSONValue]) - case array([JSONValue]) - case null - - public func encode(to encoder: Encoder) throws { - var container = encoder.singleValueContainer() - switch self { - case .string(let string): try container.encode(string) - case .int(let int): try container.encode(int) - case .double(let double): try container.encode(double) - case .bool(let bool): try container.encode(bool) - case .object(let object): try container.encode(object) - case .array(let array): try container.encode(array) - case .null: try container.encode(Optional.none) - } - } - - public init(from decoder: Decoder) throws { - let container = try decoder.singleValueContainer() - self = try ((try? container.decode(String.self)).map(JSONValue.string)) - .or((try? container.decode(Int.self)).map(JSONValue.int)) - .or((try? container.decode(Double.self)).map(JSONValue.double)) - .or((try? container.decode(Bool.self)).map(JSONValue.bool)) - .or((try? container.decode([String: JSONValue].self)).map(JSONValue.object)) - .or((try? container.decode([JSONValue].self)).map(JSONValue.array)) - .or((container.decodeNil() ? .some(JSONValue.null) : .none)) - .resolve( - with: DecodingError.typeMismatch( - JSONValue.self, - DecodingError.Context( - codingPath: container.codingPath, - debugDescription: "Not a JSON value" - ) - ) - ) - } - -} - -extension JSONValue: ExpressibleByStringLiteral { - public init(stringLiteral value: String) { - self = .string(value) - } -} -extension JSONValue: ExpressibleByIntegerLiteral { - public init(integerLiteral value: Int) { - self = .int(value) - } -} -extension JSONValue: ExpressibleByFloatLiteral { - public init(floatLiteral value: Double) { - self = .double(value) - } -} -extension JSONValue: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = .bool(value) - } -} -extension JSONValue: ExpressibleByDictionaryLiteral { - public init(dictionaryLiteral elements: (String, JSONValue)...) { - self = .object([String: JSONValue](uniqueKeysWithValues: elements)) - } -} -extension JSONValue: ExpressibleByArrayLiteral { - public init(arrayLiteral elements: JSONValue...) { - self = .array(elements) - } -} - -fileprivate extension Optional { - func or(_ other: Optional) -> Optional { - switch self { - case .none: return other - case .some: return self - } - } - func resolve(with error: @autoclosure () -> Error) throws -> Wrapped { - switch self { - case .none: throw error() - case .some(let wrapped): return wrapped - } - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models.swift b/Swift/SwaggerClient/Classes/Swaggers/Models.swift deleted file mode 100644 index d7dfe63..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse : Error { - case error(Int, Data?, Error) -} - -open class Response { - public let statusCode: Int - public let header: [String: String] - public let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String:String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Assignee.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Assignee.swift deleted file mode 100644 index d8e129a..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Assignee.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Assignee.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - -/** Username for the user that this issue should be assigned to. **Note:** Only users with write access can set the assignee for new issues. The assignee is silently dropped otherwise. */ - -public struct Assignee: Codable { - - - - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Body.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Body.swift deleted file mode 100644 index 79a79ab..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Body.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Body.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - -/** The contents of the issue. */ - -public struct Body: Codable { - - - - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Closed.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Closed.swift deleted file mode 100644 index 9b7922c..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Closed.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Closed.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - -/** Indicate initial issue state as closed (**true**) or open (**false**). */ - -public struct Closed: Codable { - - - - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/CollaboratorsCollaboratorBody.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/CollaboratorsCollaboratorBody.swift deleted file mode 100644 index afeca9d..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/CollaboratorsCollaboratorBody.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// CollaboratorsCollaboratorBody.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct CollaboratorsCollaboratorBody: Codable { - - /** The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. */ - public var permission: String? - - public init(permission: String? = nil) { - self.permission = permission - } - - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/CreateRepo.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/CreateRepo.swift deleted file mode 100644 index 5b99253..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/CreateRepo.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// CreateRepo.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct CreateRepo: Codable { - - public enum ProjectTemplate: String, Codable { - case cookiecutterDagshubDvc = "cookiecutter-dagshub-dvc" - case custom = "custom" - case _none = "none" - case notebookTemplate = "notebook-template" - } - public enum License: String, Codable { - case apacheLicense20 = "Apache License 2.0" - case mitLicense = "MIT License" - case abstylesLicense = "Abstyles License" - case academicFreeLicenseV11 = "Academic Free License v1.1" - case academicFreeLicenseV12 = "Academic Free License v1.2" - case academicFreeLicenseV20 = "Academic Free License v2.0" - case academicFreeLicenseV21 = "Academic Free License v2.1" - case academicFreeLicenseV30 = "Academic Free License v3.0" - case afferoGeneralPublicLicenseV10 = "Affero General Public License v1.0" - case apacheLicense10 = "Apache License 1.0" - case apacheLicense11 = "Apache License 1.1" - case artisticLicense10 = "Artistic License 1.0" - case artisticLicense20 = "Artistic License 2.0" - case bsd2ClauseLicense = "BSD 2-clause License" - case bsd3ClauseLicense = "BSD 3-clause License" - case bsd4ClauseLicense = "BSD 4-clause License" - case creativeCommonsCc010Universal = "Creative Commons CC0 1.0 Universal" - case eclipsePublicLicense10 = "Eclipse Public License 1.0" - case educationalCommunityLicenseV10 = "Educational Community License v1.0" - case educationalCommunityLicenseV20 = "Educational Community License v2.0" - case gnuAfferoGeneralPublicLicenseV30 = "GNU Affero General Public License v3.0" - case gnuFreeDocumentationLicenseV11 = "GNU Free Documentation License v1.1" - case gnuFreeDocumentationLicenseV12 = "GNU Free Documentation License v1.2" - case gnuFreeDocumentationLicenseV13 = "GNU Free Documentation License v1.3" - case gnuGeneralPublicLicenseV10 = "GNU General Public License v1.0" - case gnuGeneralPublicLicenseV20 = "GNU General Public License v2.0" - case gnuGeneralPublicLicenseV30 = "GNU General Public License v3.0" - case gnuLesserGeneralPublicLicenseV21 = "GNU Lesser General Public License v2.1" - case gnuLesserGeneralPublicLicenseV30 = "GNU Lesser General Public License v3.0" - case gnuLibraryGeneralPublicLicenseV20 = "GNU Library General Public License v2.0" - case iscLicense = "ISC license" - case mozillaPublicLicense10 = "Mozilla Public License 1.0" - case mozillaPublicLicense11 = "Mozilla Public License 1.1" - case mozillaPublicLicense203 = "Mozilla Public License 2.03" - } - /** name of the repository */ - public var name: String - /** A short description of the repository */ - public var _description: String? - /** Either true to create a private repository, or false to create a public one. */ - public var _private: Bool? - /** Pass true to create an initial commit with README, .gitignore and LICENSE. */ - public var autoInit: Bool? - /** Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. */ - public var projectTemplate: ProjectTemplate? - /** Desired language .gitignore templates to apply. Use the name of the templates. */ - public var gitignores: String? - /** Desired LICENSE template to apply. Use the name of the template. */ - public var license: License? - /** Desired README template to apply. Use the name of the template. */ - public var readme: String? - - public init(name: String, _description: String? = nil, _private: Bool? = nil, autoInit: Bool? = nil, projectTemplate: ProjectTemplate? = nil, gitignores: String? = nil, license: License? = nil, readme: String? = nil) { - self.name = name - self._description = _description - self._private = _private - self.autoInit = autoInit - self.projectTemplate = projectTemplate - self.gitignores = gitignores - self.license = license - self.readme = readme - } - - public enum CodingKeys: String, CodingKey { - case name - case _description = "description" - case _private = "private" - case autoInit = "auto_init" - case projectTemplate = "project_template" - case gitignores - case license - case readme - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/EditExperimentPost.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/EditExperimentPost.swift deleted file mode 100644 index 9122cb7..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/EditExperimentPost.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// EditExperimentPost.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct EditExperimentPost: Codable { - - public var name: String - - public init(name: String) { - self.name = name - } - - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/ExperimentMetricsResponse.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/ExperimentMetricsResponse.swift new file mode 100644 index 0000000..a8ed38d --- /dev/null +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/ExperimentMetricsResponse.swift @@ -0,0 +1,50 @@ +// +// ExperimentMetricsResponse.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + +/** Map of experiment IDs to their metrics by path */ + +public struct ExperimentMetricsResponse: Codable { + + + public var additionalProperties: [String:Dictionary] = [:] + + public subscript(key: String) -> Dictionary? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Dictionary.self, excludedKeys: nonAdditionalPropertyKeys) + } + + +} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/ExperimentsResponse.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/ExperimentsResponse.swift new file mode 100644 index 0000000..7c14dc1 --- /dev/null +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/ExperimentsResponse.swift @@ -0,0 +1,28 @@ +// +// ExperimentsResponse.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + + +public struct ExperimentsResponse: Codable { + + /** Map of experiment ID to experiment details */ + public var experiments: [String:ComponentsschemasExperimentYaml]? + /** Whether the authenticated user can edit experiments in this repo */ + public var isEditor: Bool? + /** Pagination token for the next page of results (empty string when no more pages) */ + public var nextPageToken: String? + + public init(experiments: [String:ComponentsschemasExperimentYaml]? = nil, isEditor: Bool? = nil, nextPageToken: String? = nil) { + self.experiments = experiments + self.isEditor = isEditor + self.nextPageToken = nextPageToken + } + + +} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/File.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/File.swift deleted file mode 100644 index 5c654c4..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/File.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// File.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct File: Codable { - - public enum ModelType: String, Codable { - case file = "file" - case dir = "dir" - } - public enum Versioning: String, Codable { - case git = "git" - case dvc = "dvc" - case bucket = "bucket" - } - public var path: String? - public var type: ModelType? - public var size: Int64? - public var hash: String? - public var versioning: Versioning? - public var downloadUrl: String? - public var contentUrl: String? - - public init(path: String? = nil, type: ModelType? = nil, size: Int64? = nil, hash: String? = nil, versioning: Versioning? = nil, downloadUrl: String? = nil, contentUrl: String? = nil) { - self.path = path - self.type = type - self.size = size - self.hash = hash - self.versioning = versioning - self.downloadUrl = downloadUrl - self.contentUrl = contentUrl - } - - public enum CodingKeys: String, CodingKey { - case path - case type - case size - case hash - case versioning - case downloadUrl = "download_url" - case contentUrl = "content_url" - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Files.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Files.swift index 6458aa5..94fa46b 100644 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Files.swift +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/Files.swift @@ -8,4 +8,4 @@ import Foundation -public typealias Files = [File] \ No newline at end of file +public typealias Files = [ComponentsschemasFileYaml] \ No newline at end of file diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Files1.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Files1.swift index d452196..852d4b5 100644 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Files1.swift +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/Files1.swift @@ -11,19 +11,17 @@ import Foundation public struct Files1: Codable { - public var entries: [File]? - public var limit: Int? + public var entries: [ComponentsschemasFileYaml]? + /** Next token to continue pagination from */ public var nextToken: String? - public init(entries: [File]? = nil, limit: Int? = nil, nextToken: String? = nil) { + public init(entries: [ComponentsschemasFileYaml]? = nil, nextToken: String? = nil) { self.entries = entries - self.limit = limit self.nextToken = nextToken } public enum CodingKeys: String, CodingKey { case entries - case limit case nextToken = "next_token" } diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/HooksIdBody.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/HooksIdBody.swift deleted file mode 100644 index 039b11d..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/HooksIdBody.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// HooksIdBody.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct HooksIdBody: Codable { - - public var config: WebhookConfig? - public var events: WebhookEvents? - /** Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. */ - public var active: Bool? - - public init(config: WebhookConfig? = nil, events: WebhookEvents? = nil, active: Bool? = nil) { - self.config = config - self.events = events - self.active = active - } - - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Integration.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Integration.swift index fa6ae0f..e045ee2 100644 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Integration.swift +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/Integration.swift @@ -8,4 +8,4 @@ import Foundation -public typealias Integration = [IntegrationInner] \ No newline at end of file +public typealias Integration = [Any] \ No newline at end of file diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/IntegrationInner.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/IntegrationInner.swift deleted file mode 100644 index 0185998..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/IntegrationInner.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// IntegrationInner.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct IntegrationInner: Codable { - - public enum ModelProtocol: String, Codable { - case s3 = "s3" - case gs = "gs" - } - /** Name/path of the bucket */ - public var name: String? - /** Protocol used by the integration */ - public var _protocol: ModelProtocol? - /** URL to list the root of this bucket */ - public var listPath: String? - - public init(name: String? = nil, _protocol: ModelProtocol? = nil, listPath: String? = nil) { - self.name = name - self._protocol = _protocol - self.listPath = listPath - } - - public enum CodingKeys: String, CodingKey { - case name - case _protocol = "protocol" - case listPath = "list_path" - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Issue.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Issue.swift index ec6c773..225b1f6 100644 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Issue.swift +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/Issue.swift @@ -11,22 +11,27 @@ import Foundation public struct Issue: Codable { - public var _id: Int? - public var number: Int? - public var user: User? - public var title: Title - public var body: Body - public var labels: [IssueLabels] - public var milestone: IssueMilestone - public var assignee: IssueAssignee - public var state: String? + public enum State: String, Codable { + case _open = "open" + case closed = "closed" + } + public var _id: Int64? + /** Issue index within the repository */ + public var number: Int64? + public var user: ComponentsschemasUserYaml? + public var title: String? + public var body: String? + public var labels: [Any]? + public var milestone: Any? + public var assignee: ComponentsschemasUserYaml? + public var state: State? public var comments: Int? - public var createdAt: String? - public var updatedAt: String? + public var createdAt: Date? + public var updatedAt: Date? + /** Present when the issue is associated with a pull request */ public var pullRequest: Any? - public var closed: Bool - public init(_id: Int? = nil, number: Int? = nil, user: User? = nil, title: Title, body: Body, labels: [IssueLabels], milestone: IssueMilestone, assignee: IssueAssignee, state: String? = nil, comments: Int? = nil, createdAt: String? = nil, updatedAt: String? = nil, pullRequest: Any? = nil, closed: Bool) { + public init(_id: Int64? = nil, number: Int64? = nil, user: ComponentsschemasUserYaml? = nil, title: String? = nil, body: String? = nil, labels: [Any]? = nil, milestone: Any? = nil, assignee: ComponentsschemasUserYaml? = nil, state: State? = nil, comments: Int? = nil, createdAt: Date? = nil, updatedAt: Date? = nil, pullRequest: Any? = nil) { self._id = _id self.number = number self.user = user @@ -40,7 +45,6 @@ public struct Issue: Codable { self.createdAt = createdAt self.updatedAt = updatedAt self.pullRequest = pullRequest - self.closed = closed } public enum CodingKeys: String, CodingKey { @@ -57,7 +61,6 @@ public struct Issue: Codable { case createdAt = "created_at" case updatedAt = "updated_at" case pullRequest = "pull_request" - case closed } } diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/IssueAssignee.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/IssueAssignee.swift deleted file mode 100644 index 6d8284e..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/IssueAssignee.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// IssueAssignee.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct IssueAssignee: Codable { - - public var _id: Int? - public var login: String? - public var fullName: String? - public var avatarUrl: String? - public var username: String? - - public init(_id: Int? = nil, login: String? = nil, fullName: String? = nil, avatarUrl: String? = nil, username: String? = nil) { - self._id = _id - self.login = login - self.fullName = fullName - self.avatarUrl = avatarUrl - self.username = username - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case login - case fullName = "full_name" - case avatarUrl = "avatar_url" - case username - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/IssueLabels.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/IssueLabels.swift deleted file mode 100644 index a7cb75d..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/IssueLabels.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// IssueLabels.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct IssueLabels: Codable { - - public var _id: Int? - public var name: String? - public var color: String? - public var url: String? - - public init(_id: Int? = nil, name: String? = nil, color: String? = nil, url: String? = nil) { - self._id = _id - self.name = name - self.color = color - self.url = url - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case name - case color - case url - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/IssueMilestone.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/IssueMilestone.swift deleted file mode 100644 index a103075..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/IssueMilestone.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// IssueMilestone.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct IssueMilestone: Codable { - - public var _id: Int? - public var title: String? - public var _description: String? - public var state: String? - public var openIssues: Int? - public var closedIssues: Int? - public var closedAt: String? - public var dueOn: String? - - public init(_id: Int? = nil, title: String? = nil, _description: String? = nil, state: String? = nil, openIssues: Int? = nil, closedIssues: Int? = nil, closedAt: String? = nil, dueOn: String? = nil) { - self._id = _id - self.title = title - self._description = _description - self.state = state - self.openIssues = openIssues - self.closedIssues = closedIssues - self.closedAt = closedAt - self.dueOn = dueOn - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case title - case _description = "description" - case state - case openIssues = "open_issues" - case closedIssues = "closed_issues" - case closedAt = "closed_at" - case dueOn = "due_on" - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Issues.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Issues.swift index 16b627f..0f45bb5 100644 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Issues.swift +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/Issues.swift @@ -8,4 +8,4 @@ import Foundation -public typealias Issues = [Issue] \ No newline at end of file +public typealias Issues = [ComponentsschemasIssueYaml] \ No newline at end of file diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Labels.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Labels.swift deleted file mode 100644 index 1fda985..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Labels.swift +++ /dev/null @@ -1,12 +0,0 @@ -// -// Labels.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - -/** Labels **ID** to associate with this issue. **Note:** Only users with write access can set labels for new issues. Labels are silently dropped otherwise. */ -public typealias Labels = [Int] \ No newline at end of file diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/MigrateRepo.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/MigrateRepo.swift deleted file mode 100644 index 6adcef2..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/MigrateRepo.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// MigrateRepo.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct MigrateRepo: Codable { - - public enum Visibility: String, Codable { - case _private = "private" - case _public = "public" - } - /** Remote Git address (HTTP/HTTPS URL or local path) */ - public var cloneAddr: String - /** Authorization username */ - public var authUsername: String? - /** Authorization password */ - public var authPassword: String? - /** User ID who takes ownership of this repository */ - public var userId: Int - /** Name of the repository */ - public var repoName: String? - /** Repository will be a mirror (connected repository). */ - public var mirror: Bool? - /** Repository will be private or public. */ - public var visibility: Visibility? - /** Description of the repository */ - public var _description: String? - - public init(cloneAddr: String, authUsername: String? = nil, authPassword: String? = nil, userId: Int, repoName: String? = nil, mirror: Bool? = nil, visibility: Visibility? = nil, _description: String? = nil) { - self.cloneAddr = cloneAddr - self.authUsername = authUsername - self.authPassword = authPassword - self.userId = userId - self.repoName = repoName - self.mirror = mirror - self.visibility = visibility - self._description = _description - } - - public enum CodingKeys: String, CodingKey { - case cloneAddr = "clone_addr" - case authUsername = "auth_username" - case authPassword = "auth_password" - case userId = "user_id" - case repoName = "repo_name" - case mirror - case visibility - case _description = "description" - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Milestone.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Milestone.swift deleted file mode 100644 index 3e6c8a2..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Milestone.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Milestone.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - -/** The **ID** of the milestone to associate this issue with. **Note:** Only users with write access can set the milestone for new issues. The milestone is silently dropped otherwise. */ - -public struct Milestone: Codable { - - - - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/PatchIssue.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/PatchIssue.swift index 5adad61..44153c7 100644 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/PatchIssue.swift +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/PatchIssue.swift @@ -11,13 +11,13 @@ import Foundation public struct PatchIssue: Codable { - public var title: Title? - public var body: Body? - public var assignee: Assignee? - public var milestone: Milestone? - public var state: State? + public var title: ComponentsschemasTitleYaml? + public var body: ComponentsschemasBodyYaml? + public var assignee: ComponentsschemasAssigneeYaml? + public var milestone: ComponentsschemasMilestoneYaml? + public var state: ComponentsschemasStateYaml? - public init(title: Title? = nil, body: Body? = nil, assignee: Assignee? = nil, milestone: Milestone? = nil, state: State? = nil) { + public init(title: ComponentsschemasTitleYaml? = nil, body: ComponentsschemasBodyYaml? = nil, assignee: ComponentsschemasAssigneeYaml? = nil, milestone: ComponentsschemasMilestoneYaml? = nil, state: ComponentsschemasStateYaml? = nil) { self.title = title self.body = body self.assignee = assignee diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/PostIssue.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/PostIssue.swift index c23e371..1fdbbcf 100644 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/PostIssue.swift +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/PostIssue.swift @@ -11,14 +11,14 @@ import Foundation public struct PostIssue: Codable { - public var title: Title? - public var body: Body? - public var assignee: Assignee? - public var milestone: Milestone? - public var labels: Labels? - public var closed: Closed? - - public init(title: Title? = nil, body: Body? = nil, assignee: Assignee? = nil, milestone: Milestone? = nil, labels: Labels? = nil, closed: Closed? = nil) { + public var title: ComponentsschemasTitleYaml? + public var body: ComponentsschemasBodyYaml? + public var assignee: ComponentsschemasAssigneeYaml? + public var milestone: ComponentsschemasMilestoneYaml? + public var labels: ComponentsschemasLabelsYaml? + public var closed: ComponentsschemasClosedYaml? + + public init(title: ComponentsschemasTitleYaml? = nil, body: ComponentsschemasBodyYaml? = nil, assignee: ComponentsschemasAssigneeYaml? = nil, milestone: ComponentsschemasMilestoneYaml? = nil, labels: ComponentsschemasLabelsYaml? = nil, closed: ComponentsschemasClosedYaml? = nil) { self.title = title self.body = body self.assignee = assignee diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/RepoHooksBody.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/RepoHooksBody.swift deleted file mode 100644 index ace1eb7..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/RepoHooksBody.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// RepoHooksBody.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - - -public struct RepoHooksBody: Codable { - - public enum ModelType: String, Codable { - case dagshub = "dagshub" - case slack = "slack" - case discord = "discord" - case dingtalk = "dingtalk" - } - /** The type of webhook */ - public var type: ModelType - public var config: WebhookConfig - public var events: WebhookEvents? - - public init(type: ModelType, config: WebhookConfig, events: WebhookEvents? = nil) { - self.type = type - self.config = config - self.events = events - } - - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/State.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/State.swift deleted file mode 100644 index 576bf18..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/State.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// State.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - -public enum State: String, Codable { - case _open = "open" - case closed = "closed" -} \ No newline at end of file diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Title.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Title.swift deleted file mode 100644 index 46cc765..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Title.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Title.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - -/** The title of the issue */ - -public struct Title: Codable { - - - - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/User.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/User.swift index 4bec4f2..09b5fc6 100644 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/User.swift +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/User.swift @@ -11,26 +11,39 @@ import Foundation public struct User: Codable { - public var _id: Int? + public var _id: Int64? public var login: String? + /** Alias for login (legacy compatibility) */ + public var username: String? public var fullName: String? public var avatarUrl: String? - public var username: String? + public var publicEmail: String? + public var website: String? + public var company: String? + public var _description: String? - public init(_id: Int? = nil, login: String? = nil, fullName: String? = nil, avatarUrl: String? = nil, username: String? = nil) { + public init(_id: Int64? = nil, login: String? = nil, username: String? = nil, fullName: String? = nil, avatarUrl: String? = nil, publicEmail: String? = nil, website: String? = nil, company: String? = nil, _description: String? = nil) { self._id = _id self.login = login + self.username = username self.fullName = fullName self.avatarUrl = avatarUrl - self.username = username + self.publicEmail = publicEmail + self.website = website + self.company = company + self._description = _description } public enum CodingKeys: String, CodingKey { case _id = "id" case login + case username case fullName = "full_name" case avatarUrl = "avatar_url" - case username + case publicEmail = "public_email" + case website + case company + case _description = "description" } } diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/WebhookConfig.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/WebhookConfig.swift deleted file mode 100644 index 91f5c20..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/WebhookConfig.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// WebhookConfig.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - -/** Key/value pairs to provide settings for this hook */ - -public struct WebhookConfig: Codable { - - public enum ContentType: String, Codable { - case json = "json" - case form = "form" - } - /** A string defining the URL to which the payloads will be delivered. */ - public var url: String - /** A string defining the media type used to serialize the payloads. */ - public var contentType: ContentType - /** An optional string that's passed with the HTTP requests body. */ - public var secret: String? - - public init(url: String, contentType: ContentType, secret: String? = nil) { - self.url = url - self.contentType = contentType - self.secret = secret - } - - public enum CodingKeys: String, CodingKey { - case url - case contentType = "content_type" - case secret - } - -} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/WebhookEvents.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/WebhookEvents.swift deleted file mode 100644 index 43d7d21..0000000 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/WebhookEvents.swift +++ /dev/null @@ -1,12 +0,0 @@ -// -// WebhookEvents.swift -// -// Generated by swagger-codegen -// https://github.com/swagger-api/swagger-codegen -// - -import Foundation - - -/** Determines what events the hook is triggered format. */ -public typealias WebhookEvents = [String] \ No newline at end of file diff --git a/Swift/git_push.sh b/Swift/git_push.sh deleted file mode 100644 index 715c961..0000000 --- a/Swift/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="DagsHub" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="api-clients" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/TypeScript/.gitignore b/TypeScript/.gitignore deleted file mode 100644 index 205d801..0000000 --- a/TypeScript/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist \ No newline at end of file diff --git a/TypeScript/.npmignore b/TypeScript/.npmignore deleted file mode 100644 index 999d88d..0000000 --- a/TypeScript/.npmignore +++ /dev/null @@ -1 +0,0 @@ -# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/TypeScript/.swagger-codegen-ignore b/TypeScript/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/TypeScript/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/TypeScript/.swagger-codegen/VERSION b/TypeScript/.swagger-codegen/VERSION deleted file mode 100644 index 053a355..0000000 --- a/TypeScript/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.35 \ No newline at end of file diff --git a/TypeScript/README.md b/TypeScript/README.md deleted file mode 100644 index 974a69f..0000000 --- a/TypeScript/README.md +++ /dev/null @@ -1,45 +0,0 @@ -## @ - -This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments: - -Environment -* Node.js -* Webpack -* Browserify - -Language level -* ES5 - you must have a Promises/A+ library installed -* ES6 - -Module system -* CommonJS -* ES6 module system - -It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)) - -### Building - -To build and compile the typescript sources to javascript use: -``` -npm install -npm run build -``` - -### Publishing - -First build the package then run ```npm publish``` - -### Consuming - -navigate to the folder of your consuming project and run one of the following commands. - -_published:_ - -``` -npm install @ --save -``` - -_unPublished (not recommended):_ - -``` -npm install PATH_TO_GENERATED_PACKAGE --save diff --git a/TypeScript/api.ts b/TypeScript/api.ts deleted file mode 100644 index c379c91..0000000 --- a/TypeScript/api.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */export * from './apis/branches-api'; -export * from './apis/collaborators-api'; -export * from './apis/commits-api'; -export * from './apis/content-api'; -export * from './apis/experiments-api'; -export * from './apis/issues-api'; -export * from './apis/releases-api'; -export * from './apis/repository-api'; -export * from './apis/storage-integrations-api'; -export * from './apis/user-api'; -export * from './apis/webhooks-api'; - diff --git a/TypeScript/apis/branches-api.ts b/TypeScript/apis/branches-api.ts deleted file mode 100644 index c978c34..0000000 --- a/TypeScript/apis/branches-api.ts +++ /dev/null @@ -1,250 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -/** - * BranchesApi - axios parameter creator - * @export - */ -export const BranchesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Get Branch - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBranch: async (owner: string, repo: string, branch: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getBranch.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getBranch.'); - } - // verify required parameter 'branch' is not null or undefined - if (branch === null || branch === undefined) { - throw new RequiredError('branch','Required parameter branch was null or undefined when calling getBranch.'); - } - const localVarPath = `/repos/{owner}/{repo}/branches/{branch}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"branch"}}`, encodeURIComponent(String(branch))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary List Branches - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBranches: async (owner: string, repo: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling listBranches.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling listBranches.'); - } - const localVarPath = `/repos/{owner}/{repo}/branches` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * BranchesApi - functional programming interface - * @export - */ -export const BranchesApiFp = function(configuration?: Configuration) { - return { - /** - * - * @summary Get Branch - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBranch(owner: string, repo: string, branch: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await BranchesApiAxiosParamCreator(configuration).getBranch(owner, repo, branch, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary List Branches - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listBranches(owner: string, repo: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await BranchesApiAxiosParamCreator(configuration).listBranches(owner, repo, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * BranchesApi - factory interface - * @export - */ -export const BranchesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * - * @summary Get Branch - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBranch(owner: string, repo: string, branch: string, options?: AxiosRequestConfig): Promise> { - return BranchesApiFp(configuration).getBranch(owner, repo, branch, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary List Branches - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listBranches(owner: string, repo: string, options?: AxiosRequestConfig): Promise> { - return BranchesApiFp(configuration).listBranches(owner, repo, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * BranchesApi - object-oriented interface - * @export - * @class BranchesApi - * @extends {BaseAPI} - */ -export class BranchesApi extends BaseAPI { - /** - * - * @summary Get Branch - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BranchesApi - */ - public async getBranch(owner: string, repo: string, branch: string, options?: AxiosRequestConfig) : Promise> { - return BranchesApiFp(this.configuration).getBranch(owner, repo, branch, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary List Branches - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BranchesApi - */ - public async listBranches(owner: string, repo: string, options?: AxiosRequestConfig) : Promise> { - return BranchesApiFp(this.configuration).listBranches(owner, repo, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/apis/collaborators-api.ts b/TypeScript/apis/collaborators-api.ts deleted file mode 100644 index a98af08..0000000 --- a/TypeScript/apis/collaborators-api.ts +++ /dev/null @@ -1,362 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -import { CollaboratorsCollaboratorBody } from '../models'; -/** - * CollaboratorsApi - axios parameter creator - * @export - */ -export const CollaboratorsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Add user as a collaborator - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} collaborator collaborator username - * @param {CollaboratorsCollaboratorBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addCollaborator: async (owner: string, repo: string, collaborator: string, body?: CollaboratorsCollaboratorBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling addCollaborator.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling addCollaborator.'); - } - // verify required parameter 'collaborator' is not null or undefined - if (collaborator === null || collaborator === undefined) { - throw new RequiredError('collaborator','Required parameter collaborator was null or undefined when calling addCollaborator.'); - } - const localVarPath = `/repos/{owner}/{repo}/collaborators/{collaborator}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"collaborator"}}`, encodeURIComponent(String(collaborator))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get collaborators - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCollaborators: async (owner: string, repo: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getCollaborators.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getCollaborators.'); - } - const localVarPath = `/repos/{owner}/{repo}/collaborators` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Delete collaborator - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} collaborator collaborator username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - removeCollaborator: async (owner: string, repo: string, collaborator: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling removeCollaborator.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling removeCollaborator.'); - } - // verify required parameter 'collaborator' is not null or undefined - if (collaborator === null || collaborator === undefined) { - throw new RequiredError('collaborator','Required parameter collaborator was null or undefined when calling removeCollaborator.'); - } - const localVarPath = `/repos/{owner}/{repo}/collaborators/{collaborator}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"collaborator"}}`, encodeURIComponent(String(collaborator))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * CollaboratorsApi - functional programming interface - * @export - */ -export const CollaboratorsApiFp = function(configuration?: Configuration) { - return { - /** - * - * @summary Add user as a collaborator - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} collaborator collaborator username - * @param {CollaboratorsCollaboratorBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async addCollaborator(owner: string, repo: string, collaborator: string, body?: CollaboratorsCollaboratorBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await CollaboratorsApiAxiosParamCreator(configuration).addCollaborator(owner, repo, collaborator, body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Get collaborators - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCollaborators(owner: string, repo: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await CollaboratorsApiAxiosParamCreator(configuration).getCollaborators(owner, repo, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Delete collaborator - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} collaborator collaborator username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async removeCollaborator(owner: string, repo: string, collaborator: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await CollaboratorsApiAxiosParamCreator(configuration).removeCollaborator(owner, repo, collaborator, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * CollaboratorsApi - factory interface - * @export - */ -export const CollaboratorsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * - * @summary Add user as a collaborator - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} collaborator collaborator username - * @param {CollaboratorsCollaboratorBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async addCollaborator(owner: string, repo: string, collaborator: string, body?: CollaboratorsCollaboratorBody, options?: AxiosRequestConfig): Promise> { - return CollaboratorsApiFp(configuration).addCollaborator(owner, repo, collaborator, body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get collaborators - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCollaborators(owner: string, repo: string, options?: AxiosRequestConfig): Promise> { - return CollaboratorsApiFp(configuration).getCollaborators(owner, repo, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Delete collaborator - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} collaborator collaborator username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async removeCollaborator(owner: string, repo: string, collaborator: string, options?: AxiosRequestConfig): Promise> { - return CollaboratorsApiFp(configuration).removeCollaborator(owner, repo, collaborator, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * CollaboratorsApi - object-oriented interface - * @export - * @class CollaboratorsApi - * @extends {BaseAPI} - */ -export class CollaboratorsApi extends BaseAPI { - /** - * - * @summary Add user as a collaborator - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} collaborator collaborator username - * @param {CollaboratorsCollaboratorBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CollaboratorsApi - */ - public async addCollaborator(owner: string, repo: string, collaborator: string, body?: CollaboratorsCollaboratorBody, options?: AxiosRequestConfig) : Promise> { - return CollaboratorsApiFp(this.configuration).addCollaborator(owner, repo, collaborator, body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Get collaborators - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CollaboratorsApi - */ - public async getCollaborators(owner: string, repo: string, options?: AxiosRequestConfig) : Promise> { - return CollaboratorsApiFp(this.configuration).getCollaborators(owner, repo, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Delete collaborator - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} collaborator collaborator username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CollaboratorsApi - */ - public async removeCollaborator(owner: string, repo: string, collaborator: string, options?: AxiosRequestConfig) : Promise> { - return CollaboratorsApiFp(this.configuration).removeCollaborator(owner, repo, collaborator, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/apis/commits-api.ts b/TypeScript/apis/commits-api.ts deleted file mode 100644 index fc1fb4f..0000000 --- a/TypeScript/apis/commits-api.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -/** - * CommitsApi - axios parameter creator - * @export - */ -export const CommitsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Get a single commit - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} sha a SHA1 of a commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCommit: async (owner: string, repo: string, sha: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getCommit.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getCommit.'); - } - // verify required parameter 'sha' is not null or undefined - if (sha === null || sha === undefined) { - throw new RequiredError('sha','Required parameter sha was null or undefined when calling getCommit.'); - } - const localVarPath = `/repos/{owner}/{repo}/commits/{sha}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"sha"}}`, encodeURIComponent(String(sha))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * CommitsApi - functional programming interface - * @export - */ -export const CommitsApiFp = function(configuration?: Configuration) { - return { - /** - * - * @summary Get a single commit - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} sha a SHA1 of a commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCommit(owner: string, repo: string, sha: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await CommitsApiAxiosParamCreator(configuration).getCommit(owner, repo, sha, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * CommitsApi - factory interface - * @export - */ -export const CommitsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * - * @summary Get a single commit - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} sha a SHA1 of a commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCommit(owner: string, repo: string, sha: string, options?: AxiosRequestConfig): Promise> { - return CommitsApiFp(configuration).getCommit(owner, repo, sha, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * CommitsApi - object-oriented interface - * @export - * @class CommitsApi - * @extends {BaseAPI} - */ -export class CommitsApi extends BaseAPI { - /** - * - * @summary Get a single commit - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} sha a SHA1 of a commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CommitsApi - */ - public async getCommit(owner: string, repo: string, sha: string, options?: AxiosRequestConfig) : Promise> { - return CommitsApiFp(this.configuration).getCommit(owner, repo, sha, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/apis/content-api.ts b/TypeScript/apis/content-api.ts deleted file mode 100644 index 8b6e61c..0000000 --- a/TypeScript/apis/content-api.ts +++ /dev/null @@ -1,570 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -import { Files } from '../models'; -/** - * ContentApi - axios parameter creator - * @export - */ -export const ContentApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * This method returns archive by given format. - * @summary Download archive - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} ref The name of the commit/branch/tag - * @param {string} format The format of archive, either .zip or .tar.gz - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getArchive: async (owner: string, repo: string, ref: string, format: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getArchive.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getArchive.'); - } - // verify required parameter 'ref' is not null or undefined - if (ref === null || ref === undefined) { - throw new RequiredError('ref','Required parameter ref was null or undefined when calling getArchive.'); - } - // verify required parameter 'format' is not null or undefined - if (format === null || format === undefined) { - throw new RequiredError('format','Required parameter format was null or undefined when calling getArchive.'); - } - const localVarPath = `/repos/{owner}/{repo}/archive/{ref}{format}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"ref"}}`, encodeURIComponent(String(ref))) - .replace(`{${"format"}}`, encodeURIComponent(String(format))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * @summary List data in a repository folder - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {string} path path of a folder in the repository - * @param {boolean} [includeSize] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getContent: async (owner: string, repo: string, branch: string, path: string, includeSize?: boolean, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getContent.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getContent.'); - } - // verify required parameter 'branch' is not null or undefined - if (branch === null || branch === undefined) { - throw new RequiredError('branch','Required parameter branch was null or undefined when calling getContent.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new RequiredError('path','Required parameter path was null or undefined when calling getContent.'); - } - const localVarPath = `/repos/{owner}/{repo}/content/{branch}/{path}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"branch"}}`, encodeURIComponent(String(branch))) - .replace(`{${"path"}}`, encodeURIComponent(String(path))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - if (includeSize !== undefined) { - localVarQueryParameter['include_size'] = includeSize; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * This method returns the raw content of a file. - * @summary Download raw content - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} ref The name of the commit/branch/tag - * @param {string} path The content path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRaw: async (owner: string, repo: string, ref: string, path: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getRaw.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getRaw.'); - } - // verify required parameter 'ref' is not null or undefined - if (ref === null || ref === undefined) { - throw new RequiredError('ref','Required parameter ref was null or undefined when calling getRaw.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new RequiredError('path','Required parameter path was null or undefined when calling getRaw.'); - } - const localVarPath = `/repos/{owner}/{repo}/raw/{ref}/{path}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"ref"}}`, encodeURIComponent(String(ref))) - .replace(`{${"path"}}`, encodeURIComponent(String(path))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Upload data to a repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {string} path path of a folder in the repository - * @param {string} [commitSummary] - * @param {string} [commitMessage] - * @param {string} [commitChoice] - * @param {string} [lastCommit] - * @param {string} [newBranchName] - * @param {string} [versioning] - * @param {string} [files] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - uploadContentForm: async (owner: string, repo: string, branch: string, path: string, commitSummary?: string, commitMessage?: string, commitChoice?: string, lastCommit?: string, newBranchName?: string, versioning?: string, files?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling uploadContentForm.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling uploadContentForm.'); - } - // verify required parameter 'branch' is not null or undefined - if (branch === null || branch === undefined) { - throw new RequiredError('branch','Required parameter branch was null or undefined when calling uploadContentForm.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new RequiredError('path','Required parameter path was null or undefined when calling uploadContentForm.'); - } - const localVarPath = `/repos/{owner}/{repo}/content/{branch}/{path}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"branch"}}`, encodeURIComponent(String(branch))) - .replace(`{${"path"}}`, encodeURIComponent(String(path))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - const localVarFormParams = new FormData(); - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - - if (commitSummary !== undefined) { - localVarFormParams.append('commit_summary', commitSummary as any); - } - - if (commitMessage !== undefined) { - localVarFormParams.append('commit_message', commitMessage as any); - } - - if (commitChoice !== undefined) { - localVarFormParams.append('commit_choice', commitChoice as any); - } - - if (lastCommit !== undefined) { - localVarFormParams.append('last_commit', lastCommit as any); - } - - if (newBranchName !== undefined) { - localVarFormParams.append('new_branch_name', newBranchName as any); - } - - if (versioning !== undefined) { - localVarFormParams.append('versioning', versioning as any); - } - - if (files !== undefined) { - localVarFormParams.append('files', files as any); - } - - localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = localVarFormParams; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * ContentApi - functional programming interface - * @export - */ -export const ContentApiFp = function(configuration?: Configuration) { - return { - /** - * This method returns archive by given format. - * @summary Download archive - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} ref The name of the commit/branch/tag - * @param {string} format The format of archive, either .zip or .tar.gz - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getArchive(owner: string, repo: string, ref: string, format: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ContentApiAxiosParamCreator(configuration).getArchive(owner, repo, ref, format, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * @summary List data in a repository folder - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {string} path path of a folder in the repository - * @param {boolean} [includeSize] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getContent(owner: string, repo: string, branch: string, path: string, includeSize?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ContentApiAxiosParamCreator(configuration).getContent(owner, repo, branch, path, includeSize, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * This method returns the raw content of a file. - * @summary Download raw content - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} ref The name of the commit/branch/tag - * @param {string} path The content path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRaw(owner: string, repo: string, ref: string, path: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ContentApiAxiosParamCreator(configuration).getRaw(owner, repo, ref, path, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Upload data to a repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {string} path path of a folder in the repository - * @param {string} [commitSummary] - * @param {string} [commitMessage] - * @param {string} [commitChoice] - * @param {string} [lastCommit] - * @param {string} [newBranchName] - * @param {string} [versioning] - * @param {string} [files] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async uploadContentForm(owner: string, repo: string, branch: string, path: string, commitSummary?: string, commitMessage?: string, commitChoice?: string, lastCommit?: string, newBranchName?: string, versioning?: string, files?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ContentApiAxiosParamCreator(configuration).uploadContentForm(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * ContentApi - factory interface - * @export - */ -export const ContentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * This method returns archive by given format. - * @summary Download archive - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} ref The name of the commit/branch/tag - * @param {string} format The format of archive, either .zip or .tar.gz - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getArchive(owner: string, repo: string, ref: string, format: string, options?: AxiosRequestConfig): Promise> { - return ContentApiFp(configuration).getArchive(owner, repo, ref, format, options).then((request) => request(axios, basePath)); - }, - /** - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * @summary List data in a repository folder - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {string} path path of a folder in the repository - * @param {boolean} [includeSize] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getContent(owner: string, repo: string, branch: string, path: string, includeSize?: boolean, options?: AxiosRequestConfig): Promise> { - return ContentApiFp(configuration).getContent(owner, repo, branch, path, includeSize, options).then((request) => request(axios, basePath)); - }, - /** - * This method returns the raw content of a file. - * @summary Download raw content - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} ref The name of the commit/branch/tag - * @param {string} path The content path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRaw(owner: string, repo: string, ref: string, path: string, options?: AxiosRequestConfig): Promise> { - return ContentApiFp(configuration).getRaw(owner, repo, ref, path, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Upload data to a repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {string} path path of a folder in the repository - * @param {string} [commitSummary] - * @param {string} [commitMessage] - * @param {string} [commitChoice] - * @param {string} [lastCommit] - * @param {string} [newBranchName] - * @param {string} [versioning] - * @param {string} [files] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async uploadContentForm(owner: string, repo: string, branch: string, path: string, commitSummary?: string, commitMessage?: string, commitChoice?: string, lastCommit?: string, newBranchName?: string, versioning?: string, files?: string, options?: AxiosRequestConfig): Promise> { - return ContentApiFp(configuration).uploadContentForm(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * ContentApi - object-oriented interface - * @export - * @class ContentApi - * @extends {BaseAPI} - */ -export class ContentApi extends BaseAPI { - /** - * This method returns archive by given format. - * @summary Download archive - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} ref The name of the commit/branch/tag - * @param {string} format The format of archive, either .zip or .tar.gz - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ContentApi - */ - public async getArchive(owner: string, repo: string, ref: string, format: string, options?: AxiosRequestConfig) : Promise> { - return ContentApiFp(this.configuration).getArchive(owner, repo, ref, format, options).then((request) => request(this.axios, this.basePath)); - } - /** - * List files, commit sha1, and versioning type for a folder in repository. To get sizes add to the query param `include_size=true`. May result in a slower response. - * @summary List data in a repository folder - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {string} path path of a folder in the repository - * @param {boolean} [includeSize] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ContentApi - */ - public async getContent(owner: string, repo: string, branch: string, path: string, includeSize?: boolean, options?: AxiosRequestConfig) : Promise> { - return ContentApiFp(this.configuration).getContent(owner, repo, branch, path, includeSize, options).then((request) => request(this.axios, this.basePath)); - } - /** - * This method returns the raw content of a file. - * @summary Download raw content - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} ref The name of the commit/branch/tag - * @param {string} path The content path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ContentApi - */ - public async getRaw(owner: string, repo: string, ref: string, path: string, options?: AxiosRequestConfig) : Promise> { - return ContentApiFp(this.configuration).getRaw(owner, repo, ref, path, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Upload data to a repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} branch branch of the repository - * @param {string} path path of a folder in the repository - * @param {string} [commitSummary] - * @param {string} [commitMessage] - * @param {string} [commitChoice] - * @param {string} [lastCommit] - * @param {string} [newBranchName] - * @param {string} [versioning] - * @param {string} [files] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ContentApi - */ - public async uploadContentForm(owner: string, repo: string, branch: string, path: string, commitSummary?: string, commitMessage?: string, commitChoice?: string, lastCommit?: string, newBranchName?: string, versioning?: string, files?: string, options?: AxiosRequestConfig) : Promise> { - return ContentApiFp(this.configuration).uploadContentForm(owner, repo, branch, path, commitSummary, commitMessage, commitChoice, lastCommit, newBranchName, versioning, files, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/apis/experiments-api.ts b/TypeScript/apis/experiments-api.ts deleted file mode 100644 index 491cf4b..0000000 --- a/TypeScript/apis/experiments-api.ts +++ /dev/null @@ -1,689 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -import { EditExperimentPost } from '../models'; -import { ExperimentKeys } from '../models'; -/** - * ExperimentsApi - axios parameter creator - * @export - */ -export const ExperimentsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Add label to experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {string} experimentLabel A label for the experiment, max 128 characters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addExperimentLabel: async (owner: string, repo: string, experimentKey: string, experimentLabel: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling addExperimentLabel.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling addExperimentLabel.'); - } - // verify required parameter 'experimentKey' is not null or undefined - if (experimentKey === null || experimentKey === undefined) { - throw new RequiredError('experimentKey','Required parameter experimentKey was null or undefined when calling addExperimentLabel.'); - } - // verify required parameter 'experimentLabel' is not null or undefined - if (experimentLabel === null || experimentLabel === undefined) { - throw new RequiredError('experimentLabel','Required parameter experimentLabel was null or undefined when calling addExperimentLabel.'); - } - const localVarPath = `/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"experimentKey"}}`, encodeURIComponent(String(experimentKey))) - .replace(`{${"experimentLabel"}}`, encodeURIComponent(String(experimentLabel))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * Support both git and MLflow experiments - * @summary Delete experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteExperiment: async (owner: string, repo: string, experimentKey: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling deleteExperiment.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling deleteExperiment.'); - } - // verify required parameter 'experimentKey' is not null or undefined - if (experimentKey === null || experimentKey === undefined) { - throw new RequiredError('experimentKey','Required parameter experimentKey was null or undefined when calling deleteExperiment.'); - } - const localVarPath = `/repos/{owner}/{repo}/experiments/experiment/{experimentKey}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"experimentKey"}}`, encodeURIComponent(String(experimentKey))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Delete experiment label - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {string} experimentLabel A label for the experiment, max 128 characters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteExperimentLabel: async (owner: string, repo: string, experimentKey: string, experimentLabel: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling deleteExperimentLabel.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling deleteExperimentLabel.'); - } - // verify required parameter 'experimentKey' is not null or undefined - if (experimentKey === null || experimentKey === undefined) { - throw new RequiredError('experimentKey','Required parameter experimentKey was null or undefined when calling deleteExperimentLabel.'); - } - // verify required parameter 'experimentLabel' is not null or undefined - if (experimentLabel === null || experimentLabel === undefined) { - throw new RequiredError('experimentLabel','Required parameter experimentLabel was null or undefined when calling deleteExperimentLabel.'); - } - const localVarPath = `/repos/{owner}/{repo}/experiments/experiment/{experimentKey}/labels/{experimentLabel}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"experimentKey"}}`, encodeURIComponent(String(experimentKey))) - .replace(`{${"experimentLabel"}}`, encodeURIComponent(String(experimentLabel))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * Edit experiment info, currently supports just changing experiment name. - * @summary Edit experiment info - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {EditExperimentPost} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - editExperiment: async (owner: string, repo: string, experimentKey: string, body?: EditExperimentPost, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling editExperiment.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling editExperiment.'); - } - // verify required parameter 'experimentKey' is not null or undefined - if (experimentKey === null || experimentKey === undefined) { - throw new RequiredError('experimentKey','Required parameter experimentKey was null or undefined when calling editExperiment.'); - } - const localVarPath = `/repos/{owner}/{repo}/experiments/experiment/{experimentKey}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"experimentKey"}}`, encodeURIComponent(String(experimentKey))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get experiment metrics for experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {ExperimentKeys} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getExperimentMetrics: async (owner: string, repo: string, body?: ExperimentKeys, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getExperimentMetrics.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getExperimentMetrics.'); - } - const localVarPath = `/repos/{owner}/{repo}/experiments/metricsForExperiments` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * Get a list of experiments in the given repository - * @summary List Experiments - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getExperiments: async (owner: string, repo: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getExperiments.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getExperiments.'); - } - const localVarPath = `/repos/{owner}/{repo}/experiments` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * ExperimentsApi - functional programming interface - * @export - */ -export const ExperimentsApiFp = function(configuration?: Configuration) { - return { - /** - * - * @summary Add label to experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {string} experimentLabel A label for the experiment, max 128 characters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async addExperimentLabel(owner: string, repo: string, experimentKey: string, experimentLabel: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ExperimentsApiAxiosParamCreator(configuration).addExperimentLabel(owner, repo, experimentKey, experimentLabel, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * Support both git and MLflow experiments - * @summary Delete experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteExperiment(owner: string, repo: string, experimentKey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ExperimentsApiAxiosParamCreator(configuration).deleteExperiment(owner, repo, experimentKey, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Delete experiment label - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {string} experimentLabel A label for the experiment, max 128 characters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteExperimentLabel(owner: string, repo: string, experimentKey: string, experimentLabel: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ExperimentsApiAxiosParamCreator(configuration).deleteExperimentLabel(owner, repo, experimentKey, experimentLabel, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * Edit experiment info, currently supports just changing experiment name. - * @summary Edit experiment info - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {EditExperimentPost} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async editExperiment(owner: string, repo: string, experimentKey: string, body?: EditExperimentPost, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ExperimentsApiAxiosParamCreator(configuration).editExperiment(owner, repo, experimentKey, body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Get experiment metrics for experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {ExperimentKeys} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getExperimentMetrics(owner: string, repo: string, body?: ExperimentKeys, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ExperimentsApiAxiosParamCreator(configuration).getExperimentMetrics(owner, repo, body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * Get a list of experiments in the given repository - * @summary List Experiments - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getExperiments(owner: string, repo: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ExperimentsApiAxiosParamCreator(configuration).getExperiments(owner, repo, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * ExperimentsApi - factory interface - * @export - */ -export const ExperimentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * - * @summary Add label to experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {string} experimentLabel A label for the experiment, max 128 characters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async addExperimentLabel(owner: string, repo: string, experimentKey: string, experimentLabel: string, options?: AxiosRequestConfig): Promise> { - return ExperimentsApiFp(configuration).addExperimentLabel(owner, repo, experimentKey, experimentLabel, options).then((request) => request(axios, basePath)); - }, - /** - * Support both git and MLflow experiments - * @summary Delete experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteExperiment(owner: string, repo: string, experimentKey: string, options?: AxiosRequestConfig): Promise> { - return ExperimentsApiFp(configuration).deleteExperiment(owner, repo, experimentKey, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Delete experiment label - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {string} experimentLabel A label for the experiment, max 128 characters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteExperimentLabel(owner: string, repo: string, experimentKey: string, experimentLabel: string, options?: AxiosRequestConfig): Promise> { - return ExperimentsApiFp(configuration).deleteExperimentLabel(owner, repo, experimentKey, experimentLabel, options).then((request) => request(axios, basePath)); - }, - /** - * Edit experiment info, currently supports just changing experiment name. - * @summary Edit experiment info - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {EditExperimentPost} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async editExperiment(owner: string, repo: string, experimentKey: string, body?: EditExperimentPost, options?: AxiosRequestConfig): Promise> { - return ExperimentsApiFp(configuration).editExperiment(owner, repo, experimentKey, body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get experiment metrics for experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {ExperimentKeys} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getExperimentMetrics(owner: string, repo: string, body?: ExperimentKeys, options?: AxiosRequestConfig): Promise> { - return ExperimentsApiFp(configuration).getExperimentMetrics(owner, repo, body, options).then((request) => request(axios, basePath)); - }, - /** - * Get a list of experiments in the given repository - * @summary List Experiments - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getExperiments(owner: string, repo: string, options?: AxiosRequestConfig): Promise> { - return ExperimentsApiFp(configuration).getExperiments(owner, repo, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * ExperimentsApi - object-oriented interface - * @export - * @class ExperimentsApi - * @extends {BaseAPI} - */ -export class ExperimentsApi extends BaseAPI { - /** - * - * @summary Add label to experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {string} experimentLabel A label for the experiment, max 128 characters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ExperimentsApi - */ - public async addExperimentLabel(owner: string, repo: string, experimentKey: string, experimentLabel: string, options?: AxiosRequestConfig) : Promise> { - return ExperimentsApiFp(this.configuration).addExperimentLabel(owner, repo, experimentKey, experimentLabel, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Support both git and MLflow experiments - * @summary Delete experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ExperimentsApi - */ - public async deleteExperiment(owner: string, repo: string, experimentKey: string, options?: AxiosRequestConfig) : Promise> { - return ExperimentsApiFp(this.configuration).deleteExperiment(owner, repo, experimentKey, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Delete experiment label - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {string} experimentLabel A label for the experiment, max 128 characters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ExperimentsApi - */ - public async deleteExperimentLabel(owner: string, repo: string, experimentKey: string, experimentLabel: string, options?: AxiosRequestConfig) : Promise> { - return ExperimentsApiFp(this.configuration).deleteExperimentLabel(owner, repo, experimentKey, experimentLabel, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Edit experiment info, currently supports just changing experiment name. - * @summary Edit experiment info - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} experimentKey a valid experiment key - * @param {EditExperimentPost} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ExperimentsApi - */ - public async editExperiment(owner: string, repo: string, experimentKey: string, body?: EditExperimentPost, options?: AxiosRequestConfig) : Promise> { - return ExperimentsApiFp(this.configuration).editExperiment(owner, repo, experimentKey, body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Get experiment metrics for experiment - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {ExperimentKeys} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ExperimentsApi - */ - public async getExperimentMetrics(owner: string, repo: string, body?: ExperimentKeys, options?: AxiosRequestConfig) : Promise> { - return ExperimentsApiFp(this.configuration).getExperimentMetrics(owner, repo, body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Get a list of experiments in the given repository - * @summary List Experiments - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ExperimentsApi - */ - public async getExperiments(owner: string, repo: string, options?: AxiosRequestConfig) : Promise> { - return ExperimentsApiFp(this.configuration).getExperiments(owner, repo, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/apis/issues-api.ts b/TypeScript/apis/issues-api.ts deleted file mode 100644 index 0d3d56f..0000000 --- a/TypeScript/apis/issues-api.ts +++ /dev/null @@ -1,458 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -import { Issue } from '../models'; -import { Issues } from '../models'; -import { PatchIssue } from '../models'; -import { PostIssue } from '../models'; -/** - * IssuesApi - axios parameter creator - * @export - */ -export const IssuesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Any user with read access to a repository can create an issue. - * @summary Create an issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {PostIssue} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createIssue: async (owner: string, repo: string, body?: PostIssue, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling createIssue.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling createIssue.'); - } - const localVarPath = `/repos/{owner}/{repo}/issues` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Edit an issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {PatchIssue} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - editIssue: async (owner: string, repo: string, body?: PatchIssue, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling editIssue.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling editIssue.'); - } - const localVarPath = `/repos/{owner}/{repo}/issues` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @summary Get a single issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} index the index of an issue or a pull request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getIssue: async (owner: string, repo: string, index: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getIssue.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getIssue.'); - } - // verify required parameter 'index' is not null or undefined - if (index === null || index === undefined) { - throw new RequiredError('index','Required parameter index was null or undefined when calling getIssue.'); - } - const localVarPath = `/repos/{owner}/{repo}/issues/{index}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"index"}}`, encodeURIComponent(String(index))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @summary List issues for a repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRepoIssues: async (owner: string, repo: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling listRepoIssues.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling listRepoIssues.'); - } - const localVarPath = `/repos/{owner}/{repo}/issues` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * IssuesApi - functional programming interface - * @export - */ -export const IssuesApiFp = function(configuration?: Configuration) { - return { - /** - * Any user with read access to a repository can create an issue. - * @summary Create an issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {PostIssue} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createIssue(owner: string, repo: string, body?: PostIssue, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await IssuesApiAxiosParamCreator(configuration).createIssue(owner, repo, body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Edit an issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {PatchIssue} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async editIssue(owner: string, repo: string, body?: PatchIssue, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await IssuesApiAxiosParamCreator(configuration).editIssue(owner, repo, body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @summary Get a single issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} index the index of an issue or a pull request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getIssue(owner: string, repo: string, index: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await IssuesApiAxiosParamCreator(configuration).getIssue(owner, repo, index, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @summary List issues for a repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listRepoIssues(owner: string, repo: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await IssuesApiAxiosParamCreator(configuration).listRepoIssues(owner, repo, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * IssuesApi - factory interface - * @export - */ -export const IssuesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * Any user with read access to a repository can create an issue. - * @summary Create an issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {PostIssue} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createIssue(owner: string, repo: string, body?: PostIssue, options?: AxiosRequestConfig): Promise> { - return IssuesApiFp(configuration).createIssue(owner, repo, body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Edit an issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {PatchIssue} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async editIssue(owner: string, repo: string, body?: PatchIssue, options?: AxiosRequestConfig): Promise> { - return IssuesApiFp(configuration).editIssue(owner, repo, body, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @summary Get a single issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} index the index of an issue or a pull request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getIssue(owner: string, repo: string, index: number, options?: AxiosRequestConfig): Promise> { - return IssuesApiFp(configuration).getIssue(owner, repo, index, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @summary List issues for a repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listRepoIssues(owner: string, repo: string, options?: AxiosRequestConfig): Promise> { - return IssuesApiFp(configuration).listRepoIssues(owner, repo, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * IssuesApi - object-oriented interface - * @export - * @class IssuesApi - * @extends {BaseAPI} - */ -export class IssuesApi extends BaseAPI { - /** - * Any user with read access to a repository can create an issue. - * @summary Create an issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {PostIssue} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof IssuesApi - */ - public async createIssue(owner: string, repo: string, body?: PostIssue, options?: AxiosRequestConfig) : Promise> { - return IssuesApiFp(this.configuration).createIssue(owner, repo, body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Edit an issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {PatchIssue} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof IssuesApi - */ - public async editIssue(owner: string, repo: string, body?: PatchIssue, options?: AxiosRequestConfig) : Promise> { - return IssuesApiFp(this.configuration).editIssue(owner, repo, body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @summary Get a single issue - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} index the index of an issue or a pull request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof IssuesApi - */ - public async getIssue(owner: string, repo: string, index: number, options?: AxiosRequestConfig) : Promise> { - return IssuesApiFp(this.configuration).getIssue(owner, repo, index, options).then((request) => request(this.axios, this.basePath)); - } - /** - * This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. - * @summary List issues for a repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof IssuesApi - */ - public async listRepoIssues(owner: string, repo: string, options?: AxiosRequestConfig) : Promise> { - return IssuesApiFp(this.configuration).listRepoIssues(owner, repo, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/apis/releases-api.ts b/TypeScript/apis/releases-api.ts deleted file mode 100644 index aa43b28..0000000 --- a/TypeScript/apis/releases-api.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -/** - * ReleasesApi - axios parameter creator - * @export - */ -export const ReleasesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary List Releases - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listReleases: async (owner: string, repo: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling listReleases.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling listReleases.'); - } - const localVarPath = `/repos/{owner}/{repo}/releases` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * ReleasesApi - functional programming interface - * @export - */ -export const ReleasesApiFp = function(configuration?: Configuration) { - return { - /** - * - * @summary List Releases - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listReleases(owner: string, repo: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await ReleasesApiAxiosParamCreator(configuration).listReleases(owner, repo, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * ReleasesApi - factory interface - * @export - */ -export const ReleasesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * - * @summary List Releases - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listReleases(owner: string, repo: string, options?: AxiosRequestConfig): Promise> { - return ReleasesApiFp(configuration).listReleases(owner, repo, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * ReleasesApi - object-oriented interface - * @export - * @class ReleasesApi - * @extends {BaseAPI} - */ -export class ReleasesApi extends BaseAPI { - /** - * - * @summary List Releases - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ReleasesApi - */ - public async listReleases(owner: string, repo: string, options?: AxiosRequestConfig) : Promise> { - return ReleasesApiFp(this.configuration).listReleases(owner, repo, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/apis/repository-api.ts b/TypeScript/apis/repository-api.ts deleted file mode 100644 index 04f22d2..0000000 --- a/TypeScript/apis/repository-api.ts +++ /dev/null @@ -1,768 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -import { CreateRepo } from '../models'; -import { MigrateRepo } from '../models'; -/** - * RepositoryApi - axios parameter creator - * @export - */ -export const RepositoryApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * @summary Create in organization - * @param {string} orgname A DagsHub organization name - * @param {CreateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrgRepo: async (orgname: string, body?: CreateRepo, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'orgname' is not null or undefined - if (orgname === null || orgname === undefined) { - throw new RequiredError('orgname','Required parameter orgname was null or undefined when calling createOrgRepo.'); - } - const localVarPath = `/org/{orgname}/repos` - .replace(`{${"orgname"}}`, encodeURIComponent(String(orgname))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * Create a new repository for the authenticated user. - * @summary Create - * @param {CreateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createRepo: async (body?: CreateRepo, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/user/repos`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get repository information - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRepo: async (owner: string, repo: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getRepo.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getRepo.'); - } - const localVarPath = `/repos/{owner}/{repo}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * @summary List your repositories - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listMyRepos: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/user/repos`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * List repositories that are accessible to the authenticated user. - * @summary List organization repositories - * @param {string} orgname A DagsHub organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrgRepos: async (orgname: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'orgname' is not null or undefined - if (orgname === null || orgname === undefined) { - throw new RequiredError('orgname','Required parameter orgname was null or undefined when calling listOrgRepos.'); - } - const localVarPath = `/orgs/{orgname}/repos` - .replace(`{${"orgname"}}`, encodeURIComponent(String(orgname))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * List public repositories for the specified user. - * @summary List user repositories - * @param {string} username A DagsHub username or organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listUserRepos: async (username: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - if (username === null || username === undefined) { - throw new RequiredError('username','Required parameter username was null or undefined when calling listUserRepos.'); - } - const localVarPath = `/users/{username}/repos` - .replace(`{${"username"}}`, encodeURIComponent(String(username))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * @summary Migrate repository - * @param {MigrateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - migrateRepo: async (body?: MigrateRepo, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/repos/migrate`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Search repositories - * @param {string} q - * @param {number} [uid] User ID to specify search whose repositories. Default is 0 and search all repositories - * @param {number} [limit] Maximum number of repositories in search results. - * @param {number} [page] Page number. Default is 1. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - search: async (q: string, uid?: number, limit?: number, page?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'q' is not null or undefined - if (q === null || q === undefined) { - throw new RequiredError('q','Required parameter q was null or undefined when calling search.'); - } - const localVarPath = `/repos/search`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - if (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (uid !== undefined) { - localVarQueryParameter['uid'] = uid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (page !== undefined) { - localVarQueryParameter['page'] = page; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * RepositoryApi - functional programming interface - * @export - */ -export const RepositoryApiFp = function(configuration?: Configuration) { - return { - /** - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * @summary Create in organization - * @param {string} orgname A DagsHub organization name - * @param {CreateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createOrgRepo(orgname: string, body?: CreateRepo, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await RepositoryApiAxiosParamCreator(configuration).createOrgRepo(orgname, body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * Create a new repository for the authenticated user. - * @summary Create - * @param {CreateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createRepo(body?: CreateRepo, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await RepositoryApiAxiosParamCreator(configuration).createRepo(body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Get repository information - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRepo(owner: string, repo: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await RepositoryApiAxiosParamCreator(configuration).getRepo(owner, repo, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * @summary List your repositories - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listMyRepos(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await RepositoryApiAxiosParamCreator(configuration).listMyRepos(options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * List repositories that are accessible to the authenticated user. - * @summary List organization repositories - * @param {string} orgname A DagsHub organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listOrgRepos(orgname: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await RepositoryApiAxiosParamCreator(configuration).listOrgRepos(orgname, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * List public repositories for the specified user. - * @summary List user repositories - * @param {string} username A DagsHub username or organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listUserRepos(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await RepositoryApiAxiosParamCreator(configuration).listUserRepos(username, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * @summary Migrate repository - * @param {MigrateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async migrateRepo(body?: MigrateRepo, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await RepositoryApiAxiosParamCreator(configuration).migrateRepo(body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Search repositories - * @param {string} q - * @param {number} [uid] User ID to specify search whose repositories. Default is 0 and search all repositories - * @param {number} [limit] Maximum number of repositories in search results. - * @param {number} [page] Page number. Default is 1. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async search(q: string, uid?: number, limit?: number, page?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await RepositoryApiAxiosParamCreator(configuration).search(q, uid, limit, page, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * RepositoryApi - factory interface - * @export - */ -export const RepositoryApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * @summary Create in organization - * @param {string} orgname A DagsHub organization name - * @param {CreateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createOrgRepo(orgname: string, body?: CreateRepo, options?: AxiosRequestConfig): Promise> { - return RepositoryApiFp(configuration).createOrgRepo(orgname, body, options).then((request) => request(axios, basePath)); - }, - /** - * Create a new repository for the authenticated user. - * @summary Create - * @param {CreateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createRepo(body?: CreateRepo, options?: AxiosRequestConfig): Promise> { - return RepositoryApiFp(configuration).createRepo(body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get repository information - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRepo(owner: string, repo: string, options?: AxiosRequestConfig): Promise> { - return RepositoryApiFp(configuration).getRepo(owner, repo, options).then((request) => request(axios, basePath)); - }, - /** - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * @summary List your repositories - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listMyRepos(options?: AxiosRequestConfig): Promise> { - return RepositoryApiFp(configuration).listMyRepos(options).then((request) => request(axios, basePath)); - }, - /** - * List repositories that are accessible to the authenticated user. - * @summary List organization repositories - * @param {string} orgname A DagsHub organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listOrgRepos(orgname: string, options?: AxiosRequestConfig): Promise> { - return RepositoryApiFp(configuration).listOrgRepos(orgname, options).then((request) => request(axios, basePath)); - }, - /** - * List public repositories for the specified user. - * @summary List user repositories - * @param {string} username A DagsHub username or organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listUserRepos(username: string, options?: AxiosRequestConfig): Promise> { - return RepositoryApiFp(configuration).listUserRepos(username, options).then((request) => request(axios, basePath)); - }, - /** - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * @summary Migrate repository - * @param {MigrateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async migrateRepo(body?: MigrateRepo, options?: AxiosRequestConfig): Promise> { - return RepositoryApiFp(configuration).migrateRepo(body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Search repositories - * @param {string} q - * @param {number} [uid] User ID to specify search whose repositories. Default is 0 and search all repositories - * @param {number} [limit] Maximum number of repositories in search results. - * @param {number} [page] Page number. Default is 1. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async search(q: string, uid?: number, limit?: number, page?: number, options?: AxiosRequestConfig): Promise> { - return RepositoryApiFp(configuration).search(q, uid, limit, page, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * RepositoryApi - object-oriented interface - * @export - * @class RepositoryApi - * @extends {BaseAPI} - */ -export class RepositoryApi extends BaseAPI { - /** - * Create a new repository in this organization. The authenticated user must be an **owner** of the specified organization. - * @summary Create in organization - * @param {string} orgname A DagsHub organization name - * @param {CreateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RepositoryApi - */ - public async createOrgRepo(orgname: string, body?: CreateRepo, options?: AxiosRequestConfig) : Promise> { - return RepositoryApiFp(this.configuration).createOrgRepo(orgname, body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Create a new repository for the authenticated user. - * @summary Create - * @param {CreateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RepositoryApi - */ - public async createRepo(body?: CreateRepo, options?: AxiosRequestConfig) : Promise> { - return RepositoryApiFp(this.configuration).createRepo(body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Get repository information - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RepositoryApi - */ - public async getRepo(owner: string, repo: string, options?: AxiosRequestConfig) : Promise> { - return RepositoryApiFp(this.configuration).getRepo(owner, repo, options).then((request) => request(this.axios, this.basePath)); - } - /** - * List repositories that are accessible to the authenticated user. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership. - * @summary List your repositories - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RepositoryApi - */ - public async listMyRepos(options?: AxiosRequestConfig) : Promise> { - return RepositoryApiFp(this.configuration).listMyRepos(options).then((request) => request(this.axios, this.basePath)); - } - /** - * List repositories that are accessible to the authenticated user. - * @summary List organization repositories - * @param {string} orgname A DagsHub organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RepositoryApi - */ - public async listOrgRepos(orgname: string, options?: AxiosRequestConfig) : Promise> { - return RepositoryApiFp(this.configuration).listOrgRepos(orgname, options).then((request) => request(this.axios, this.basePath)); - } - /** - * List public repositories for the specified user. - * @summary List user repositories - * @param {string} username A DagsHub username or organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RepositoryApi - */ - public async listUserRepos(username: string, options?: AxiosRequestConfig) : Promise> { - return RepositoryApiFp(this.configuration).listUserRepos(username, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Migrate a repository from other Git hosting sources for the authenticated user. To migrate a repository for a organization, the authenticated user must be a **owner** of the specified organization. - * @summary Migrate repository - * @param {MigrateRepo} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RepositoryApi - */ - public async migrateRepo(body?: MigrateRepo, options?: AxiosRequestConfig) : Promise> { - return RepositoryApiFp(this.configuration).migrateRepo(body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Search repositories - * @param {string} q - * @param {number} [uid] User ID to specify search whose repositories. Default is 0 and search all repositories - * @param {number} [limit] Maximum number of repositories in search results. - * @param {number} [page] Page number. Default is 1. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RepositoryApi - */ - public async search(q: string, uid?: number, limit?: number, page?: number, options?: AxiosRequestConfig) : Promise> { - return RepositoryApiFp(this.configuration).search(q, uid, limit, page, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/apis/storage-integrations-api.ts b/TypeScript/apis/storage-integrations-api.ts deleted file mode 100644 index 4009ee5..0000000 --- a/TypeScript/apis/storage-integrations-api.ts +++ /dev/null @@ -1,415 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -import { Files1 } from '../models'; -import { Integration } from '../models'; -/** - * StorageIntegrationsApi - axios parameter creator - * @export - */ -export const StorageIntegrationsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary List contents in the path - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} protocol protocol of the storage integration - * @param {string} bucket name and prefix of the bucket integration - * @param {string} path path of a folder in the repository - * @param {boolean} [includeSize] - * @param {number} [limit] Maximum amount of items to return - * @param {string} [fromToken] Token, from which to continue iteration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBucketContent: async (owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, fromToken?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getBucketContent.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getBucketContent.'); - } - // verify required parameter 'protocol' is not null or undefined - if (protocol === null || protocol === undefined) { - throw new RequiredError('protocol','Required parameter protocol was null or undefined when calling getBucketContent.'); - } - // verify required parameter 'bucket' is not null or undefined - if (bucket === null || bucket === undefined) { - throw new RequiredError('bucket','Required parameter bucket was null or undefined when calling getBucketContent.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new RequiredError('path','Required parameter path was null or undefined when calling getBucketContent.'); - } - const localVarPath = `/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"protocol"}}`, encodeURIComponent(String(protocol))) - .replace(`{${"bucket"}}`, encodeURIComponent(String(bucket))) - .replace(`{${"path"}}`, encodeURIComponent(String(path))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - if (includeSize !== undefined) { - localVarQueryParameter['include_size'] = includeSize; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (fromToken !== undefined) { - localVarQueryParameter['from_token'] = fromToken; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get file in the bucket - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} protocol protocol of the storage integration - * @param {string} bucket name and prefix of the bucket integration - * @param {string} path The content path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBucketFile: async (owner: string, repo: string, protocol: string, bucket: string, path: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getBucketFile.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getBucketFile.'); - } - // verify required parameter 'protocol' is not null or undefined - if (protocol === null || protocol === undefined) { - throw new RequiredError('protocol','Required parameter protocol was null or undefined when calling getBucketFile.'); - } - // verify required parameter 'bucket' is not null or undefined - if (bucket === null || bucket === undefined) { - throw new RequiredError('bucket','Required parameter bucket was null or undefined when calling getBucketFile.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new RequiredError('path','Required parameter path was null or undefined when calling getBucketFile.'); - } - const localVarPath = `/repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"protocol"}}`, encodeURIComponent(String(protocol))) - .replace(`{${"bucket"}}`, encodeURIComponent(String(bucket))) - .replace(`{${"path"}}`, encodeURIComponent(String(path))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary List integrated storages in the repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBuckets: async (owner: string, repo: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling getBuckets.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling getBuckets.'); - } - const localVarPath = `/repos/{owner}/{repo}/storage` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * StorageIntegrationsApi - functional programming interface - * @export - */ -export const StorageIntegrationsApiFp = function(configuration?: Configuration) { - return { - /** - * - * @summary List contents in the path - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} protocol protocol of the storage integration - * @param {string} bucket name and prefix of the bucket integration - * @param {string} path path of a folder in the repository - * @param {boolean} [includeSize] - * @param {number} [limit] Maximum amount of items to return - * @param {string} [fromToken] Token, from which to continue iteration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBucketContent(owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, fromToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await StorageIntegrationsApiAxiosParamCreator(configuration).getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Get file in the bucket - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} protocol protocol of the storage integration - * @param {string} bucket name and prefix of the bucket integration - * @param {string} path The content path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBucketFile(owner: string, repo: string, protocol: string, bucket: string, path: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await StorageIntegrationsApiAxiosParamCreator(configuration).getBucketFile(owner, repo, protocol, bucket, path, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary List integrated storages in the repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBuckets(owner: string, repo: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await StorageIntegrationsApiAxiosParamCreator(configuration).getBuckets(owner, repo, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * StorageIntegrationsApi - factory interface - * @export - */ -export const StorageIntegrationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * - * @summary List contents in the path - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} protocol protocol of the storage integration - * @param {string} bucket name and prefix of the bucket integration - * @param {string} path path of a folder in the repository - * @param {boolean} [includeSize] - * @param {number} [limit] Maximum amount of items to return - * @param {string} [fromToken] Token, from which to continue iteration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBucketContent(owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, fromToken?: string, options?: AxiosRequestConfig): Promise> { - return StorageIntegrationsApiFp(configuration).getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get file in the bucket - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} protocol protocol of the storage integration - * @param {string} bucket name and prefix of the bucket integration - * @param {string} path The content path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBucketFile(owner: string, repo: string, protocol: string, bucket: string, path: string, options?: AxiosRequestConfig): Promise> { - return StorageIntegrationsApiFp(configuration).getBucketFile(owner, repo, protocol, bucket, path, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary List integrated storages in the repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBuckets(owner: string, repo: string, options?: AxiosRequestConfig): Promise> { - return StorageIntegrationsApiFp(configuration).getBuckets(owner, repo, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * StorageIntegrationsApi - object-oriented interface - * @export - * @class StorageIntegrationsApi - * @extends {BaseAPI} - */ -export class StorageIntegrationsApi extends BaseAPI { - /** - * - * @summary List contents in the path - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} protocol protocol of the storage integration - * @param {string} bucket name and prefix of the bucket integration - * @param {string} path path of a folder in the repository - * @param {boolean} [includeSize] - * @param {number} [limit] Maximum amount of items to return - * @param {string} [fromToken] Token, from which to continue iteration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof StorageIntegrationsApi - */ - public async getBucketContent(owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, fromToken?: string, options?: AxiosRequestConfig) : Promise> { - return StorageIntegrationsApiFp(this.configuration).getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Get file in the bucket - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {string} protocol protocol of the storage integration - * @param {string} bucket name and prefix of the bucket integration - * @param {string} path The content path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof StorageIntegrationsApi - */ - public async getBucketFile(owner: string, repo: string, protocol: string, bucket: string, path: string, options?: AxiosRequestConfig) : Promise> { - return StorageIntegrationsApiFp(this.configuration).getBucketFile(owner, repo, protocol, bucket, path, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary List integrated storages in the repository - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof StorageIntegrationsApi - */ - public async getBuckets(owner: string, repo: string, options?: AxiosRequestConfig) : Promise> { - return StorageIntegrationsApiFp(this.configuration).getBuckets(owner, repo, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/apis/user-api.ts b/TypeScript/apis/user-api.ts deleted file mode 100644 index cbc8d4b..0000000 --- a/TypeScript/apis/user-api.ts +++ /dev/null @@ -1,214 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -/** - * UserApi - axios parameter creator - * @export - */ -export const UserApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Get authenticated user information - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAuthenticatedUser: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/user`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get information about a user - * @param {string} username A DagsHub username or organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - if (username === null || username === undefined) { - throw new RequiredError('username','Required parameter username was null or undefined when calling getUser.'); - } - const localVarPath = `/users/{username}` - .replace(`{${"username"}}`, encodeURIComponent(String(username))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * UserApi - functional programming interface - * @export - */ -export const UserApiFp = function(configuration?: Configuration) { - return { - /** - * - * @summary Get authenticated user information - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getAuthenticatedUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).getAuthenticatedUser(options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Get information about a user - * @param {string} username A DagsHub username or organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).getUser(username, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * UserApi - factory interface - * @export - */ -export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * - * @summary Get authenticated user information - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getAuthenticatedUser(options?: AxiosRequestConfig): Promise> { - return UserApiFp(configuration).getAuthenticatedUser(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get information about a user - * @param {string} username A DagsHub username or organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getUser(username: string, options?: AxiosRequestConfig): Promise> { - return UserApiFp(configuration).getUser(username, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * UserApi - object-oriented interface - * @export - * @class UserApi - * @extends {BaseAPI} - */ -export class UserApi extends BaseAPI { - /** - * - * @summary Get authenticated user information - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public async getAuthenticatedUser(options?: AxiosRequestConfig) : Promise> { - return UserApiFp(this.configuration).getAuthenticatedUser(options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Get information about a user - * @param {string} username A DagsHub username or organization name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public async getUser(username: string, options?: AxiosRequestConfig) : Promise> { - return UserApiFp(this.configuration).getUser(username, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/apis/webhooks-api.ts b/TypeScript/apis/webhooks-api.ts deleted file mode 100644 index 4636fff..0000000 --- a/TypeScript/apis/webhooks-api.ts +++ /dev/null @@ -1,465 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -import { HooksIdBody } from '../models'; -import { RepoHooksBody } from '../models'; -/** - * WebhooksApi - axios parameter creator - * @export - */ -export const WebhooksApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Create a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {RepoHooksBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createHook: async (owner: string, repo: string, body?: RepoHooksBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling createHook.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling createHook.'); - } - const localVarPath = `/repos/{owner}/{repo}/hooks` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Delete a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteHook: async (owner: string, repo: string, id: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling deleteHook.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling deleteHook.'); - } - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError('id','Required parameter id was null or undefined when calling deleteHook.'); - } - const localVarPath = `/repos/{owner}/{repo}/hooks/{id}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Edit a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} id - * @param {HooksIdBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - editHook: async (owner: string, repo: string, id: number, body?: HooksIdBody, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling editHook.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling editHook.'); - } - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError('id','Required parameter id was null or undefined when calling editHook.'); - } - const localVarPath = `/repos/{owner}/{repo}/hooks/{id}` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - /** - * - * @summary List hooks - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listHooks: async (owner: string, repo: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'owner' is not null or undefined - if (owner === null || owner === undefined) { - throw new RequiredError('owner','Required parameter owner was null or undefined when calling listHooks.'); - } - // verify required parameter 'repo' is not null or undefined - if (repo === null || repo === undefined) { - throw new RequiredError('repo','Required parameter repo was null or undefined when calling listHooks.'); - } - const localVarPath = `/repos/{owner}/{repo}/hooks` - .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) - .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication basicAuth required - - // authentication tokenAuth required - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey("token") - : await configuration.apiKey; - localVarQueryParameter["token"] = localVarApiKeyValue; - } - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * WebhooksApi - functional programming interface - * @export - */ -export const WebhooksApiFp = function(configuration?: Configuration) { - return { - /** - * - * @summary Create a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {RepoHooksBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createHook(owner: string, repo: string, body?: RepoHooksBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await WebhooksApiAxiosParamCreator(configuration).createHook(owner, repo, body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Delete a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteHook(owner: string, repo: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await WebhooksApiAxiosParamCreator(configuration).deleteHook(owner, repo, id, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary Edit a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} id - * @param {HooksIdBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async editHook(owner: string, repo: string, id: number, body?: HooksIdBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await WebhooksApiAxiosParamCreator(configuration).editHook(owner, repo, id, body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - /** - * - * @summary List hooks - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listHooks(owner: string, repo: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await WebhooksApiAxiosParamCreator(configuration).listHooks(owner, repo, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, - } -}; - -/** - * WebhooksApi - factory interface - * @export - */ -export const WebhooksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - return { - /** - * - * @summary Create a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {RepoHooksBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createHook(owner: string, repo: string, body?: RepoHooksBody, options?: AxiosRequestConfig): Promise> { - return WebhooksApiFp(configuration).createHook(owner, repo, body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Delete a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteHook(owner: string, repo: string, id: number, options?: AxiosRequestConfig): Promise> { - return WebhooksApiFp(configuration).deleteHook(owner, repo, id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Edit a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} id - * @param {HooksIdBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async editHook(owner: string, repo: string, id: number, body?: HooksIdBody, options?: AxiosRequestConfig): Promise> { - return WebhooksApiFp(configuration).editHook(owner, repo, id, body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary List hooks - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listHooks(owner: string, repo: string, options?: AxiosRequestConfig): Promise> { - return WebhooksApiFp(configuration).listHooks(owner, repo, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * WebhooksApi - object-oriented interface - * @export - * @class WebhooksApi - * @extends {BaseAPI} - */ -export class WebhooksApi extends BaseAPI { - /** - * - * @summary Create a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {RepoHooksBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - public async createHook(owner: string, repo: string, body?: RepoHooksBody, options?: AxiosRequestConfig) : Promise> { - return WebhooksApiFp(this.configuration).createHook(owner, repo, body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Delete a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - public async deleteHook(owner: string, repo: string, id: number, options?: AxiosRequestConfig) : Promise> { - return WebhooksApiFp(this.configuration).deleteHook(owner, repo, id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Edit a hook - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {number} id - * @param {HooksIdBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - public async editHook(owner: string, repo: string, id: number, body?: HooksIdBody, options?: AxiosRequestConfig) : Promise> { - return WebhooksApiFp(this.configuration).editHook(owner, repo, id, body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary List hooks - * @param {string} owner owner of the repository - * @param {string} repo name of the repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - public async listHooks(owner: string, repo: string, options?: AxiosRequestConfig) : Promise> { - return WebhooksApiFp(this.configuration).listHooks(owner, repo, options).then((request) => request(this.axios, this.basePath)); - } -} diff --git a/TypeScript/base.ts b/TypeScript/base.ts deleted file mode 100644 index 6222503..0000000 --- a/TypeScript/base.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import { Configuration } from "./configuration"; -// Some imports not used depending on template conditions -// @ts-ignore -import globalAxios, { AxiosRequestConfig, AxiosInstance } from 'axios'; - -export const BASE_PATH = "https://dagshub.com/api/v1".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } -} diff --git a/TypeScript/configuration.ts b/TypeScript/configuration.ts deleted file mode 100644 index d0977e7..0000000 --- a/TypeScript/configuration.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - } -} diff --git a/TypeScript/git_push.sh b/TypeScript/git_push.sh deleted file mode 100644 index f1c4639..0000000 --- a/TypeScript/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh hugomario swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="DagsHub" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="api-clients" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/TypeScript/index.ts b/TypeScript/index.ts deleted file mode 100644 index 1163167..0000000 --- a/TypeScript/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -export * from "./api"; -export * from "./configuration"; -export * from "./models"; - diff --git a/TypeScript/models/assignee.ts b/TypeScript/models/assignee.ts deleted file mode 100644 index 324d61e..0000000 --- a/TypeScript/models/assignee.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * Username for the user that this issue should be assigned to. **Note:** Only users with write access can set the assignee for new issues. The assignee is silently dropped otherwise. - * @export - * @interface Assignee - */ -export interface Assignee { -} diff --git a/TypeScript/models/body.ts b/TypeScript/models/body.ts deleted file mode 100644 index 4a95b87..0000000 --- a/TypeScript/models/body.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * The contents of the issue. - * @export - * @interface Body - */ -export interface Body { -} diff --git a/TypeScript/models/closed.ts b/TypeScript/models/closed.ts deleted file mode 100644 index 38b4926..0000000 --- a/TypeScript/models/closed.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * Indicate initial issue state as closed (**true**) or open (**false**). - * @export - * @interface Closed - */ -export interface Closed { -} diff --git a/TypeScript/models/collaborators-collaborator-body.ts b/TypeScript/models/collaborators-collaborator-body.ts deleted file mode 100644 index 3bb39a3..0000000 --- a/TypeScript/models/collaborators-collaborator-body.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * - * @export - * @interface CollaboratorsCollaboratorBody - */ -export interface CollaboratorsCollaboratorBody { - /** - * The permission to grant the collaborator. Can be one of **read**, **write** and **admin**. - * @type {string} - * @memberof CollaboratorsCollaboratorBody - */ - permission?: string; -} diff --git a/TypeScript/models/create-repo.ts b/TypeScript/models/create-repo.ts deleted file mode 100644 index 07c373f..0000000 --- a/TypeScript/models/create-repo.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * - * @export - * @interface CreateRepo - */ -export interface CreateRepo { - /** - * name of the repository - * @type {string} - * @memberof CreateRepo - */ - name: string; - /** - * A short description of the repository - * @type {string} - * @memberof CreateRepo - */ - description?: string; - /** - * Either true to create a private repository, or false to create a public one. - * @type {boolean} - * @memberof CreateRepo - */ - _private?: boolean; - /** - * Pass true to create an initial commit with README, .gitignore and LICENSE. - * @type {boolean} - * @memberof CreateRepo - */ - autoInit?: boolean; - /** - * Choose 'custom' to set .gitignore, license and readme, or 'none' for a completely empty repository. For other templates you may specify only the license. - * @type {string} - * @memberof CreateRepo - */ - projectTemplate?: CreateRepoProjectTemplateEnum; - /** - * Desired language .gitignore templates to apply. Use the name of the templates. - * @type {string} - * @memberof CreateRepo - */ - gitignores?: string; - /** - * Desired LICENSE template to apply. Use the name of the template. - * @type {string} - * @memberof CreateRepo - */ - license?: CreateRepoLicenseEnum; - /** - * Desired README template to apply. Use the name of the template. - * @type {string} - * @memberof CreateRepo - */ - readme?: string; -} - -/** - * @export - * @enum {string} - */ -export enum CreateRepoProjectTemplateEnum { - CookiecutterDagshubDvc = 'cookiecutter-dagshub-dvc', - Custom = 'custom', - None = 'none', - NotebookTemplate = 'notebook-template' -} -/** - * @export - * @enum {string} - */ -export enum CreateRepoLicenseEnum { - ApacheLicense20 = 'Apache License 2.0', - MITLicense = 'MIT License', - AbstylesLicense = 'Abstyles License', - AcademicFreeLicenseV11 = 'Academic Free License v1.1', - AcademicFreeLicenseV12 = 'Academic Free License v1.2', - AcademicFreeLicenseV20 = 'Academic Free License v2.0', - AcademicFreeLicenseV21 = 'Academic Free License v2.1', - AcademicFreeLicenseV30 = 'Academic Free License v3.0', - AfferoGeneralPublicLicenseV10 = 'Affero General Public License v1.0', - ApacheLicense10 = 'Apache License 1.0', - ApacheLicense11 = 'Apache License 1.1', - ArtisticLicense10 = 'Artistic License 1.0', - ArtisticLicense20 = 'Artistic License 2.0', - BSD2ClauseLicense = 'BSD 2-clause License', - BSD3ClauseLicense = 'BSD 3-clause License', - BSD4ClauseLicense = 'BSD 4-clause License', - CreativeCommonsCC010Universal = 'Creative Commons CC0 1.0 Universal', - EclipsePublicLicense10 = 'Eclipse Public License 1.0', - EducationalCommunityLicenseV10 = 'Educational Community License v1.0', - EducationalCommunityLicenseV20 = 'Educational Community License v2.0', - GNUAfferoGeneralPublicLicenseV30 = 'GNU Affero General Public License v3.0', - GNUFreeDocumentationLicenseV11 = 'GNU Free Documentation License v1.1', - GNUFreeDocumentationLicenseV12 = 'GNU Free Documentation License v1.2', - GNUFreeDocumentationLicenseV13 = 'GNU Free Documentation License v1.3', - GNUGeneralPublicLicenseV10 = 'GNU General Public License v1.0', - GNUGeneralPublicLicenseV20 = 'GNU General Public License v2.0', - GNUGeneralPublicLicenseV30 = 'GNU General Public License v3.0', - GNULesserGeneralPublicLicenseV21 = 'GNU Lesser General Public License v2.1', - GNULesserGeneralPublicLicenseV30 = 'GNU Lesser General Public License v3.0', - GNULibraryGeneralPublicLicenseV20 = 'GNU Library General Public License v2.0', - ISCLicense = 'ISC license', - MozillaPublicLicense10 = 'Mozilla Public License 1.0', - MozillaPublicLicense11 = 'Mozilla Public License 1.1', - MozillaPublicLicense203 = 'Mozilla Public License 2.03' -} - diff --git a/TypeScript/models/edit-experiment-post.ts b/TypeScript/models/edit-experiment-post.ts deleted file mode 100644 index 2919b60..0000000 --- a/TypeScript/models/edit-experiment-post.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * - * @export - * @interface EditExperimentPost - */ -export interface EditExperimentPost { - /** - * - * @type {string} - * @memberof EditExperimentPost - */ - name: string; -} diff --git a/TypeScript/models/experiment-keys.ts b/TypeScript/models/experiment-keys.ts index 80c4a22..4714548 100644 --- a/TypeScript/models/experiment-keys.ts +++ b/TypeScript/models/experiment-keys.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/state.ts b/TypeScript/models/experiment-metrics-response.ts similarity index 74% rename from TypeScript/models/state.ts rename to TypeScript/models/experiment-metrics-response.ts index 689b3a5..1c2d6d4 100644 --- a/TypeScript/models/state.ts +++ b/TypeScript/models/experiment-metrics-response.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -12,12 +12,9 @@ * Do not edit the class manually. */ /** - * + * Map of experiment IDs to their metrics by path * @export - * @enum {string} + * @interface ExperimentMetricsResponse */ -export enum State { - Open = 'open', - Closed = 'closed' +export interface ExperimentMetricsResponse extends null { } - diff --git a/TypeScript/models/experiments-response.ts b/TypeScript/models/experiments-response.ts new file mode 100644 index 0000000..5859c05 --- /dev/null +++ b/TypeScript/models/experiments-response.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { ComponentsschemasExperimentYaml } from './componentsschemas-experiment-yaml'; +/** + * + * @export + * @interface ExperimentsResponse + */ +export interface ExperimentsResponse { + /** + * Map of experiment ID to experiment details + * @type {{ [key: string]: ComponentsschemasExperimentYaml; }} + * @memberof ExperimentsResponse + */ + experiments?: { [key: string]: ComponentsschemasExperimentYaml; }; + /** + * Whether the authenticated user can edit experiments in this repo + * @type {boolean} + * @memberof ExperimentsResponse + */ + isEditor?: boolean; + /** + * Pagination token for the next page of results (empty string when no more pages) + * @type {string} + * @memberof ExperimentsResponse + */ + nextPageToken?: string | null; +} diff --git a/TypeScript/models/files.ts b/TypeScript/models/files.ts index a117a1c..cfc5a4e 100644 --- a/TypeScript/models/files.ts +++ b/TypeScript/models/files.ts @@ -4,17 +4,18 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ +import { ComponentsschemasFileYaml } from './componentsschemas-file-yaml'; /** * * @export * @interface Files */ -export interface Files extends Array { +export interface Files extends Array { } diff --git a/TypeScript/models/files1.ts b/TypeScript/models/files1.ts index 194839b..f33e1f4 100644 --- a/TypeScript/models/files1.ts +++ b/TypeScript/models/files1.ts @@ -4,13 +4,14 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ +import { ComponentsschemasFileYaml } from './componentsschemas-file-yaml'; /** * * @export @@ -19,18 +20,12 @@ export interface Files1 { /** * - * @type {Array} + * @type {Array} * @memberof Files1 */ - entries?: Array; + entries?: Array; /** - * - * @type {number} - * @memberof Files1 - */ - limit?: number; - /** - * + * Next token to continue pagination from * @type {string} * @memberof Files1 */ diff --git a/TypeScript/models/hooks-id-body.ts b/TypeScript/models/hooks-id-body.ts deleted file mode 100644 index 8f99977..0000000 --- a/TypeScript/models/hooks-id-body.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import { WebhookConfig } from './webhook-config'; -import { WebhookEvents } from './webhook-events'; -/** - * - * @export - * @interface HooksIdBody - */ -export interface HooksIdBody { - /** - * - * @type {WebhookConfig} - * @memberof HooksIdBody - */ - config?: WebhookConfig; - /** - * - * @type {WebhookEvents} - * @memberof HooksIdBody - */ - events?: WebhookEvents; - /** - * Weather the hook is actually triggered on pushes or not. Ignore this field to leave it unchanged. - * @type {boolean} - * @memberof HooksIdBody - */ - active?: boolean; -} diff --git a/TypeScript/models/index.ts b/TypeScript/models/index.ts deleted file mode 100644 index 995594e..0000000 --- a/TypeScript/models/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -export * from './assignee'; -export * from './body'; -export * from './closed'; -export * from './collaborators-collaborator-body'; -export * from './create-repo'; -export * from './edit-experiment-post'; -export * from './experiment-keys'; -export * from './files'; -export * from './files1'; -export * from './hooks-id-body'; -export * from './integration'; -export * from './integration-inner'; -export * from './issue'; -export * from './issue-assignee'; -export * from './issue-labels'; -export * from './issue-milestone'; -export * from './issues'; -export * from './labels'; -export * from './migrate-repo'; -export * from './milestone'; -export * from './model-file'; -export * from './patch-issue'; -export * from './post-issue'; -export * from './put-file'; -export * from './repo-hooks-body'; -export * from './state'; -export * from './title'; -export * from './user'; -export * from './webhook-config'; -export * from './webhook-events'; diff --git a/TypeScript/models/integration-inner.ts b/TypeScript/models/integration-inner.ts deleted file mode 100644 index 41b8fae..0000000 --- a/TypeScript/models/integration-inner.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * - * @export - * @interface IntegrationInner - */ -export interface IntegrationInner { - /** - * Name/path of the bucket - * @type {string} - * @memberof IntegrationInner - */ - name?: string; - /** - * Protocol used by the integration - * @type {string} - * @memberof IntegrationInner - */ - protocol?: IntegrationInnerProtocolEnum; - /** - * URL to list the root of this bucket - * @type {string} - * @memberof IntegrationInner - */ - listPath?: string; -} - -/** - * @export - * @enum {string} - */ -export enum IntegrationInnerProtocolEnum { - S3 = 's3', - Gs = 'gs' -} - diff --git a/TypeScript/models/integration.ts b/TypeScript/models/integration.ts index 0124573..49fdec3 100644 --- a/TypeScript/models/integration.ts +++ b/TypeScript/models/integration.ts @@ -4,18 +4,17 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -import { IntegrationInner } from './integration-inner'; /** * * @export * @interface Integration */ -export interface Integration extends Array { +export interface Integration extends Array { } diff --git a/TypeScript/models/issue-assignee.ts b/TypeScript/models/issue-assignee.ts deleted file mode 100644 index 05dffef..0000000 --- a/TypeScript/models/issue-assignee.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * - * @export - * @interface IssueAssignee - */ -export interface IssueAssignee { - /** - * - * @type {number} - * @memberof IssueAssignee - */ - id?: number; - /** - * - * @type {string} - * @memberof IssueAssignee - */ - login?: string; - /** - * - * @type {string} - * @memberof IssueAssignee - */ - fullName?: string; - /** - * - * @type {string} - * @memberof IssueAssignee - */ - avatarUrl?: string; - /** - * - * @type {string} - * @memberof IssueAssignee - */ - username?: string; -} diff --git a/TypeScript/models/issue-labels.ts b/TypeScript/models/issue-labels.ts deleted file mode 100644 index aaf3f0f..0000000 --- a/TypeScript/models/issue-labels.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * - * @export - * @interface IssueLabels - */ -export interface IssueLabels { - /** - * - * @type {number} - * @memberof IssueLabels - */ - id?: number; - /** - * - * @type {string} - * @memberof IssueLabels - */ - name?: string; - /** - * - * @type {string} - * @memberof IssueLabels - */ - color?: string; - /** - * - * @type {string} - * @memberof IssueLabels - */ - url?: string; -} diff --git a/TypeScript/models/issue-milestone.ts b/TypeScript/models/issue-milestone.ts deleted file mode 100644 index 372f416..0000000 --- a/TypeScript/models/issue-milestone.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * - * @export - * @interface IssueMilestone - */ -export interface IssueMilestone { - /** - * - * @type {number} - * @memberof IssueMilestone - */ - id?: number; - /** - * - * @type {string} - * @memberof IssueMilestone - */ - title?: string; - /** - * - * @type {string} - * @memberof IssueMilestone - */ - description?: string; - /** - * - * @type {string} - * @memberof IssueMilestone - */ - state?: string; - /** - * - * @type {number} - * @memberof IssueMilestone - */ - openIssues?: number; - /** - * - * @type {number} - * @memberof IssueMilestone - */ - closedIssues?: number; - /** - * - * @type {string} - * @memberof IssueMilestone - */ - closedAt?: string; - /** - * - * @type {string} - * @memberof IssueMilestone - */ - dueOn?: string; -} diff --git a/TypeScript/models/issue.ts b/TypeScript/models/issue.ts index 199b459..2cdbda1 100644 --- a/TypeScript/models/issue.ts +++ b/TypeScript/models/issue.ts @@ -4,19 +4,14 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -import { Body } from './body'; -import { IssueAssignee } from './issue-assignee'; -import { IssueLabels } from './issue-labels'; -import { IssueMilestone } from './issue-milestone'; -import { Title } from './title'; -import { User } from './user'; +import { ComponentsschemasUserYaml } from './componentsschemas-user-yaml'; /** * * @export @@ -30,53 +25,53 @@ export interface Issue { */ id?: number; /** - * + * Issue index within the repository * @type {number} * @memberof Issue */ number?: number; /** * - * @type {User} + * @type {ComponentsschemasUserYaml} * @memberof Issue */ - user?: User; + user?: ComponentsschemasUserYaml; /** * - * @type {Title} + * @type {string} * @memberof Issue */ - title: Title; + title?: string; /** * - * @type {Body} + * @type {string} * @memberof Issue */ - body: Body; + body?: string; /** * - * @type {Array} + * @type {Array} * @memberof Issue */ - labels: Array; + labels?: Array; /** * - * @type {IssueMilestone} + * @type {any} * @memberof Issue */ - milestone: IssueMilestone; + milestone?: any | null; /** * - * @type {IssueAssignee} + * @type {ComponentsschemasUserYaml} * @memberof Issue */ - assignee: IssueAssignee; + assignee?: ComponentsschemasUserYaml; /** * * @type {string} * @memberof Issue */ - state?: string; + state?: IssueStateEnum; /** * * @type {number} @@ -85,26 +80,30 @@ export interface Issue { comments?: number; /** * - * @type {string} + * @type {Date} * @memberof Issue */ - createdAt?: string; + createdAt?: Date; /** * - * @type {string} + * @type {Date} * @memberof Issue */ - updatedAt?: string; + updatedAt?: Date; /** - * + * Present when the issue is associated with a pull request * @type {any} * @memberof Issue */ - pullRequest?: any; - /** - * - * @type {boolean} - * @memberof Issue - */ - closed: boolean; + pullRequest?: any | null; +} + +/** + * @export + * @enum {string} + */ +export enum IssueStateEnum { + Open = 'open', + Closed = 'closed' } + diff --git a/TypeScript/models/issues.ts b/TypeScript/models/issues.ts index 72af66d..90e356c 100644 --- a/TypeScript/models/issues.ts +++ b/TypeScript/models/issues.ts @@ -4,18 +4,18 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -import { Issue } from './issue'; +import { ComponentsschemasIssueYaml } from './componentsschemas-issue-yaml'; /** * * @export * @interface Issues */ -export interface Issues extends Array { +export interface Issues extends Array { } diff --git a/TypeScript/models/labels.ts b/TypeScript/models/labels.ts deleted file mode 100644 index c3db9d9..0000000 --- a/TypeScript/models/labels.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * Labels **ID** to associate with this issue. **Note:** Only users with write access can set labels for new issues. Labels are silently dropped otherwise. - * @export - * @interface Labels - */ -export interface Labels extends Array { -} diff --git a/TypeScript/models/migrate-repo.ts b/TypeScript/models/migrate-repo.ts deleted file mode 100644 index 6423025..0000000 --- a/TypeScript/models/migrate-repo.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * - * @export - * @interface MigrateRepo - */ -export interface MigrateRepo { - /** - * Remote Git address (HTTP/HTTPS URL or local path) - * @type {string} - * @memberof MigrateRepo - */ - cloneAddr: string; - /** - * Authorization username - * @type {string} - * @memberof MigrateRepo - */ - authUsername?: string; - /** - * Authorization password - * @type {string} - * @memberof MigrateRepo - */ - authPassword?: string; - /** - * User ID who takes ownership of this repository - * @type {number} - * @memberof MigrateRepo - */ - userId: number; - /** - * Name of the repository - * @type {string} - * @memberof MigrateRepo - */ - repoName?: string; - /** - * Repository will be a mirror (connected repository). - * @type {boolean} - * @memberof MigrateRepo - */ - mirror?: boolean; - /** - * Repository will be private or public. - * @type {string} - * @memberof MigrateRepo - */ - visibility?: MigrateRepoVisibilityEnum; - /** - * Description of the repository - * @type {string} - * @memberof MigrateRepo - */ - description?: string; -} - -/** - * @export - * @enum {string} - */ -export enum MigrateRepoVisibilityEnum { - Private = 'private', - Public = 'public' -} - diff --git a/TypeScript/models/milestone.ts b/TypeScript/models/milestone.ts deleted file mode 100644 index 0d75047..0000000 --- a/TypeScript/models/milestone.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * The **ID** of the milestone to associate this issue with. **Note:** Only users with write access can set the milestone for new issues. The milestone is silently dropped otherwise. - * @export - * @interface Milestone - */ -export interface Milestone { -} diff --git a/TypeScript/models/model-file.ts b/TypeScript/models/model-file.ts deleted file mode 100644 index a8e6b76..0000000 --- a/TypeScript/models/model-file.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * - * @export - * @interface ModelFile - */ -export interface ModelFile { - /** - * - * @type {string} - * @memberof ModelFile - */ - path?: string; - /** - * - * @type {string} - * @memberof ModelFile - */ - type?: ModelFileTypeEnum; - /** - * - * @type {number} - * @memberof ModelFile - */ - size?: number; - /** - * - * @type {string} - * @memberof ModelFile - */ - hash?: string; - /** - * - * @type {string} - * @memberof ModelFile - */ - versioning?: ModelFileVersioningEnum; - /** - * - * @type {string} - * @memberof ModelFile - */ - downloadUrl?: string; - /** - * - * @type {string} - * @memberof ModelFile - */ - contentUrl?: string; -} - -/** - * @export - * @enum {string} - */ -export enum ModelFileTypeEnum { - File = 'file', - Dir = 'dir' -} -/** - * @export - * @enum {string} - */ -export enum ModelFileVersioningEnum { - Git = 'git', - Dvc = 'dvc', - Bucket = 'bucket' -} - diff --git a/TypeScript/models/patch-issue.ts b/TypeScript/models/patch-issue.ts index d0f4f82..10abf85 100644 --- a/TypeScript/models/patch-issue.ts +++ b/TypeScript/models/patch-issue.ts @@ -4,18 +4,18 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -import { Assignee } from './assignee'; -import { Body } from './body'; -import { Milestone } from './milestone'; -import { State } from './state'; -import { Title } from './title'; +import { ComponentsschemasAssigneeYaml } from './componentsschemas-assignee-yaml'; +import { ComponentsschemasBodyYaml } from './componentsschemas-body-yaml'; +import { ComponentsschemasMilestoneYaml } from './componentsschemas-milestone-yaml'; +import { ComponentsschemasStateYaml } from './componentsschemas-state-yaml'; +import { ComponentsschemasTitleYaml } from './componentsschemas-title-yaml'; /** * * @export @@ -24,32 +24,32 @@ import { Title } from './title'; export interface PatchIssue { /** * - * @type {Title} + * @type {ComponentsschemasTitleYaml} * @memberof PatchIssue */ - title?: Title; + title?: ComponentsschemasTitleYaml; /** * - * @type {Body} + * @type {ComponentsschemasBodyYaml} * @memberof PatchIssue */ - body?: Body; + body?: ComponentsschemasBodyYaml; /** * - * @type {Assignee} + * @type {ComponentsschemasAssigneeYaml} * @memberof PatchIssue */ - assignee?: Assignee; + assignee?: ComponentsschemasAssigneeYaml; /** * - * @type {Milestone} + * @type {ComponentsschemasMilestoneYaml} * @memberof PatchIssue */ - milestone?: Milestone; + milestone?: ComponentsschemasMilestoneYaml; /** * - * @type {State} + * @type {ComponentsschemasStateYaml} * @memberof PatchIssue */ - state?: State; + state?: ComponentsschemasStateYaml; } diff --git a/TypeScript/models/post-issue.ts b/TypeScript/models/post-issue.ts index 88f2ab3..f89a0ef 100644 --- a/TypeScript/models/post-issue.ts +++ b/TypeScript/models/post-issue.ts @@ -4,19 +4,19 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -import { Assignee } from './assignee'; -import { Body } from './body'; -import { Closed } from './closed'; -import { Labels } from './labels'; -import { Milestone } from './milestone'; -import { Title } from './title'; +import { ComponentsschemasAssigneeYaml } from './componentsschemas-assignee-yaml'; +import { ComponentsschemasBodyYaml } from './componentsschemas-body-yaml'; +import { ComponentsschemasClosedYaml } from './componentsschemas-closed-yaml'; +import { ComponentsschemasLabelsYaml } from './componentsschemas-labels-yaml'; +import { ComponentsschemasMilestoneYaml } from './componentsschemas-milestone-yaml'; +import { ComponentsschemasTitleYaml } from './componentsschemas-title-yaml'; /** * * @export @@ -25,38 +25,38 @@ import { Title } from './title'; export interface PostIssue { /** * - * @type {Title} + * @type {ComponentsschemasTitleYaml} * @memberof PostIssue */ - title?: Title; + title?: ComponentsschemasTitleYaml; /** * - * @type {Body} + * @type {ComponentsschemasBodyYaml} * @memberof PostIssue */ - body?: Body; + body?: ComponentsschemasBodyYaml; /** * - * @type {Assignee} + * @type {ComponentsschemasAssigneeYaml} * @memberof PostIssue */ - assignee?: Assignee; + assignee?: ComponentsschemasAssigneeYaml; /** * - * @type {Milestone} + * @type {ComponentsschemasMilestoneYaml} * @memberof PostIssue */ - milestone?: Milestone; + milestone?: ComponentsschemasMilestoneYaml; /** * - * @type {Labels} + * @type {ComponentsschemasLabelsYaml} * @memberof PostIssue */ - labels?: Labels; + labels?: ComponentsschemasLabelsYaml; /** * - * @type {Closed} + * @type {ComponentsschemasClosedYaml} * @memberof PostIssue */ - closed?: Closed; + closed?: ComponentsschemasClosedYaml; } diff --git a/TypeScript/models/put-file.ts b/TypeScript/models/put-file.ts index c6fd24b..97d559f 100644 --- a/TypeScript/models/put-file.ts +++ b/TypeScript/models/put-file.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/repo-hooks-body.ts b/TypeScript/models/repo-hooks-body.ts deleted file mode 100644 index 6258261..0000000 --- a/TypeScript/models/repo-hooks-body.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -import { WebhookConfig } from './webhook-config'; -import { WebhookEvents } from './webhook-events'; -/** - * - * @export - * @interface RepoHooksBody - */ -export interface RepoHooksBody { - /** - * The type of webhook - * @type {string} - * @memberof RepoHooksBody - */ - type: RepoHooksBodyTypeEnum; - /** - * - * @type {WebhookConfig} - * @memberof RepoHooksBody - */ - config: WebhookConfig; - /** - * - * @type {WebhookEvents} - * @memberof RepoHooksBody - */ - events?: WebhookEvents; -} - -/** - * @export - * @enum {string} - */ -export enum RepoHooksBodyTypeEnum { - Dagshub = 'dagshub', - Slack = 'slack', - Discord = 'discord', - Dingtalk = 'dingtalk' -} - diff --git a/TypeScript/models/title.ts b/TypeScript/models/title.ts deleted file mode 100644 index bf87b0e..0000000 --- a/TypeScript/models/title.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * The title of the issue - * @export - * @interface Title - */ -export interface Title { -} diff --git a/TypeScript/models/user.ts b/TypeScript/models/user.ts index 112932e..fdb3053 100644 --- a/TypeScript/models/user.ts +++ b/TypeScript/models/user.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -29,6 +29,12 @@ export interface User { * @memberof User */ login?: string; + /** + * Alias for login (legacy compatibility) + * @type {string} + * @memberof User + */ + username?: string; /** * * @type {string} @@ -46,5 +52,23 @@ export interface User { * @type {string} * @memberof User */ - username?: string; + publicEmail?: string; + /** + * + * @type {string} + * @memberof User + */ + website?: string; + /** + * + * @type {string} + * @memberof User + */ + company?: string; + /** + * + * @type {string} + * @memberof User + */ + description?: string; } diff --git a/TypeScript/models/webhook-config.ts b/TypeScript/models/webhook-config.ts deleted file mode 100644 index eb82e33..0000000 --- a/TypeScript/models/webhook-config.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * Key/value pairs to provide settings for this hook - * @export - * @interface WebhookConfig - */ -export interface WebhookConfig { - /** - * A string defining the URL to which the payloads will be delivered. - * @type {string} - * @memberof WebhookConfig - */ - url: string; - /** - * A string defining the media type used to serialize the payloads. - * @type {string} - * @memberof WebhookConfig - */ - contentType: WebhookConfigContentTypeEnum; - /** - * An optional string that's passed with the HTTP requests body. - * @type {string} - * @memberof WebhookConfig - */ - secret?: string; -} - -/** - * @export - * @enum {string} - */ -export enum WebhookConfigContentTypeEnum { - Json = 'json', - Form = 'form' -} - diff --git a/TypeScript/models/webhook-events.ts b/TypeScript/models/webhook-events.ts deleted file mode 100644 index cb7e3d0..0000000 --- a/TypeScript/models/webhook-events.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * DagsHub API - * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - * - * OpenAPI spec version: 1.0.2 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -/** - * Determines what events the hook is triggered format. - * @export - * @interface WebhookEvents - */ -export interface WebhookEvents extends Array { -} diff --git a/TypeScript/package.json b/TypeScript/package.json deleted file mode 100644 index 72de402..0000000 --- a/TypeScript/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "", - "version": "", - "description": "OpenAPI client for ", - "author": "OpenAPI-Generator Contributors", - "keywords": [ - "axios", - "typescript", - "openapi-client", - "openapi-generator", - "" - ], - "license": "Unlicense", - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "scripts": { - "build": "tsc --outDir dist/", - "prepublishOnly": "npm run build" - }, - "dependencies": { - "axios": "^0.21.1" - }, - "devDependencies": { - "@types/node": "^12.11.5", - "typescript": "^3.6.4" - } -} diff --git a/TypeScript/tsconfig.json b/TypeScript/tsconfig.json deleted file mode 100644 index 2f27acb..0000000 --- a/TypeScript/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "target": "es5", - "module": "commonjs", - "noImplicitAny": true, - "outDir": "dist", - "rootDir": ".", - "lib": [ - "es6", - "dom" - ], - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "dist", - "node_modules" - ] -}