Открытая документация API для vc.ru, DTF и TJ ## Ограничения API ## * Не чаще 3-х запросов к API в секунду * Существуют также отдельные ограничения на отправку комментариев, лайков и др. ## Заголовки (headers) ## При запросе к API необходимо передавать поле User-agent
в формате {app_name}-app/{app_version} ({device_name}; {os_name}/{os_version}; {locale}; {screen_height}x{screen_width})
. Например: dtf-app/2.2.0 (Pixel 2; Android/9; ru; 1980x1794)
. Некоторые запросы доступны только для авторизованных пользователей (методы обозначены замком). Для этого необходимо передавать авторизационный токен X-Device-Token
в заголовку запроса. Он возвращается с сервера при авторизации. Для доступа к тестовым серверам необходимо поле Authorization
. ## Авторизация по API-токену Как авторизоваться в API используя специальный токен со страницы настроек пользователя
- Зайти в свой профиль
- В самом низу нажать на ссылку «Инструменты для разработчика»
- Вы увидите токен, с которым можно обращаться к API
- Можно использовать этот токен для отправки запросов к API от имени вашего аккаунта ## WebSocket ##
wss://dtf.ru/chan/api
,wss://vc.ru/chan/api
,wss://tjournal.ru/chan/api
- данные о лайках статей и комментариев. Модель отдельного элемента: #/components/schemas/Websocket
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.6.0
- SDK version: 1.0.0
- Build package: org.openapitools.codegen.languages.CSharpDotNet2ClientCodegen For more information, please visit https://cmtt.ru
- .NET 2.0
- Mono compiler
- Newtonsoft.Json.7.0.1
- RestSharp.Net2.1.1.11
Note: NuGet is downloaded by the mono compilation script and packages are installed with it. No dependency DLLs are bundled with this generator
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh compile-mono.sh
- [Windows] TODO
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class Example
{
public void main()
{
var apiInstance = new AuthApi();
var login = login_example; // string | (optional)
var password = password_example; // string | (optional)
try
{
InlineResponse200 result = apiInstance.AuthLogin(login, password);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AuthApi.AuthLogin: " + e.Message );
}
}
}
}
All URIs are relative to https://api.dtf.ru/v1.6
Class | Method | HTTP request | Description |
---|---|---|---|
AuthApi | AuthLogin | POST /auth/login | |
AuthApi | AuthQr | POST /auth/qr | |
AuthApi | AuthSocial | POST /auth/social/{type} | |
BlacklistApi | ContentMute | POST /content/mute | |
BlacklistApi | HashtagMute | POST /hashtag/mute | |
BlacklistApi | SubsitegMute | POST /subsite/mute | |
CommentApi | CommentEdit | POST /comment/edit/{commentId}/{entryId} | |
CommentApi | CommentSaveCommentsSeenCount | POST /comment/saveCommentsSeenCount | |
CommentApi | CommentSend | POST /comment/add | |
CommentApi | GetCommentLikes | GET /comment/likers/{id} | |
CommentApi | GetEntryComments | GET /entry/{id}/comments/{sorting} | |
CommentApi | GetEntryCommentsLevelsGet | GET /entry/{id}/comments/levels/{sorting} | |
CommentApi | GetEntryCommentsLevelsPost | POST /entry/{id}/comments/levels/{sorting} | |
CommentApi | GetEntryCommentsThread | GET /entry/{entryId}/comments/thread/{commentId} | |
CommentApi | LikeEntry | POST /like | |
EntryApi | EntryCreate | POST /entry/create | |
EntryApi | EntryLocate | GET /entry/locate | |
EntryApi | GetEntryById | GET /entry/{id} | |
EntryApi | GetPopularEntries | GET /entry/{id}/popular | |
EntryApi | LikeEntry | POST /like | |
LayoutApi | GetLayout | GET /layout/{version} | |
LayoutApi | GetLayoutHashtag | GET /layout/hashtag/{hashtag} | |
OtherApi | EntryCommentComplaint | POST /entry/comment/complaint | |
OtherApi | EntryComplaint | POST /entry/complaint | |
OtherApi | Locate | GET /locate | |
OtherApi | Search | GET /search | |
PaymentsApi | PaymentsCheck | GET /payments/check | |
PushApi | GetUserPushSettings | GET /user/push/settings/get | |
PushApi | GetUserPushTopic | GET /user/push/topic | |
PushApi | UpdateUserPushSettings | POST /user/push/settings/update | |
SubsiteApi | GetSubsite | GET /subsite/{id} | |
SubsiteApi | GetSubsiteTimeline | GET /subsite/{id}/timeline/{sorting} | |
SubsiteApi | GetSubsiteVacancies | GET /subsite/{subsite_id}/vacancies | |
SubsiteApi | GetSubsiteVacanciesMore | GET /subsite/{subsite_id}/vacancies/more/{last_id} | |
SubsiteApi | GetSubsitesList | GET /subsites_list/{type} | |
SubsiteApi | SubsiteSubscribe | GET /subsite/{id}/subscribe | |
SubsiteApi | SubsiteUnsubscribe | GET /subsite/{id}/unsubscribe | |
TimelineApi | GetFlashholder | GET /getflashholdedentry | |
TimelineApi | GetTimeline | GET /timeline/{category}/{sorting} | |
TimelineApi | GetTimelineByHashtag | GET /timeline/mainpage | |
TimelineApi | GetTimelineNews | GET /news/default/recent | |
TweetsApi | GetTweets | GET /tweets/{mode} | |
UploadApi | UploaderExtract | POST /uploader/extract | |
UploadApi | UploaderUpload | POST /uploader/upload | |
UserApi | FavoriteAdd | POST /user/me/favorites | |
UserApi | FavoriteRemove | POST /user/me/favorites/remove | |
UserApi | GetUser | GET /user/{id} | |
UserApi | GetUserComments | GET /user/{id}/comments | |
UserApi | GetUserEntries | GET /user/{id}/entries | |
UserApi | GetUserFavoritesComments | GET /user/{id}/favorites/comments | |
UserApi | GetUserFavoritesEntries | GET /user/{id}/favorites/entries | |
UserApi | GetUserFavoritesVacancies | GET /user/{id}/favorites/vacancies | |
UserApi | GetUserMe | GET /user/me | |
UserApi | GetUserMeComments | GET /user/me/comments | |
UserApi | GetUserMeEntries | GET /user/me/entries | |
UserApi | GetUserMeFavoritesComments | GET /user/me/favorites/comments | |
UserApi | GetUserMeFavoritesEntries | GET /user/me/favorites/entries | |
UserApi | GetUserMeFavoritesVacancies | GET /user/me/favorites/vacancies | |
UserApi | GetUserMeSubscriptionsRecommended | GET /user/me/subscriptions/recommended | |
UserApi | GetUserMeSubscriptionsSubscribed | GET /user/me/subscriptions/subscribed | |
UserApi | GetUserMeTuneCatalog | GET /user/me/tunecatalog | |
UserApi | GetUserMeUpdates | GET /user/me/updates | |
UserApi | GetUserMeUpdatesCount | GET /user/me/updates/count | |
UserApi | UserMeTuneCatalog | POST /user/me/tunecatalog | |
UserApi | UserMeUpdatesRead | POST /user/me/updates/read | |
UserApi | UserMeUpdatesReadId | POST /user/me/updates/read/{id} | |
VacanciesApi | GetJob | GET /job | |
VacanciesApi | GetJobFilters | GET /job/filters | |
VacanciesApi | GetJobMore | GET /job/more/{last_id} | |
VacanciesApi | GetVacancies | GET /vacancies/widget | |
WebhooksSubscriptionsApi | ApiWebhookAdd | POST /webhooks/add | |
WebhooksSubscriptionsApi | ApiWebhookDel | POST /webhooks/del | |
WebhooksSubscriptionsApi | ApiWebhooksGet | GET /webhooks/get | |
WidgetsApi | GetRates | GET /rates |
- Org.OpenAPITools.Model.APIErrorResponse
- Org.OpenAPITools.Model.APIResponse
- Org.OpenAPITools.Model.APIResponseData
- Org.OpenAPITools.Model.APISuccessResponse
- Org.OpenAPITools.Model.AdditionalData
- Org.OpenAPITools.Model.AdvancedAccess
- Org.OpenAPITools.Model.AdvancedAccessActions
- Org.OpenAPITools.Model.Attach
- Org.OpenAPITools.Model.AttachImage
- Org.OpenAPITools.Model.Author
- Org.OpenAPITools.Model.Badge
- Org.OpenAPITools.Model.Comment
- Org.OpenAPITools.Model.CommentsLoadMore
- Org.OpenAPITools.Model.Company
- Org.OpenAPITools.Model.Counters
- Org.OpenAPITools.Model.Cover
- Org.OpenAPITools.Model.CoverUser
- Org.OpenAPITools.Model.Entry
- Org.OpenAPITools.Model.EntryContent
- Org.OpenAPITools.Model.EntryLayout
- Org.OpenAPITools.Model.Hashtag
- Org.OpenAPITools.Model.InlineResponse200
- Org.OpenAPITools.Model.InlineResponse2001
- Org.OpenAPITools.Model.InlineResponse20010
- Org.OpenAPITools.Model.InlineResponse20010Result
- Org.OpenAPITools.Model.InlineResponse20011
- Org.OpenAPITools.Model.InlineResponse20012
- Org.OpenAPITools.Model.InlineResponse20013
- Org.OpenAPITools.Model.InlineResponse20014
- Org.OpenAPITools.Model.InlineResponse20014Result
- Org.OpenAPITools.Model.InlineResponse20015
- Org.OpenAPITools.Model.InlineResponse20016
- Org.OpenAPITools.Model.InlineResponse20017
- Org.OpenAPITools.Model.InlineResponse20017Result
- Org.OpenAPITools.Model.InlineResponse20018
- Org.OpenAPITools.Model.InlineResponse20019
- Org.OpenAPITools.Model.InlineResponse2002
- Org.OpenAPITools.Model.InlineResponse20020
- Org.OpenAPITools.Model.InlineResponse20021
- Org.OpenAPITools.Model.InlineResponse20022
- Org.OpenAPITools.Model.InlineResponse20023
- Org.OpenAPITools.Model.InlineResponse20024
- Org.OpenAPITools.Model.InlineResponse20024Result
- Org.OpenAPITools.Model.InlineResponse20025
- Org.OpenAPITools.Model.InlineResponse20026
- Org.OpenAPITools.Model.InlineResponse20026Result
- Org.OpenAPITools.Model.InlineResponse20027
- Org.OpenAPITools.Model.InlineResponse20028
- Org.OpenAPITools.Model.InlineResponse20029
- Org.OpenAPITools.Model.InlineResponse2003
- Org.OpenAPITools.Model.InlineResponse20030
- Org.OpenAPITools.Model.InlineResponse20030Result
- Org.OpenAPITools.Model.InlineResponse2004
- Org.OpenAPITools.Model.InlineResponse2004Result
- Org.OpenAPITools.Model.InlineResponse2005
- Org.OpenAPITools.Model.InlineResponse2006
- Org.OpenAPITools.Model.InlineResponse2007
- Org.OpenAPITools.Model.InlineResponse2008
- Org.OpenAPITools.Model.InlineResponse2009
- Org.OpenAPITools.Model.InlineResponse405
- Org.OpenAPITools.Model.InlineResponse405Error
- Org.OpenAPITools.Model.JobFilter
- Org.OpenAPITools.Model.Liker
- Org.OpenAPITools.Model.Likes
- Org.OpenAPITools.Model.Medium
- Org.OpenAPITools.Model.Notification
- Org.OpenAPITools.Model.Rate
- Org.OpenAPITools.Model.Rates
- Org.OpenAPITools.Model.Similar
- Org.OpenAPITools.Model.Size
- Org.OpenAPITools.Model.SocialAccount
- Org.OpenAPITools.Model.Subscription
- Org.OpenAPITools.Model.Subsite
- Org.OpenAPITools.Model.SubsiteCover
- Org.OpenAPITools.Model.Tweet
- Org.OpenAPITools.Model.TweetMedium
- Org.OpenAPITools.Model.TweetUser
- Org.OpenAPITools.Model.User
- Org.OpenAPITools.Model.Vacancy
- Org.OpenAPITools.Model.Watcher
- Org.OpenAPITools.Model.Websocket
- Type: API key
- API key parameter name: X-Device-Token
- Location: HTTP header