C# Class 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
Inheritance: IDisposable
Afficher le fichier Open project: frankston/WhatAPI Class Usage Examples

Private Properties

Свойство Type Description
GetTorrent WhatCD.Model.ActionTorrent.Torrent

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
GetTorrent ( QueryBuilder builder ) : WhatCD.Model.ActionTorrent.Torrent

Gets information about a particular torrent.

Method Details

Api() public méthode

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.
Résultat System

Dispose() public méthode

Logs off the current session.
public Dispose ( ) : void
Résultat void

DownloadTorrent() public méthode

Downloads the torrent file.
public DownloadTorrent ( int torrentID ) : Torrent
torrentID int The ID of the torrent to download. Mandatory.
Résultat Torrent

GenerateTorrentDownloadUri() public méthode

public GenerateTorrentDownloadUri ( int torrentID ) : Uri
torrentID int
Résultat System.Uri

GetAnnouncements() public méthode

Gets the most recent announcements and blog posts.
public GetAnnouncements ( ) : Announcements
Résultat Announcements

GetArtist() public méthode

Gets artist information.
public GetArtist ( int artistID ) : WhatCD.Model.ActionArtist.Artist
artistID int Artist ID. Mandatory.
Résultat WhatCD.Model.ActionArtist.Artist

GetArtist() public méthode

Gets artist information.
public GetArtist ( string artistName ) : WhatCD.Model.ActionArtist.Artist
artistName string Artist Name. Mandatory.
Résultat WhatCD.Model.ActionArtist.Artist

GetBookmarksArtists() public méthode

Gets artist bookmarks.
public GetBookmarksArtists ( ) : BookmarksArtists
Résultat BookmarksArtists

GetBookmarksTorrents() public méthode

Gets torrent bookmarks.
public GetBookmarksTorrents ( ) : BookmarksTorrents
Résultat BookmarksTorrents

GetBrowse() public méthode

Searches torrents.
public GetBrowse ( ISearchTorrents options ) : Browse
options ISearchTorrents Object that inherits from ISearchTorrents.
Résultat Browse

GetCollage() public méthode

Gets information about a particular collage.
public GetCollage ( int collageID ) : Collage
collageID int Collage ID. Mandatory.
Résultat Collage

GetFlacLogScore() public méthode

Determines the rip log score out of 100.
public GetFlacLogScore ( string log ) : int
log string Log file contents.
Résultat int

GetForumMain() public méthode

Gets all forum categories.
public GetForumMain ( ) : ForumMain
Résultat ForumMain

GetForumViewForum() public méthode

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.
Résultat ForumViewForum

GetForumViewThread() public méthode

Gets a page of forum thread posts where a specific thread exists.
public GetForumViewThread ( int postID ) : ForumViewThread
postID int Post ID. Mandatory.
Résultat ForumViewThread

GetForumViewThread() public méthode

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.
Résultat ForumViewThread

GetInbox() public méthode

Searches the contents of messages from either inbox or sentbox.
public GetInbox ( IInbox options ) : Inbox
options IInbox Object implementing the IInbox interface.
Résultat Inbox

GetInboxViewConv() public méthode

Gets all messages from a conversation.
public GetInboxViewConv ( int conversationID ) : InboxViewConv
conversationID int Conversation ID. Mandatory.
Résultat InboxViewConv

GetIndex() public méthode

Gets information about the current user.
public GetIndex ( ) : Index
Résultat Index

GetNotifications() public méthode

Gets notifications.
public GetNotifications ( int page ) : WhatCD.Model.ActionNotifications.Notifications
page int Notification page number. Optional.
Résultat WhatCD.Model.ActionNotifications.Notifications

GetRecords() public méthode

Obtains the maximum uptime records for the site, tracker, and irc (hours).
public GetRecords ( ) : Records
Résultat WhatCD.Model.WhatStatus.Records

GetRequest() public méthode

Gets information about a specific request.
public GetRequest ( IGetRequest options ) : WhatCD.Model.ActionRequest.Request
options IGetRequest Object that inherits IGetRequest
Résultat WhatCD.Model.ActionRequest.Request

GetRequests() public méthode

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.
Résultat Requests

GetSimilarArtists() public méthode

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.
Résultat WhatCD.Model.ActionSimilarArtists.SimilarArtists

GetStatus() public méthode

Determines if the site, tracker, and irc are online.
public GetStatus ( ) : Status
Résultat WhatCD.Model.WhatStatus.Status

GetSubscriptions() public méthode

Get forum scriptions.
public GetSubscriptions ( bool onlyShowUnread ) : Subscriptions
onlyShowUnread bool Only show subscribed forums with unread threads. Optional.
Résultat Subscriptions

GetTop10Tags() public méthode

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.
Résultat Top10Tags

GetTop10Torrents() public méthode

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.
Résultat Top10Torrents

GetTop10Users() public méthode

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.
Résultat Top10Users

GetTorrent() public méthode

Gets information about a particular torrent.
public GetTorrent ( int id ) : WhatCD.Model.ActionTorrent.Torrent
id int ID of torrent. Mandatory.
Résultat WhatCD.Model.ActionTorrent.Torrent

GetTorrent() public méthode

Gets information about a particular torrent.
public GetTorrent ( string hash ) : WhatCD.Model.ActionTorrent.Torrent
hash string Hash of torrent. Mandatory.
Résultat WhatCD.Model.ActionTorrent.Torrent

GetTorrentGroup() public méthode

Gets a torrent group.
public GetTorrentGroup ( int groupID ) : TorrentGroup
groupID int Group ID. Mandatory.
Résultat TorrentGroup

GetUptime() public méthode

Obtains the current site, tracker, and irc uptime (hours).
public GetUptime ( ) : Uptime
Résultat WhatCD.Model.WhatStatus.Uptime

GetUser() public méthode

Gets user information.
public GetUser ( int userID ) : User
userID int User ID. Mandatory.
Résultat User

GetUserSearch() public méthode

Searches for users.
public GetUserSearch ( string searchTerm, int page ) : UserSearch
searchTerm string String to search for. Mandatory.
page int Results page number. Optional.
Résultat UserSearch

SessionIsValid() public méthode

Verifies the current logged-on session is valid.
public SessionIsValid ( ) : bool
Résultat bool