All URIs are relative to https://api.dtf.ru/v1.6
Method | HTTP request | Description |
---|---|---|
EntryCreate | POST /entry/create | |
EntryLocate | GET /entry/locate | |
GetEntryById | GET /entry/{id} | |
GetPopularEntries | GET /entry/{id}/popular | |
LikeEntry | POST /like |
InlineResponse2002 EntryCreate (string title, string text, Object subsiteId, string attachments)
Создать запись
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class EntryCreateExample
{
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 EntryApi();
var title = title_example; // string | (optional)
var text = text_example; // string | (optional)
var subsiteId = 8.14; // Object | (optional)
var attachments = attachments_example; // string | (optional)
try
{
InlineResponse2002 result = apiInstance.EntryCreate(title, text, subsiteId, attachments);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EntryApi.EntryCreate: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
title | string | [optional] | |
text | string | [optional] | |
subsiteId | Object | [optional] | |
attachments | string | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2002 EntryLocate (string url)
Найти статью по ссылке
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class EntryLocateExample
{
public void main()
{
var apiInstance = new EntryApi();
var url = https://dtf.ru/games/22946-legendy-dwarf-fortress-saga-o-padenii-kreposti-boutmerded; // string | Ссылка на статью
try
{
InlineResponse2002 result = apiInstance.EntryLocate(url);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EntryApi.EntryLocate: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
url | string | Ссылка на статью |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2002 GetEntryById (long? id)
Получить запись по ID
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetEntryByIdExample
{
public void main()
{
var apiInstance = new EntryApi();
var id = 789; // long? |
try
{
InlineResponse2002 result = apiInstance.GetEntryById(id);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EntryApi.GetEntryById: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | long? |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2001 GetPopularEntries (long? id)
Получить популярные записи для определенной записи
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetPopularEntriesExample
{
public void main()
{
var apiInstance = new EntryApi();
var id = 789; // long? |
try
{
InlineResponse2001 result = apiInstance.GetPopularEntries(id);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EntryApi.GetPopularEntries: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | long? |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2005 LikeEntry (long? id, string type, long? sign)
Лайкнуть запись / комментарий
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class LikeEntryExample
{
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 EntryApi();
var id = 789; // long? | (optional)
var type = type_example; // string | Тип контента: * `content` - запись * `comment` - комментарий (optional)
var sign = 789; // long? | Изменить рейтинг * `-1` - Понизить * `0` - Сбросить * `1` - Повысить (optional)
try
{
InlineResponse2005 result = apiInstance.LikeEntry(id, type, sign);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EntryApi.LikeEntry: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | long? | [optional] | |
type | string | Тип контента: * `content` - запись * `comment` - комментарий | [optional] |
sign | long? | Изменить рейтинг * `-1` - Понизить * `0` - Сбросить * `1` - Повысить | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]