Skip to content

Latest commit

 

History

History
201 lines (145 loc) · 5.55 KB

PushApi.md

File metadata and controls

201 lines (145 loc) · 5.55 KB

Org.OpenAPITools.Api.PushApi

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

Method HTTP request Description
GetUserPushSettings GET /user/push/settings/get
GetUserPushTopic GET /user/push/topic
UpdateUserPushSettings POST /user/push/settings/update

GetUserPushSettings

InlineResponse20020 GetUserPushSettings ()

Получить настройки пушей для текущего пользователя

Example

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

namespace Example
{
    public class GetUserPushSettingsExample
    {
        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 PushApi();

            try
            {
                InlineResponse20020 result = apiInstance.GetUserPushSettings();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PushApi.GetUserPushSettings: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse20020

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]

GetUserPushTopic

InlineResponse20019 GetUserPushTopic ()

Получить topic для текущего пользователя, чтобы подписаться на пуши

Example

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

namespace Example
{
    public class GetUserPushTopicExample
    {
        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 PushApi();

            try
            {
                InlineResponse20019 result = apiInstance.GetUserPushTopic();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PushApi.GetUserPushTopic: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse20019

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]

UpdateUserPushSettings

InlineResponse2008 UpdateUserPushSettings (long? settings)

Отправить на сервер настройки пушей для текущего пользователя

Example

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

namespace Example
{
    public class UpdateUserPushSettingsExample
    {
        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 PushApi();
            var settings = 789;  // long? | Битовая маска настроек (optional) 

            try
            {
                InlineResponse2008 result = apiInstance.UpdateUserPushSettings(settings);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PushApi.UpdateUserPushSettings: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
settings long? Битовая маска настроек [optional]

Return type

InlineResponse2008

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]