All URIs are relative to http://localhost:7072/api
Method | HTTP request | Description |
---|---|---|
HttpDownloadFormatsGetAll | GET /downloadformats | |
HttpDownloadFormatsGetAllFromShared | GET /downloadformats-shared |
List<DownloadFormat> HttpDownloadFormatsGetAll (string acceptLanguage = null)
This endpoint lists all download formats in database.
using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;
namespace Example
{
public class HttpDownloadFormatsGetAllExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost:7072/api";
// Configure API key authorization: function_key
config.AddApiKey("x-functions-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-functions-key", "Bearer");
var apiInstance = new PublicDownloadFormatManagementApi(config);
var acceptLanguage = "acceptLanguage_example"; // string | The requested language of the response. If not matching it falls back to default language. (optional)
try
{
List<DownloadFormat> result = apiInstance.HttpDownloadFormatsGetAll(acceptLanguage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PublicDownloadFormatManagementApi.HttpDownloadFormatsGetAll: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<List<DownloadFormat>> response = apiInstance.HttpDownloadFormatsGetAllWithHttpInfo(acceptLanguage);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PublicDownloadFormatManagementApi.HttpDownloadFormatsGetAllWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
acceptLanguage | string | The requested language of the response. If not matching it falls back to default language. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Returns all download formats in database. | - |
401 | Unauthorized. API Key not provided. | - |
500 | Internal server error. Please contact administrator. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<DownloadFormat> HttpDownloadFormatsGetAllFromShared (string shareId, string ayPassword = null, string acceptLanguage = null)
This endpoint lists all download formats for a specific shared collections in database.Needs a valid shared collection ID to be authenticated.
using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;
namespace Example
{
public class HttpDownloadFormatsGetAllFromSharedExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost:7072/api";
var apiInstance = new PublicDownloadFormatManagementApi(config);
var shareId = "shareId_example"; // string | This share ID is like an API key. Check on validy (format, expire, collection still availabe). Otherwise StatusCode 403 (Forbidden) is returned.
var ayPassword = "ayPassword_example"; // string | If shared collection has a password, this header is mandatory. Otherwise StatusCode 403 (Forbidden) is returned. (optional)
var acceptLanguage = "acceptLanguage_example"; // string | The requested language of the response. If not matching it falls back to default language. (optional)
try
{
List<DownloadFormat> result = apiInstance.HttpDownloadFormatsGetAllFromShared(shareId, ayPassword, acceptLanguage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PublicDownloadFormatManagementApi.HttpDownloadFormatsGetAllFromShared: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<List<DownloadFormat>> response = apiInstance.HttpDownloadFormatsGetAllFromSharedWithHttpInfo(shareId, ayPassword, acceptLanguage);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PublicDownloadFormatManagementApi.HttpDownloadFormatsGetAllFromSharedWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
shareId | string | This share ID is like an API key. Check on validy (format, expire, collection still availabe). Otherwise StatusCode 403 (Forbidden) is returned. | |
ayPassword | string | If shared collection has a password, this header is mandatory. Otherwise StatusCode 403 (Forbidden) is returned. | [optional] |
acceptLanguage | string | The requested language of the response. If not matching it falls back to default language. | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Returns download formats for the shared collection in database. | - |
403 | Not enough privileges to access item. | - |
500 | Internal server error. Please contact administrator. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]