Skip to content

LightVolk/Dtf-Client-API

Repository files navigation

Org.OpenAPITools - the C# library for the Osnova API

Открытая документация 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 используя специальный токен со страницы настроек пользователя

  1. Зайти в свой профиль
  2. В самом низу нажать на ссылку «Инструменты для разработчика»
  3. Вы увидите токен, с которым можно обращаться к API
  4. Можно использовать этот токен для отправки запросов к 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

Frameworks supported

  • .NET 2.0

Dependencies

  • 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

Installation

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;

Getting Started

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 );
            }
        }
    }
}

Documentation for API Endpoints

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

Documentation for Models

Documentation for Authorization

XDeviceToken

  • Type: API key
  • API key parameter name: X-Device-Token
  • Location: HTTP header

About

Client API for DTF.ru (not official)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published