Skip to content

Latest commit

 

History

History
200 lines (156 loc) · 7.64 KB

PublicDownloadFormatManagementApi.md

File metadata and controls

200 lines (156 loc) · 7.64 KB

Agravity.Public.Api.PublicDownloadFormatManagementApi

All URIs are relative to http://localhost:7072/api

Method HTTP request Description
HttpDownloadFormatsGetAll GET /downloadformats
HttpDownloadFormatsGetAllFromShared GET /downloadformats-shared

HttpDownloadFormatsGetAll

List<DownloadFormat> HttpDownloadFormatsGetAll (string acceptLanguage = null)

This endpoint lists all download formats in database.

Example

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);
            }
        }
    }
}

Using the HttpDownloadFormatsGetAllWithHttpInfo variant

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);
}

Parameters

Name Type Description Notes
acceptLanguage string The requested language of the response. If not matching it falls back to default language. [optional]

Return type

List<DownloadFormat>

Authorization

function_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

HttpDownloadFormatsGetAllFromShared

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.

Example

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);
            }
        }
    }
}

Using the HttpDownloadFormatsGetAllFromSharedWithHttpInfo variant

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);
}

Parameters

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]

Return type

List<DownloadFormat>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]