C# Класс WhatCD.Api

Provides a user-friendly interface to the WhatCD JSON API.
Home: https://github.com/frankston/WhatAPI JSON API Reference: https://github.com/WhatCD/Gazelle/wiki/JSON-API-Documentation
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GetTorrent WhatCD.Model.ActionTorrent.Torrent

Открытые методы

Метод Описание
Api ( string username, string password, bool errorOnMissingMember = false ) : System

Logs the user on to what.cd.

Dispose ( ) : void

Logs off the current session.

DownloadTorrent ( int torrentID ) : Torrent

Downloads the torrent file.

GenerateTorrentDownloadUri ( int torrentID ) : Uri

GetAnnouncements ( ) : Announcements

Gets the most recent announcements and blog posts.

GetArtist ( int artistID ) : WhatCD.Model.ActionArtist.Artist

Gets artist information.

GetArtist ( string artistName ) : WhatCD.Model.ActionArtist.Artist

Gets artist information.

GetBookmarksArtists ( ) : BookmarksArtists

Gets artist bookmarks.

GetBookmarksTorrents ( ) : BookmarksTorrents

Gets torrent bookmarks.

GetBrowse ( ISearchTorrents options ) : Browse

Searches torrents.

GetCollage ( int collageID ) : Collage

Gets information about a particular collage.

GetFlacLogScore ( string log ) : int

Determines the rip log score out of 100.

GetForumMain ( ) : ForumMain

Gets all forum categories.

GetForumViewForum ( int forumID, int page ) : ForumViewForum

Gets a page of threads from a forum.

GetForumViewThread ( int postID ) : ForumViewThread

Gets a page of forum thread posts where a specific thread exists.

GetForumViewThread ( int threadID, int page ) : ForumViewThread

Gets a specific page of forum thread posts.

GetInbox ( IInbox options ) : Inbox

Searches the contents of messages from either inbox or sentbox.

GetInboxViewConv ( int conversationID ) : InboxViewConv

Gets all messages from a conversation.

GetIndex ( ) : Index

Gets information about the current user.

GetNotifications ( int page ) : WhatCD.Model.ActionNotifications.Notifications

Gets notifications.

GetRecords ( ) : Records

Obtains the maximum uptime records for the site, tracker, and irc (hours).

GetRequest ( IGetRequest options ) : WhatCD.Model.ActionRequest.Request

Gets information about a specific request.

GetRequests ( ISearchRequests options ) : Requests

Searches requests. If no arguments are specified then the most recent requests are shown.

GetSimilarArtists ( int artistID, int limit ) : SimilarArtists

Gets similar artists. Note: the return response from the server does not conform to the standard JSON response pattern.

GetStatus ( ) : Status

Determines if the site, tracker, and irc are online.

GetSubscriptions ( bool onlyShowUnread ) : Subscriptions

Get forum scriptions.

GetTop10Tags ( int limit ) : Top10Tags

Gets the top tags.

GetTop10Torrents ( int limit ) : Top10Torrents

Gets the top torrents.

GetTop10Users ( int limit ) : Top10Users

Gets the top users.

GetTorrent ( int id ) : WhatCD.Model.ActionTorrent.Torrent

Gets information about a particular torrent.

GetTorrent ( string hash ) : WhatCD.Model.ActionTorrent.Torrent

Gets information about a particular torrent.

GetTorrentGroup ( int groupID ) : TorrentGroup

Gets a torrent group.

GetUptime ( ) : Uptime

Obtains the current site, tracker, and irc uptime (hours).

GetUser ( int userID ) : User

Gets user information.

GetUserSearch ( string searchTerm, int page ) : UserSearch

Searches for users.

SessionIsValid ( ) : bool

Verifies the current logged-on session is valid.

Приватные методы

Метод Описание
GetTorrent ( QueryBuilder builder ) : WhatCD.Model.ActionTorrent.Torrent

Gets information about a particular torrent.

Описание методов

Api() публичный Метод

Logs the user on to what.cd.
public Api ( string username, string password, bool errorOnMissingMember = false ) : System
username string What.cd username.
password string What.cd password.
errorOnMissingMember bool If set to true then the deserialization process will raise an exception if any JSON members exist that do not exist in the model data.
Результат System

Dispose() публичный Метод

Logs off the current session.
public Dispose ( ) : void
Результат void

DownloadTorrent() публичный Метод

Downloads the torrent file.
public DownloadTorrent ( int torrentID ) : Torrent
torrentID int The ID of the torrent to download. Mandatory.
Результат Torrent

GenerateTorrentDownloadUri() публичный Метод

public GenerateTorrentDownloadUri ( int torrentID ) : Uri
torrentID int
Результат System.Uri

GetAnnouncements() публичный Метод

Gets the most recent announcements and blog posts.
public GetAnnouncements ( ) : Announcements
Результат Announcements

GetArtist() публичный Метод

Gets artist information.
public GetArtist ( int artistID ) : WhatCD.Model.ActionArtist.Artist
artistID int Artist ID. Mandatory.
Результат WhatCD.Model.ActionArtist.Artist

GetArtist() публичный Метод

Gets artist information.
public GetArtist ( string artistName ) : WhatCD.Model.ActionArtist.Artist
artistName string Artist Name. Mandatory.
Результат WhatCD.Model.ActionArtist.Artist

GetBookmarksArtists() публичный Метод

Gets artist bookmarks.
public GetBookmarksArtists ( ) : BookmarksArtists
Результат BookmarksArtists

GetBookmarksTorrents() публичный Метод

Gets torrent bookmarks.
public GetBookmarksTorrents ( ) : BookmarksTorrents
Результат BookmarksTorrents

GetBrowse() публичный Метод

