Skip to content

Latest commit

 

History

History
207 lines (150 loc) · 5.96 KB

WebhooksSubscriptionsApi.md

File metadata and controls

207 lines (150 loc) · 5.96 KB

Org.OpenAPITools.Api.WebhooksSubscriptionsApi

All URIs are relative to https://api.dtf.ru/v1.6

Method HTTP request Description
ApiWebhookAdd POST /webhooks/add
ApiWebhookDel POST /webhooks/del
ApiWebhooksGet GET /webhooks/get

ApiWebhookAdd

InlineResponse20028 ApiWebhookAdd (string url, string _event)

Подписаться на событие

Example

using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class ApiWebhookAddExample
    {
        public void main()
        {
            
            // Configure API key authorization: XDeviceToken
            Configuration.Default.ApiKey.Add("X-Device-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Device-Token", "Bearer");

            var apiInstance = new WebhooksSubscriptionsApi();
            var url = url_example;  // string | Ссылка на которую будут отправлены данные по событию (optional) 
            var _event = _event_example;  // string | Название события (optional) 

            try
            {
                InlineResponse20028 result = apiInstance.ApiWebhookAdd(url, _event);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksSubscriptionsApi.ApiWebhookAdd: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
url string Ссылка на которую будут отправлены данные по событию [optional]
_event string Название события [optional]

Return type

InlineResponse20028

Authorization

XDeviceToken

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApiWebhookDel

InlineResponse20029 ApiWebhookDel (string _event)

Удаление подписки на событие

Example

using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class ApiWebhookDelExample
    {
        public void main()
        {
            
            // Configure API key authorization: XDeviceToken
            Configuration.Default.ApiKey.Add("X-Device-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Device-Token", "Bearer");

            var apiInstance = new WebhooksSubscriptionsApi();
            var _event = _event_example;  // string | Название события (optional) 

            try
            {
                InlineResponse20029 result = apiInstance.ApiWebhookDel(_event);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksSubscriptionsApi.ApiWebhookDel: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
_event string Название события [optional]

Return type

InlineResponse20029

Authorization

XDeviceToken

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApiWebhooksGet

InlineResponse20027 ApiWebhooksGet ()

Получить события на которые подписан пользователь

Example

using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class ApiWebhooksGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: XDeviceToken
            Configuration.Default.ApiKey.Add("X-Device-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Device-Token", "Bearer");

            var apiInstance = new WebhooksSubscriptionsApi();

            try
            {
                InlineResponse20027 result = apiInstance.ApiWebhooksGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksSubscriptionsApi.ApiWebhooksGet: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse20027

Authorization

XDeviceToken

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]