mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-05-31 07:01:55 +00:00
852 lines
35 KiB
Markdown
852 lines
35 KiB
Markdown
# PackageApi
|
|
|
|
All URIs are relative to *https://{{.SwaggerAppSubUrl}}/api/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**deletePackage**](PackageApi.md#deletePackage) | **DELETE** packages/{owner}/{type}/{name} | Delete a package
|
|
[**deletePackageVersion**](PackageApi.md#deletePackageVersion) | **DELETE** packages/{owner}/{type}/{name}/{version} | Delete a package version
|
|
[**getLatestPackageVersion**](PackageApi.md#getLatestPackageVersion) | **GET** packages/{owner}/{type}/{name}/-/latest | Gets the latest version of a package
|
|
[**getPackage**](PackageApi.md#getPackage) | **GET** packages/{owner}/{type}/{name}/{version} | Gets a package
|
|
[**linkPackage**](PackageApi.md#linkPackage) | **POST** packages/{owner}/{type}/{name}/-/link/{repo_name} | Link a package to a repository
|
|
[**listPackageFiles**](PackageApi.md#listPackageFiles) | **GET** packages/{owner}/{type}/{name}/{version}/files | Gets all files of a package
|
|
[**listPackageVersions**](PackageApi.md#listPackageVersions) | **GET** packages/{owner}/{type}/{name} | Gets all versions of a package
|
|
[**listPackages**](PackageApi.md#listPackages) | **GET** packages/{owner} | Gets all packages of an owner
|
|
[**unlinkPackage**](PackageApi.md#unlinkPackage) | **POST** packages/{owner}/{type}/{name}/-/unlink | Unlink a package from a repository
|
|
|
|
<a name="deletePackage"></a>
|
|
# **deletePackage**
|
|
> Void deletePackage(owner, type, name)
|
|
|
|
Delete a package
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.PackageApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
PackageApi apiInstance = new PackageApi();
|
|
String owner = "owner_example"; // String | owner of the package
|
|
String type = "type_example"; // String | type of the package
|
|
String name = "name_example"; // String | name of the package
|
|
try {
|
|
Void result = apiInstance.deletePackage(owner, type, name);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling PackageApi#deletePackage");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the package |
|
|
**type** | **String**| type of the package |
|
|
**name** | **String**| name of the package |
|
|
|
|
### Return type
|
|
|
|
[**Void**](.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: Not defined
|
|
|
|
<a name="deletePackageVersion"></a>
|
|
# **deletePackageVersion**
|
|
> Void deletePackageVersion(owner, type, name, version)
|
|
|
|
Delete a package version
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.PackageApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
PackageApi apiInstance = new PackageApi();
|
|
String owner = "owner_example"; // String | owner of the package
|
|
String type = "type_example"; // String | type of the package
|
|
String name = "name_example"; // String | name of the package
|
|
String version = "version_example"; // String | version of the package
|
|
try {
|
|
Void result = apiInstance.deletePackageVersion(owner, type, name, version);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling PackageApi#deletePackageVersion");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the package |
|
|
**type** | **String**| type of the package |
|
|
**name** | **String**| name of the package |
|
|
**version** | **String**| version of the package |
|
|
|
|
### Return type
|
|
|
|
[**Void**](.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: Not defined
|
|
|
|
<a name="getLatestPackageVersion"></a>
|
|
# **getLatestPackageVersion**
|
|
> ModelPackage getLatestPackageVersion(owner, type, name)
|
|
|
|
Gets the latest version of a package
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.PackageApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
PackageApi apiInstance = new PackageApi();
|
|
String owner = "owner_example"; // String | owner of the package
|
|
String type = "type_example"; // String | type of the package
|
|
String name = "name_example"; // String | name of the package
|
|
try {
|
|
ModelPackage result = apiInstance.getLatestPackageVersion(owner, type, name);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling PackageApi#getLatestPackageVersion");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the package |
|
|
**type** | **String**| type of the package |
|
|
**name** | **String**| name of the package |
|
|
|
|
### Return type
|
|
|
|
[**ModelPackage**](ModelPackage.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
<a name="getPackage"></a>
|
|
# **getPackage**
|
|
> ModelPackage getPackage(owner, type, name, version)
|
|
|
|
Gets a package
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.PackageApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
PackageApi apiInstance = new PackageApi();
|
|
String owner = "owner_example"; // String | owner of the package
|
|
String type = "type_example"; // String | type of the package
|
|
String name = "name_example"; // String | name of the package
|
|
String version = "version_example"; // String | version of the package
|
|
try {
|
|
ModelPackage result = apiInstance.getPackage(owner, type, name, version);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling PackageApi#getPackage");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the package |
|
|
**type** | **String**| type of the package |
|
|
**name** | **String**| name of the package |
|
|
**version** | **String**| version of the package |
|
|
|
|
### Return type
|
|
|
|
[**ModelPackage**](ModelPackage.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
<a name="linkPackage"></a>
|
|
# **linkPackage**
|
|
> Void linkPackage(owner, type, name, repoName)
|
|
|
|
Link a package to a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.PackageApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
PackageApi apiInstance = new PackageApi();
|
|
String owner = "owner_example"; // String | owner of the package
|
|
String type = "type_example"; // String | type of the package
|
|
String name = "name_example"; // String | name of the package
|
|
String repoName = "repoName_example"; // String | name of the repository to link.
|
|
try {
|
|
Void result = apiInstance.linkPackage(owner, type, name, repoName);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling PackageApi#linkPackage");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the package |
|
|
**type** | **String**| type of the package |
|
|
**name** | **String**| name of the package |
|
|
**repoName** | **String**| name of the repository to link. |
|
|
|
|
### Return type
|
|
|
|
[**Void**](.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: Not defined
|
|
|
|
<a name="listPackageFiles"></a>
|
|
# **listPackageFiles**
|
|
> List<PackageFile> listPackageFiles(owner, type, name, version)
|
|
|
|
Gets all files of a package
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.PackageApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
PackageApi apiInstance = new PackageApi();
|
|
String owner = "owner_example"; // String | owner of the package
|
|
String type = "type_example"; // String | type of the package
|
|
String name = "name_example"; // String | name of the package
|
|
String version = "version_example"; // String | version of the package
|
|
try {
|
|
List<PackageFile> result = apiInstance.listPackageFiles(owner, type, name, version);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling PackageApi#listPackageFiles");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the package |
|
|
**type** | **String**| type of the package |
|
|
**name** | **String**| name of the package |
|
|
**version** | **String**| version of the package |
|
|
|
|
### Return type
|
|
|
|
[**List<PackageFile>**](PackageFile.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
<a name="listPackageVersions"></a>
|
|
# **listPackageVersions**
|
|
> List<ModelPackage> listPackageVersions(owner, type, name, page, limit)
|
|
|
|
Gets all versions of a package
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.PackageApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
PackageApi apiInstance = new PackageApi();
|
|
String owner = "owner_example"; // String | owner of the package
|
|
String type = "type_example"; // String | type of the package
|
|
String name = "name_example"; // String | name of the package
|
|
Integer page = 56; // Integer | page number of results to return (1-based)
|
|
Integer limit = 56; // Integer | page size of results
|
|
try {
|
|
List<ModelPackage> result = apiInstance.listPackageVersions(owner, type, name, page, limit);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling PackageApi#listPackageVersions");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the package |
|
|
**type** | **String**| type of the package |
|
|
**name** | **String**| name of the package |
|
|
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
|
**limit** | **Integer**| page size of results | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<ModelPackage>**](ModelPackage.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
<a name="listPackages"></a>
|
|
# **listPackages**
|
|
> List<ModelPackage> listPackages(owner, page, limit, type, q)
|
|
|
|
Gets all packages of an owner
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.PackageApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
PackageApi apiInstance = new PackageApi();
|
|
String owner = "owner_example"; // String | owner of the packages
|
|
Integer page = 56; // Integer | page number of results to return (1-based)
|
|
Integer limit = 56; // Integer | page size of results
|
|
String type = "type_example"; // String | package type filter
|
|
String q = "q_example"; // String | name filter
|
|
try {
|
|
List<ModelPackage> result = apiInstance.listPackages(owner, page, limit, type, q);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling PackageApi#listPackages");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the packages |
|
|
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
|
**limit** | **Integer**| page size of results | [optional]
|
|
**type** | **String**| package type filter | [optional] [enum: alpine, cargo, chef, composer, conan, conda, container, cran, debian, generic, go, helm, maven, npm, nuget, pub, pypi, rpm, rubygems, swift, terraform, vagrant]
|
|
**q** | **String**| name filter | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<ModelPackage>**](ModelPackage.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
<a name="unlinkPackage"></a>
|
|
# **unlinkPackage**
|
|
> Void unlinkPackage(owner, type, name)
|
|
|
|
Unlink a package from a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.PackageApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
PackageApi apiInstance = new PackageApi();
|
|
String owner = "owner_example"; // String | owner of the package
|
|
String type = "type_example"; // String | type of the package
|
|
String name = "name_example"; // String | name of the package
|
|
try {
|
|
Void result = apiInstance.unlinkPackage(owner, type, name);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling PackageApi#unlinkPackage");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the package |
|
|
**type** | **String**| type of the package |
|
|
**name** | **String**| name of the package |
|
|
|
|
### Return type
|
|
|
|
[**Void**](.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: Not defined
|
|
|