Searches torrents.
public GetBrowse ( ISearchTorrents options ) : Browse
options ISearchTorrents Object that inherits from ISearchTorrents.
Результат Browse

GetCollage() публичный Метод

Gets information about a particular collage.
public GetCollage ( int collageID ) : Collage
collageID int Collage ID. Mandatory.
Результат Collage

GetFlacLogScore() публичный Метод

Determines the rip log score out of 100.
public GetFlacLogScore ( string log ) : int
log string Log file contents.
Результат int

GetForumMain() публичный Метод

Gets all forum categories.
public GetForumMain ( ) : ForumMain
Результат ForumMain

GetForumViewForum() публичный Метод

Gets a page of threads from a forum.
public GetForumViewForum ( int forumID, int page ) : ForumViewForum
forumID int Forum ID. Mandatory.
page int Page number. Optional.
Результат ForumViewForum

GetForumViewThread() публичный Метод

Gets a page of forum thread posts where a specific thread exists.
public GetForumViewThread ( int postID ) : ForumViewThread
postID int Post ID. Mandatory.
Результат ForumViewThread

GetForumViewThread() публичный Метод

Gets a specific page of forum thread posts.
public GetForumViewThread ( int threadID, int page ) : ForumViewThread
threadID int Thread ID. Mandatory.
page int Page number. Optional.
Результат ForumViewThread

GetInbox() публичный Метод

Searches the contents of messages from either inbox or sentbox.
public GetInbox ( IInbox options ) : Inbox
options IInbox Object implementing the IInbox interface.
Результат Inbox

GetInboxViewConv() публичный Метод

Gets all messages from a conversation.
public GetInboxViewConv ( int conversationID ) : InboxViewConv
conversationID int Conversation ID. Mandatory.
Результат InboxViewConv

GetIndex() публичный Метод

Gets information about the current user.
public GetIndex ( ) : Index
Результат Index

GetNotifications() публичный Метод

Gets notifications.
public GetNotifications ( int page ) : WhatCD.Model.ActionNotifications.Notifications
page int Notification page number. Optional.
Результат WhatCD.Model.ActionNotifications.Notifications

GetRecords() публичный Метод

Obtains the maximum uptime records for the site, tracker, and irc (hours).
public GetRecords ( ) : Records
Результат WhatCD.Model.WhatStatus.Records

GetRequest() публичный Метод

Gets information about a specific request.
public GetRequest ( IGetRequest options ) : WhatCD.Model.ActionRequest.Request
options IGetRequest Object that inherits IGetRequest
Результат WhatCD.Model.ActionRequest.Request

GetRequests() публичный Метод

Searches requests. If no arguments are specified then the most recent requests are shown.
public GetRequests ( ISearchRequests options ) : Requests
options ISearchRequests Object that inherits ISearchRequests.
Результат Requests

GetSimilarArtists() публичный Метод

Gets similar artists. Note: the return response from the server does not conform to the standard JSON response pattern.
public GetSimilarArtists ( int artistID, int limit ) : SimilarArtists
artistID int Artist ID. Mandatory.
limit int Maximum result limit. Mandatory.
Результат WhatCD.Model.ActionSimilarArtists.SimilarArtists

GetStatus() публичный Метод

Determines if the site, tracker, and irc are online.
public GetStatus ( ) : Status
Результат WhatCD.Model.WhatStatus.Status

GetSubscriptions() публичный Метод

Get forum scriptions.
public GetSubscriptions ( bool onlyShowUnread ) : Subscriptions
onlyShowUnread bool Only show subscribed forums with unread threads. Optional.
Результат Subscriptions

GetTop10Tags() публичный Метод

Gets the top tags.
public GetTop10Tags ( int limit ) : Top10Tags
limit int Maximum result limit. Acceptable values: 10, 25, 100, and 250. Optional. Default is 25.
Результат Top10Tags

GetTop10Torrents() публичный Метод

Gets the top torrents.
public GetTop10Torrents ( int limit ) : Top10Torrents
limit int Maximum result limit. Acceptable values: 10, 25, 100, and 250. Optional. Default is 25.
Результат Top10Torrents

GetTop10Users() публичный Метод

Gets the top users.
public GetTop10Users ( int limit ) : Top10Users
limit int Maximum result limit. Acceptable values: 10, 25, 100, and 250. Optional. Default is 25.
Результат Top10Users

GetTorrent() публичный Метод

Gets information about a particular torrent.
public GetTorrent ( int id ) : WhatCD.Model.ActionTorrent.Torrent
id int ID of torrent. Mandatory.
Результат WhatCD.Model.ActionTorrent.Torrent

GetTorrent() публичный Метод

Gets information about a particular torrent.
public GetTorrent ( string hash ) : WhatCD.Model.ActionTorrent.Torrent
hash string Hash of torrent. Mandatory.
Результат WhatCD.Model.ActionTorrent.Torrent

GetTorrentGroup() публичный Метод

Gets a torrent group.
public GetTorrentGroup ( int groupID ) : TorrentGroup
groupID int Group ID. Mandatory.
Результат TorrentGroup

GetUptime() публичный Метод

Obtains the current site, tracker, and irc uptime (hours).
public GetUptime ( ) : Uptime
Результат WhatCD.Model.WhatStatus.Uptime

GetUser() публичный Метод

Gets user information.
public GetUser ( int userID ) : User
userID int User ID. Mandatory.
Результат User

GetUserSearch() публичный Метод

Searches for users.
public GetUserSearch ( string searchTerm, int page ) : UserSearch
searchTerm string String to search for. Mandatory.
page int Results page number. Optional.
Результат UserSearch

SessionIsValid() публичный Метод

Verifies the current logged-on session is valid.
public SessionIsValid ( ) : bool
Результат bool