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 |
InlineResponse20020 GetUserPushSettings ()
Получить настройки пушей для текущего пользователя
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 );
}
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse20019 GetUserPushTopic ()
Получить topic для текущего пользователя, чтобы подписаться на пуши
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 );
}
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2008 UpdateUserPushSettings (long? settings)
Отправить на сервер настройки пушей для текущего пользователя
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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
settings | long? | Битовая маска настроек | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]