Documentation ¶
Overview ¶
Package whatapi is a wrapper for the What.CD JSON API (https://github.com/WhatCD/Gazelle/wiki/JSON-API-Documentation).
Index ¶
- func GroupString(g Group) string
- func ReleaseTypeString(r int) string
- func TorrentString(t Torrent) string
- type Account
- type AccountResponse
- type Announcements
- type AnnouncementsResponse
- type Artist
- type ArtistAlias
- type ArtistBookmarks
- type ArtistBookmarksResponse
- type ArtistGroupStruct
- func (g ArtistGroupStruct) Artist() string
- func (g ArtistGroupStruct) Artists() []string
- func (g ArtistGroupStruct) CatalogueNumber() string
- func (g ArtistGroupStruct) ID() int
- func (g ArtistGroupStruct) Importance() []int
- func (g ArtistGroupStruct) Name() string
- func (g ArtistGroupStruct) RecordLabel() string
- func (g ArtistGroupStruct) ReleaseType() int
- func (g ArtistGroupStruct) String() string
- func (g ArtistGroupStruct) Tags() []string
- func (g ArtistGroupStruct) Year() int
- type ArtistID
- type ArtistResponse
- type ArtistTorrentStruct
- func (t ArtistTorrentStruct) Encoding() string
- func (t ArtistTorrentStruct) FileCount() int
- func (t ArtistTorrentStruct) FileSize() int64
- func (t ArtistTorrentStruct) Format() string
- func (t ArtistTorrentStruct) GroupID() int
- func (t ArtistTorrentStruct) HasLog() bool
- func (t ArtistTorrentStruct) ID() int
- func (t ArtistTorrentStruct) Media() string
- func (t ArtistTorrentStruct) RemasterRecordLabel() string
- func (t ArtistTorrentStruct) RemasterTitle() string
- func (t ArtistTorrentStruct) RemasterYear() int
- func (t ArtistTorrentStruct) Remastered() bool
- func (t ArtistTorrentStruct) Scene() bool
- func (t ArtistTorrentStruct) String() string
- type Categories
- type CategoriesResponse
- type Client
- type ClientStruct
- func (w ClientStruct) Client() *http.Client
- func (w ClientStruct) CreateDownloadURL(id int) (string, error)
- func (w ClientStruct) CreateUploadURL() (u url.URL, a string, err error)
- func (w ClientStruct) Do(action string, params url.Values, result interface{}) error
- func (w *ClientStruct) GetAccount() error
- func (w *ClientStruct) GetAnnouncements() (Announcements, error)
- func (w *ClientStruct) GetArtist(id int, params url.Values) (Artist, error)
- func (w *ClientStruct) GetArtistBookmarks() (ArtistBookmarks, error)
- func (w *ClientStruct) GetCategories() (Categories, error)
- func (w *ClientStruct) GetConversation(id int) (Conversation, error)
- func (w *ClientStruct) GetForum(id int, params url.Values) (Forum, error)
- func (w *ClientStruct) GetJSON(requestURL string, responseObj interface{}) (err error)
- func (w *ClientStruct) GetMailbox(params url.Values) (Mailbox, error)
- func (w *ClientStruct) GetNotifications(params url.Values) (Notifications, error)
- func (w *ClientStruct) GetRequest(id int, params url.Values) (Request, error)
- func (w *ClientStruct) GetSimilarArtists(id, limit int) (SimilarArtists, error)
- func (w *ClientStruct) GetSubscriptions(params url.Values) (Subscriptions, error)
- func (w *ClientStruct) GetThread(id int, params url.Values) (Thread, error)
- func (w *ClientStruct) GetTopTenTags(params url.Values) (TopTenTags, error)
- func (w *ClientStruct) GetTopTenTorrents(params url.Values) (TopTenTorrents, error)
- func (w *ClientStruct) GetTopTenUsers(params url.Values) (TopTenUsers, error)
- func (w *ClientStruct) GetTorrent(id int, params url.Values) (GetTorrentStruct, error)
- func (w *ClientStruct) GetTorrentBookmarks() (TorrentBookmarks, error)
- func (w *ClientStruct) GetTorrentGroup(id int, params url.Values) (TorrentGroup, error)
- func (w *ClientStruct) Login(username, password string) error
- func (w *ClientStruct) Logout() error
- func (w *ClientStruct) SearchRequests(searchStr string, params url.Values) (RequestsSearch, error)
- func (w *ClientStruct) SearchTorrents(searchStr string, params url.Values) (TorrentSearch, error)
- func (w *ClientStruct) SearchUsers(searchStr string, params url.Values) (UserSearch, error)
- type Conversation
- type ConversationResponse
- type ExtendedArtistMap
- type FileStruct
- type Forum
- type ForumResponse
- type GenericResponse
- type GetTorrentStruct
- type Group
- type GroupExt
- type GroupRelease
- type GroupStruct
- func (g GroupStruct) Artist() string
- func (g GroupStruct) Artists() []string
- func (g GroupStruct) CatalogueNumber() string
- func (g GroupStruct) ID() int
- func (g GroupStruct) Importance() []int
- func (g GroupStruct) Name() string
- func (g GroupStruct) RecordLabel() string
- func (g GroupStruct) ReleaseType() int
- func (g GroupStruct) String() string
- func (g GroupStruct) Tags() []string
- func (g GroupStruct) WikiBody() string
- func (g GroupStruct) WikiImage() string
- func (g GroupStruct) Year() int
- type Mailbox
- type MailboxResponse
- type MusicInfo
- type MusicInfoStruct
- type Notifications
- type NotificationsResponse
- type PSList
- type Request
- type RequestResponse
- type RequestsSearch
- type RequestsSearchResponse
- type SearchTorrentStruct
- func (ts SearchTorrentStruct) Encoding() string
- func (ts SearchTorrentStruct) FileCount() int
- func (ts SearchTorrentStruct) FileSize() int64
- func (ts SearchTorrentStruct) Format() string
- func (ts SearchTorrentStruct) HasLog() bool
- func (ts SearchTorrentStruct) ID() int
- func (ts SearchTorrentStruct) Media() string
- func (ts SearchTorrentStruct) RemasterCatalogueNumber() string
- func (ts SearchTorrentStruct) RemasterTitle() string
- func (ts SearchTorrentStruct) RemasterYear() int
- func (ts SearchTorrentStruct) Remastered() bool
- func (ts SearchTorrentStruct) Scene() bool
- func (ts SearchTorrentStruct) String() string
- type SimilarArtists
- type Subscriptions
- type SubscriptionsResponse
- type Thread
- type ThreadResponse
- type TopTenResult
- type TopTenTags
- type TopTenTagsResponse
- type TopTenTorrents
- type TopTenTorrentsResponse
- type TopTenUsers
- type TopTenUsersResponse
- type Torrent
- type TorrentBookmarks
- type TorrentBookmarksResponse
- type TorrentCatalogueNumber
- type TorrentExt
- type TorrentFiles
- type TorrentGroup
- type TorrentGroupResponse
- type TorrentRecordLabel
- type TorrentResponse
- type TorrentSearch
- type TorrentSearchResponse
- type TorrentSearchResultStruct
- func (ts TorrentSearchResultStruct) Artist() string
- func (ts TorrentSearchResultStruct) ID() int
- func (ts TorrentSearchResultStruct) Name() string
- func (ts TorrentSearchResultStruct) ReleaseType() int
- func (ts TorrentSearchResultStruct) String() string
- func (ts TorrentSearchResultStruct) Tags() []string
- func (ts TorrentSearchResultStruct) Year() int
- type TorrentStruct
- func (t TorrentStruct) Description() string
- func (t TorrentStruct) Encoding() string
- func (t TorrentStruct) FileCount() int
- func (t TorrentStruct) FilePath() string
- func (t TorrentStruct) FileSize() int64
- func (t *TorrentStruct) Files() ([]FileStruct, error)
- func (t TorrentStruct) Format() string
- func (t TorrentStruct) HasLog() bool
- func (t TorrentStruct) ID() int
- func (t TorrentStruct) Media() string
- func (t TorrentStruct) ParseFileList() ([]FileStruct, error)
- func (t TorrentStruct) RemasterCatalogueNumber() string
- func (t TorrentStruct) RemasterRecordLabel() string
- func (t TorrentStruct) RemasterTitle() string
- func (t TorrentStruct) RemasterYear() int
- func (t TorrentStruct) Remastered() bool
- func (t TorrentStruct) Scene() bool
- func (t TorrentStruct) String() string
- type User
- type UserResponse
- type UserSearch
- type UserSearchResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupString ¶
func ReleaseTypeString ¶
func TorrentString ¶
Types ¶
type Account ¶
type Account struct { Username string `json:"username"` ID int `json:"id"` AuthKey string `json:"authKey"` PassKey string `json:"passKey"` Notifications struct { Messages int `json:"messages"` Notifications int `json:"notifications"` NewAnnouncment bool `json:"newAnnouncment"` NewBlog bool `json:"newBlog"` } `json:"notifications"` UserStats struct { Uploaded int64 `json:"uploaded"` Downloaded int64 `json:"downloaded"` Ratio float64 `json:"ratio"` RequiredRatio float64 `json:"requiredRatio"` Class string `json:"class"` } `json:"userstats"` }
type AccountResponse ¶
type Announcements ¶
type Announcements struct { Announcements []struct { NewsID int `json:"newsId"` Title string `json:"title"` BbBody string `json:"bbBody"` Body string `json:"body"` NewsTime string `json:"newsTime"` } `json:"announcements"` BlogPosts []struct { BlogID int `json:"blogId"` Author string `json:"author"` Title string `json:"title"` BbBody string `json:"bbBody"` Body string `json:"body"` BlogTime string `json:"blogTime"` ThreadID int `json:"threadId"` } `json:"blogPosts"` }
type AnnouncementsResponse ¶
type AnnouncementsResponse struct { Status string `json:"status"` Error string `json:"error"` Response Announcements `json:"response"` }
type Artist ¶
type Artist struct { ID int `json:"id"` NameF string `json:"name"` NotificationsEnabled bool `json:"notificationsEnabled"` HasBookmarked bool `json:"hasBookmarked"` Image string `json:"image"` Body string `json:"body"` VanityHouse bool `json:"vanityHouse"` Tags []struct { Name string `json:"name"` Count int `json:"count"` } `json:"tags"` SimilarArtists []struct { ArtistID int `json:"artistId"` Name string `json:"name"` Score int `json:"score"` SimilarID int `json:"similarId"` } `json:"similarArtists"` Statistics struct { NumGroups int `json:"numGroups"` NumTorrents int `json:"numTorrents"` NumSeeders int `json:"numSeeders"` NumLeechers int `json:"numLeechers"` NumSnatches int `json:"numSnatches"` } `json:"statistics"` TorrentGroup []ArtistGroupStruct `json:"torrentgroup"` Requests []struct { RequestID int `json:"requestId"` CategoryID int `json:"categoryId"` Title string `json:"title"` Year int `json:"year"` TimeAdded string `json:"timeAdded"` Votes int `json:"votes"` Bounty int64 `json:"bounty"` } `json:"requests"` }
type ArtistAlias ¶ added in v0.0.5
type ArtistBookmarks ¶
type ArtistBookmarks struct {
Artists []ArtistID `json:"artists"`
}
type ArtistBookmarksResponse ¶
type ArtistBookmarksResponse struct { Status string `json:"status"` Error string `json:"error"` Response ArtistBookmarks `json:"response"` }
type ArtistGroupStruct ¶
type ArtistGroupStruct struct { GroupID int `json:"groupId"` GroupYearF int `json:"groupYear"` GroupRecordLabelF string `json:"groupRecordLabel"` GroupCatalogueNumberF string `json:"groupCatalogueNumber"` GroupCategoryID string `json:"groupCategoryID"` TagsF []string `json:"tags"` ReleaseTypeF int `json:"releaseType"` GroupVanityHouse bool `json:"groupVanityHouse"` HasBookmarked bool `json:"hasBookmarked"` Torrent []ArtistTorrentStruct `json:"torrent"` GroupNameF string `json:"groupName"` ArtistsF []ArtistAlias `json:"artists"` ExtendedArtists ExtendedArtistMap `json:"extendedArtists"` WikiImage string `json:"wikiImage"` // contains filtered or unexported fields }
func (ArtistGroupStruct) Artist ¶
func (g ArtistGroupStruct) Artist() string
func (ArtistGroupStruct) Artists ¶
func (g ArtistGroupStruct) Artists() []string
func (ArtistGroupStruct) CatalogueNumber ¶
func (g ArtistGroupStruct) CatalogueNumber() string
func (ArtistGroupStruct) ID ¶
func (g ArtistGroupStruct) ID() int
func (ArtistGroupStruct) Importance ¶
func (g ArtistGroupStruct) Importance() []int
func (ArtistGroupStruct) Name ¶
func (g ArtistGroupStruct) Name() string
func (ArtistGroupStruct) RecordLabel ¶
func (g ArtistGroupStruct) RecordLabel() string
func (ArtistGroupStruct) ReleaseType ¶
func (g ArtistGroupStruct) ReleaseType() int
func (ArtistGroupStruct) String ¶
func (g ArtistGroupStruct) String() string
func (ArtistGroupStruct) Tags ¶
func (g ArtistGroupStruct) Tags() []string
func (ArtistGroupStruct) Year ¶
func (g ArtistGroupStruct) Year() int
type ArtistResponse ¶
type ArtistTorrentStruct ¶
type ArtistTorrentStruct struct { IDF int `json:"id"` GroupIDF int `json:"groupId"` MediaF string `json:"media"` FormatF string `json:"format"` EncodingF string `json:"encoding"` RemasterYearF int `json:"remasterYear"` RemasteredF bool `json:"remastered"` RemasterTitleF string `json:"remasterTitle"` RemasterRecordLabelF string `json:"remasterRecordLabel"` SceneF bool `json:"scene"` HasLogF bool `json:"hasLog"` HasCue bool `json:"hasCue"` LogScore int `json:"logScore"` FileCountF int `json:"fileCount"` FreeTorrent bool `json:"freeTorrent"` Size int64 `json:"size"` Leechers int `json:"leechers"` Seeders int `json:"seeders"` Snatched int `json:"snatched"` Time string `json:"time"` HasFile int `json:"hasFile"` }
func (ArtistTorrentStruct) Encoding ¶
func (t ArtistTorrentStruct) Encoding() string
func (ArtistTorrentStruct) FileCount ¶
func (t ArtistTorrentStruct) FileCount() int
func (ArtistTorrentStruct) FileSize ¶
func (t ArtistTorrentStruct) FileSize() int64
func (ArtistTorrentStruct) Format ¶
func (t ArtistTorrentStruct) Format() string
func (ArtistTorrentStruct) GroupID ¶
func (t ArtistTorrentStruct) GroupID() int
func (ArtistTorrentStruct) HasLog ¶
func (t ArtistTorrentStruct) HasLog() bool
func (ArtistTorrentStruct) ID ¶
func (t ArtistTorrentStruct) ID() int
func (ArtistTorrentStruct) Media ¶
func (t ArtistTorrentStruct) Media() string
func (ArtistTorrentStruct) RemasterRecordLabel ¶
func (t ArtistTorrentStruct) RemasterRecordLabel() string
func (ArtistTorrentStruct) RemasterTitle ¶
func (t ArtistTorrentStruct) RemasterTitle() string
func (ArtistTorrentStruct) RemasterYear ¶
func (t ArtistTorrentStruct) RemasterYear() int
func (ArtistTorrentStruct) Remastered ¶
func (t ArtistTorrentStruct) Remastered() bool
func (ArtistTorrentStruct) Scene ¶
func (t ArtistTorrentStruct) Scene() bool
func (ArtistTorrentStruct) String ¶
func (t ArtistTorrentStruct) String() string
type Categories ¶
type Categories struct { Categories []struct { CategoryID int `json:"categoryId"` CategoryName string `json:"categoryName"` Forums []struct { ForumID int `json:"forumId"` ForumName string `json:"forumName"` ForumDescription string `json:"forumDescription"` NumTopics int `json:"numTopics"` NumPosts int `json:"numPosts"` LastPostID int `json:"lastPostId"` LastAuthorID int `json:"lastAuthorId"` LastPostAuthorName string `json:"lastPostAuthorName"` LastTopicID int `json:"lastTopicId"` LastTime string `json:"lastTime"` SpecificRules []string `json:"specificRules"` LastTopic string `json:"lastTopic"` Read bool `json:"read"` Locked bool `json:"locked"` Sticky bool `json:"sticky"` } `json:"forums"` } `json:"categories"` }
type CategoriesResponse ¶
type CategoriesResponse struct { Status string `json:"status"` Error string `json:"error"` Response Categories `json:"response"` }
type Client ¶ added in v0.3.0
type Client interface { GetJSON(requestURL string, responseObj interface{}) error Do(action string, params url.Values, result interface{}) error CreateDownloadURL(id int) (string, error) CreateUploadURL() (url.URL, string, error) Login(username, password string) error Logout() error GetAccount() error GetMailbox(params url.Values) (Mailbox, error) GetConversation(id int) (Conversation, error) GetNotifications(params url.Values) (Notifications, error) GetAnnouncements() (Announcements, error) GetSubscriptions(params url.Values) (Subscriptions, error) GetCategories() (Categories, error) GetForum(id int, params url.Values) (Forum, error) GetThread(id int, params url.Values) (Thread, error) GetArtistBookmarks() (ArtistBookmarks, error) GetTorrentBookmarks() (TorrentBookmarks, error) GetArtist(id int, params url.Values) (Artist, error) GetRequest(id int, params url.Values) (Request, error) GetTorrent(id int, params url.Values) (GetTorrentStruct, error) GetTorrentGroup(id int, params url.Values) (TorrentGroup, error) SearchTorrents(searchStr string, params url.Values) (TorrentSearch, error) SearchRequests(searchStr string, params url.Values) (RequestsSearch, error) SearchUsers(searchStr string, params url.Values) (UserSearch, error) GetTopTenTorrents(params url.Values) (TopTenTorrents, error) GetTopTenTags(params url.Values) (TopTenTags, error) GetTopTenUsers(params url.Values) (TopTenUsers, error) GetSimilarArtists(id, limit int) (SimilarArtists, error) }
Client represents a client for the What.CD API.
type ClientStruct ¶ added in v0.3.0
type ClientStruct struct {
// contains filtered or unexported fields
}
ClientStruct represents a client for the What.CD API.
func (ClientStruct) Client ¶ added in v0.3.0
func (w ClientStruct) Client() *http.Client
Client gets the http client for low level requests
func (ClientStruct) CreateDownloadURL ¶ added in v0.3.0
func (w ClientStruct) CreateDownloadURL(id int) (string, error)
CreateDownloadURL constructs a download URL using the provided torrent id.
func (ClientStruct) CreateUploadURL ¶ added in v0.3.0
func (w ClientStruct) CreateUploadURL() (u url.URL, a string, err error)
CreateUploadURL constructs an upload URL for this tracker, and returns the url and autheky
func (ClientStruct) Do ¶ added in v0.3.0
func (w ClientStruct) Do(action string, params url.Values, result interface{}) error
func (*ClientStruct) GetAccount ¶ added in v0.3.0
func (w *ClientStruct) GetAccount() error
GetAccount retrieves account information for the current user.
func (*ClientStruct) GetAnnouncements ¶ added in v0.3.0
func (w *ClientStruct) GetAnnouncements() (Announcements, error)
GetAnnouncements retrieves announcement information.
func (*ClientStruct) GetArtist ¶ added in v0.3.0
GetArtist retrieves artist information using the provided artist id and parameters.
func (*ClientStruct) GetArtistBookmarks ¶ added in v0.3.0
func (w *ClientStruct) GetArtistBookmarks() (ArtistBookmarks, error)
GetArtistBookmarks retrieves artist bookmark information for the current user.
func (*ClientStruct) GetCategories ¶ added in v0.3.0
func (w *ClientStruct) GetCategories() (Categories, error)
GetCategories retrieves forum category information.
func (*ClientStruct) GetConversation ¶ added in v0.3.0
func (w *ClientStruct) GetConversation(id int) (Conversation, error)
GetConversation retrieves conversation information for the current user using the provided conversation id and parameters.
func (*ClientStruct) GetForum ¶ added in v0.3.0
GetForum retrieves forum information using the provided forum id and parameters.
func (*ClientStruct) GetJSON ¶ added in v0.3.0
func (w *ClientStruct) GetJSON(requestURL string, responseObj interface{}) (err error)
GetJSON sends a HTTP GET request to the API and decodes the JSON response into responseObj.
func (*ClientStruct) GetMailbox ¶ added in v0.3.0
func (w *ClientStruct) GetMailbox(params url.Values) (Mailbox, error)
GetMailbox retrieves mailbox information for the current user using the provided parameters.
func (*ClientStruct) GetNotifications ¶ added in v0.3.0
func (w *ClientStruct) GetNotifications(params url.Values) (Notifications, error)
GetNotifications retrieves notification information using the specifed parameters.
func (*ClientStruct) GetRequest ¶ added in v0.3.0
GetRequest retrieves request information using the provided request id and parameters.
func (*ClientStruct) GetSimilarArtists ¶ added in v0.3.0
func (w *ClientStruct) GetSimilarArtists(id, limit int) (SimilarArtists, error)
GetSimilarArtists retrieves similar artist information using the provided artist id and limit.
func (*ClientStruct) GetSubscriptions ¶ added in v0.3.0
func (w *ClientStruct) GetSubscriptions(params url.Values) (Subscriptions, error)
GetSubscriptions retrieves forum subscription information for the current user using the provided parameters.
func (*ClientStruct) GetThread ¶ added in v0.3.0
GetThread retrieves forum thread information using the provided thread id and parameters.
func (*ClientStruct) GetTopTenTags ¶ added in v0.3.0
func (w *ClientStruct) GetTopTenTags(params url.Values) (TopTenTags, error)
GetTopTenTags retrieves "top ten tags" information using the provided parameters.
func (*ClientStruct) GetTopTenTorrents ¶ added in v0.3.0
func (w *ClientStruct) GetTopTenTorrents(params url.Values) (TopTenTorrents, error)
GetTopTenTorrents retrieves "top ten torrents" information using the provided parameters.
func (*ClientStruct) GetTopTenUsers ¶ added in v0.3.0
func (w *ClientStruct) GetTopTenUsers(params url.Values) (TopTenUsers, error)
GetTopTenUsers retrieves "top tem users" information using the provided parameters.
func (*ClientStruct) GetTorrent ¶ added in v0.3.0
func (w *ClientStruct) GetTorrent(id int, params url.Values) (GetTorrentStruct, error)
GetTorrent retrieves torrent information using the provided torrent id and parameters.
func (*ClientStruct) GetTorrentBookmarks ¶ added in v0.3.0
func (w *ClientStruct) GetTorrentBookmarks() (TorrentBookmarks, error)
GetTorrentBookmarks retrieves torrent bookmark information for the current user.
func (*ClientStruct) GetTorrentGroup ¶ added in v0.3.0
func (w *ClientStruct) GetTorrentGroup(id int, params url.Values) (TorrentGroup, error)
GetTorrentGroup retrieves torrent group information using the provided torrent group id and parameters.
func (*ClientStruct) Login ¶ added in v0.3.0
func (w *ClientStruct) Login(username, password string) error
Login logs in to the API using the provided credentials.
func (*ClientStruct) Logout ¶ added in v0.3.0
func (w *ClientStruct) Logout() error
Logout logs out of the API, ending the current session.
func (*ClientStruct) SearchRequests ¶ added in v0.3.0
func (w *ClientStruct) SearchRequests(searchStr string, params url.Values) (RequestsSearch, error)
SearchRequests retrieves request search results using the provided search string and parameters.
func (*ClientStruct) SearchTorrents ¶ added in v0.3.0
func (w *ClientStruct) SearchTorrents(searchStr string, params url.Values) (TorrentSearch, error)
SearchTorrents retrieves torrent search results using the provided search string and parameters.
func (*ClientStruct) SearchUsers ¶ added in v0.3.0
func (w *ClientStruct) SearchUsers(searchStr string, params url.Values) (UserSearch, error)
SearchUsers retrieves user search results using the provided search string and parameters.
type Conversation ¶
type Conversation struct { ConvID int `json:"convId"` Subject string `json:"subject"` Sticky bool `json:"sticky"` Messages []struct { MessageID int `json:"messageId"` SenderID int `json:"senderId"` SenderName string `json:"senderName"` SentDate string `json:"sentDate"` BbBody string `json:"bbBody"` Body string `json:"body"` } `json:"messages"` }
type ConversationResponse ¶
type ConversationResponse struct { Status string `json:"status"` Error string `json:"error"` Response Conversation `json:"response"` }
type ExtendedArtistMap ¶
type ExtendedArtistMap map[string][]ArtistAlias
type FileStruct ¶
FileStruct represents what we know about the files in a torrent
func (FileStruct) Name ¶
func (fs FileStruct) Name() string
type Forum ¶
type Forum struct { ForumName string `json:"forumName"` SpecificRules []struct { ThreadID int `json:"threadID"` Thread string `json:"thread"` } `json:"specificRules"` CurrentPage int `json:"currentPage"` Pages int `json:"pages"` Threads []struct { TopicID int `json:"topicId"` Title string `json:"title"` AuthorID int `json:"authorId"` AuthorName string `json:"authorName"` Locked bool `json:"locked"` Sticky bool `json:"sticky"` PostCount int `json:"postCount"` LastID int `json:"lastID"` LastTime string `json:"lastTime"` LastAuthorId int `json:"lastAuthorId"` LastAuthorName string `json:"lastAuthorNam"` LastReadPage int `json:"lastReadPage"` LastReadPostID int `json:"lastReadPostId"` Read bool `json:"read"` } `json:"threads"` }
type ForumResponse ¶
type GenericResponse ¶
type GetTorrentStruct ¶
type GetTorrentStruct struct { Group GroupStruct `json:"group"` Torrent TorrentStruct `json:"torrent"` }
type GroupExt ¶
type GroupExt interface { GroupRelease WikiImage() string Artists() []string Importance() []int WikiBody() string }
type GroupRelease ¶
type GroupStruct ¶
type GroupStruct struct { WikiBodyF string `json:"wikiBody"` WikiImageF string `json:"wikiImage"` IDF int `json:"id"` NameF string `json:"name"` YearF int `json:"year"` RecordLabelF string `json:"recordLabel"` CatalogueNumberF string `json:"catalogueNumber"` ReleaseTypeF int `json:"releaseType"` CategoryID int `json:"categoryId"` CategoryName string `json:"categoryName"` Time string `json:"time"` VanityHouse bool `json:"vanityHouse"` IsBookmarked bool `json:"isBookmarked"` MusicInfo MusicInfo `json:"musicInfo"` TagsF []string `json:"tags"` // contains filtered or unexported fields }
func (GroupStruct) Artist ¶
func (g GroupStruct) Artist() string
func (GroupStruct) Artists ¶
func (g GroupStruct) Artists() []string
func (GroupStruct) CatalogueNumber ¶
func (g GroupStruct) CatalogueNumber() string
func (GroupStruct) ID ¶
func (g GroupStruct) ID() int
func (GroupStruct) Importance ¶
func (g GroupStruct) Importance() []int
func (GroupStruct) Name ¶
func (g GroupStruct) Name() string
func (GroupStruct) RecordLabel ¶
func (g GroupStruct) RecordLabel() string
func (GroupStruct) ReleaseType ¶
func (g GroupStruct) ReleaseType() int
func (GroupStruct) String ¶
func (g GroupStruct) String() string
func (GroupStruct) Tags ¶
func (g GroupStruct) Tags() []string
func (GroupStruct) WikiBody ¶
func (g GroupStruct) WikiBody() string
func (GroupStruct) WikiImage ¶
func (g GroupStruct) WikiImage() string
func (GroupStruct) Year ¶
func (g GroupStruct) Year() int
type Mailbox ¶
type Mailbox struct { CurrentPage int `json:"currentPage"` Pages int `json:"pages"` Messages []struct { ConvID int `json:"convId"` Subject string `json:"subject"` Unread bool `json:"unread"` Sticky bool `json:"sticky"` ForwardedID int `json:"forwardedID"` ForwardedName string `json:"forwardedName"` SenderID int `json:"senderId"` Username string `json:"username"` Donor bool `json:"donor"` Warned bool `json:"warned"` Enabled bool `json:"enabled"` Date string `json:"date"` } `json:"messages"` }
type MailboxResponse ¶
type MusicInfo ¶
type MusicInfo struct { Composers []MusicInfoStruct `json:"composers"` DJ []MusicInfoStruct `json:"dj"` Artists []MusicInfoStruct `json:"artists"` With []MusicInfoStruct `json:"with"` Conductor []MusicInfoStruct `json:"conductor"` RemixedBy []MusicInfoStruct `json:"remixedBy"` Producer []MusicInfoStruct `json:"producer"` }
type MusicInfoStruct ¶
type Notifications ¶
type Notifications struct { CurrentPages int `json:"currentPages"` Pages int `json:"pages"` NumNew int `json:"numNew"` Results []struct { TorrentID int `json:"torrentId"` GroupID int `json:"groupId"` GroupName string `json:"groupName"` GroupCategoryID int `json:"groupCategoryId"` TorrentTags string `json:"torrentTags"` Size int64 `json:"size"` FileCount int `json:"filecount"` Format string `json:"format"` Encoding string `json:"encoding"` Media string `json:"mdia"` Scene bool `json:"scene"` GroupYear int `json:"groupYear"` RemasterYear int `json:"remasterYear"` RemasterTitle string `json:"remasterTitle"` Snatched int `json:"snatched"` Seeders int `json:"seeders"` Leechers int `json:"leechers"` NotificationTime string `json:"notificationTime"` HasLog bool `json:"hasLog"` HasCue bool `json:"hasCue"` LogScore int `json:"logScore"` FreeTorrent bool `json:"freeTorrent"` LogInDB bool `json:"logInDb"` Unread bool `json:"unread"` } `json:"results"` }
type NotificationsResponse ¶
type NotificationsResponse struct { Status string `json:"status"` Error string `json:"error"` Response Notifications `json:"response"` }
type Request ¶
type Request struct { RequestID int `json:"requestId"` RequestiorID int `json:"requestorId"` RequestorName string `json:"requestorName"` RequestTax float64 `json:"requestTax"` TimeAdded string `json:"timeAdded"` CanEdit bool `json:"canEdit"` CanVote bool `json:"canVote"` MinimumVote int `json:"minimumVote"` VoteCount int `json:"voteCount"` LastVote string `json:"lastVote"` TopContributors []struct { UserID int `json:"userId"` UserName string `json:"userName"` Bounty int64 `json:"bounty"` } `json:"topContributers"` TotalBounty int64 `json:"totalBounty"` CategoryID int `json:"categoryId"` CategoryName string `json:"categoryName"` Title string `json:"title"` Year int `json:"year"` Image string `json:"image"` Description string `json:"description"` MusicInfo struct { Composers []string `json:"composers"` DJ []string `json:"dj"` Artists []struct { ID int `json:"id"` Name string `json:"name"` } `json:"artists"` With []struct { ID int `json:"id"` Name string `json:"name"` } `json:"with"` Conductor []string `json:"conductor"` RemixedBy []string `json:"remixedBy"` Producer []string `json:"producer"` } `json:"musicInfo"` CatalogueNumber string `json:"catalogueNumber"` ReleaseType int `json:"releaseType"` ReleaseName string `json:"releaseName"` BitrateList []string `json:"bitrateList"` FormatList []string `json:"formatList"` MediaList []string `json:"mediaList"` LogCue string `json:"logCue"` IsFilled bool `json:"isFilled"` FillerID int `json:"fillerID"` FillerName string `json:"fillerName"` TorrentID int `json:"torrentID"` TimeFilled string `json:"timeFilled"` Tags []string `json:"tags"` Comments []struct { PostID int `json:"postId"` AuthorID int `json:"authorId"` Name string `json:"name"` Donor bool `json:"donor"` Warned bool `json:"warned"` Enabled bool `json:"enabled"` Class string `json:"class"` AddedTime string `json:"addedTime"` Avatar string `json:"avatar"` Comment string `json:"comment"` EditUserID int `json:"editUserId"` EditUsername string `json:"editUsername"` EditedTime string `json:"editedTime"` } `json:"comments"` CommentPage int `json:"commentPage"` CommentPages int `json:"commentPages"` }
type RequestResponse ¶
type RequestsSearch ¶
type RequestsSearch struct { CurrentPage int `json:"currentPage"` Pages int `json:"pages"` Results []struct { RequestID int `json:"requestId"` RequestorID int `json:"requestorId"` ReqyestorName string `json:"requestorName"` TimeAdded string `json:"timeAdded"` LastVote string `json:"lastVote"` VoteCount int `json:"voteCount"` Bounty int64 `json:"bounty"` CategoryID int `json:"categoryId"` CategoryName string `json:"categoryName"` Artists [][]ArtistID `json:"artists"` Title string `json:"title"` Year int `json:"year"` Image string `json:"image"` Description string `json:"description"` CatalogueNumber string `json:"catalogueNumber"` ReleaseType string `json:"releaseType"` BitrateList string `json:"bitrateList"` FormatList string `json:"formatList"` MediaList string `json:"mediaList"` LogCue string `json:"logCue"` IsFilled bool `json:"isFilled"` FillerID int `json:"fillerId"` FillerName string `json:"fillerName"` TorrentID int `json:"torrentId"` TimeFilled string `json:"timeFilled"` } `json:"results"` }
type RequestsSearchResponse ¶
type RequestsSearchResponse struct { Status string `json:"status"` Error string `json:"error"` Response RequestsSearch `json:"response"` }
type SearchTorrentStruct ¶
type SearchTorrentStruct struct { TorrentID int `json:"torrentId"` EditionID int `json:"editionId"` Artists []ArtistAlias `json:"artists"` RemasteredF bool `json:"remastered"` RemasterYearF int `json:"remasterYear"` RemasterCatalogueNumberF string `json:"remasterCatalogueNumber"` RemasterTitleF string `json:"remasterTitle"` MediaF string `json:"media"` EncodingF string `json:"encoding"` FormatF string `json:"format"` HasLogF bool `json:"hasLog"` LogScore int `json:"logScore"` HasCue bool `json:"hasCue"` SceneF bool `json:"scene"` VanityHouse bool `json:"vanityHouse"` FileCountF int `json:"fileCount"` Time string `json:"time"` Size int64 `json:"size"` Snatches int `json:"snatches"` Seeders int `json:"seeders"` Leechers int `json:"leechers"` IsFreeleech bool `json:"isFreeleech"` IsNeutralLeech bool `json:"isNeutralLeech"` IsPersonalFreeleech bool `json:"isPersonalFreeleech"` CanUseToken bool `json:"canUseToken"` }
func (SearchTorrentStruct) Encoding ¶
func (ts SearchTorrentStruct) Encoding() string
func (SearchTorrentStruct) FileCount ¶
func (ts SearchTorrentStruct) FileCount() int
func (SearchTorrentStruct) FileSize ¶
func (ts SearchTorrentStruct) FileSize() int64
func (SearchTorrentStruct) Format ¶
func (ts SearchTorrentStruct) Format() string
func (SearchTorrentStruct) HasLog ¶
func (ts SearchTorrentStruct) HasLog() bool
func (SearchTorrentStruct) ID ¶
func (ts SearchTorrentStruct) ID() int
func (SearchTorrentStruct) Media ¶
func (ts SearchTorrentStruct) Media() string
func (SearchTorrentStruct) RemasterCatalogueNumber ¶
func (ts SearchTorrentStruct) RemasterCatalogueNumber() string
func (SearchTorrentStruct) RemasterTitle ¶
func (ts SearchTorrentStruct) RemasterTitle() string
func (SearchTorrentStruct) RemasterYear ¶
func (ts SearchTorrentStruct) RemasterYear() int
func (SearchTorrentStruct) Remastered ¶
func (ts SearchTorrentStruct) Remastered() bool
func (SearchTorrentStruct) Scene ¶
func (ts SearchTorrentStruct) Scene() bool
func (SearchTorrentStruct) String ¶
func (ts SearchTorrentStruct) String() string
type SimilarArtists ¶
type Subscriptions ¶
type SubscriptionsResponse ¶
type SubscriptionsResponse struct { Status string `json:"status"` Error string `json:"error"` Response Subscriptions `json:"response"` }
type Thread ¶
type Thread struct { ForumID int `json:"forumId"` ForumName string `json:"forumName"` ThreadID int `json:"threadId"` ThreadTitle string `json:"threadTitle"` Subscribed bool `json:"subscribed"` Locked bool `json:"locked"` Sticky bool `json:"sticky"` CurrentPage int `json:"currentPage"` Pages int `json:"pages"` Poll struct { Closed bool `json:"closed"` Featured string `json:"featured"` Question string `json:"question"` MaxVotes int `json:"maxVotes"` TotalVotes int `json:"totalVotes"` Voted bool `json:"voted"` Answers []struct { Answer string `json:"answer"` Ratio float64 `json:"ratio"` Percent float64 `json:"percent"` } `json:"answers"` } `json:"poll"` Posts []struct { PostID int `json:"postId"` AddedTime string `json:"addedTime"` BbBody string `json:"bbBody"` Body string `json:"body"` EditedUserID int `json:"editedUserId"` EditedTime string `json:"editedTime"` EditedUsername string `json:"editedUsername"` Author struct { AuthorID int `json:"authorId"` AuthorName string `json:"authorName"` Paranoia []string `json:"paranoia"` Artist bool `json:"artist"` Donor bool `json:"donor"` Warned bool `json:"warned"` Avatar string `json:"avatar"` Enabled bool `json:"enabled"` UserTitle string `json:"userTitle"` } `json:"author"` } `json:"posts"` }
type ThreadResponse ¶
type TopTenResult ¶
type TopTenResult struct { TorrentID int `json:"torrentId"` GroupID int `json:"groupId"` Artist string `json:"artist"` GroupNameF string `json:"groupName"` GroupCategory int `json:"groupCategory"` GroupYear int `json:"groupYear"` RemasterTitleF string `json:"remasterTitle"` Format string `json:"format"` Encoding string `json:"encoding"` HasLog bool `json:"hasLog"` HasCue bool `json:"hasCue"` HasLogDB bool `json:"hasLogDB"` LogScore string `json:"logScore"` LogChecksum string `json:"logChecksum"` Media string `json:"media"` Scene bool `json:"scene"` Year int `json:"year"` Tags []string `json:"tags"` Snatched int `json:"snatched"` Seeders int `json:"seeders"` Leechers int `json:"leechers"` Data int64 `json:"data"` Size int64 `json:"size"` WikiImage string `json:"wikiImage"` ReleaseType string `json:"releaseType"` }
func (TopTenResult) Name ¶ added in v0.1.1
func (r TopTenResult) Name() string
func (TopTenResult) RemasterTitle ¶
func (r TopTenResult) RemasterTitle() string
type TopTenTags ¶
type TopTenTagsResponse ¶
type TopTenTagsResponse struct { Status string `json:"status"` Error string `json:"error"` Response TopTenTags `json:"response"` }
type TopTenTorrents ¶
type TopTenTorrents []struct { Caption string `json:"caption"` Tag string `json:"tag"` Limit int `json:"limit"` Results []TopTenResult `json:"results"` }
type TopTenTorrentsResponse ¶
type TopTenTorrentsResponse struct { Status string `json:"status"` Error string `json:"error"` Response TopTenTorrents `json:"response"` }
type TopTenUsers ¶
type TopTenUsers []struct { Caption string `json:"caption"` Tag string `json:"tag"` Limit int `json:"limit"` Results []struct { ID int `json:"id"` Username string `json:"username"` Uploaded float64 `json:"uploaded"` UpSpeed float64 `json:"upSpeed"` Downloaded float64 `json:"downloaded"` DownSpeed float64 `json:"downSpeed"` NumUploads int `json:"numUploads"` JoinDate string `json:"joinDate"` } `json:"results"` }
type TopTenUsersResponse ¶
type TopTenUsersResponse struct { Status string `json:"status"` Error string `json:"error"` Response TopTenUsers `json:"response"` }
type TorrentBookmarks ¶
type TorrentBookmarks struct { Bookmarks []struct { ID int `json:"id"` Name string `json:"name"` Year int `json:"year"` RecordLabel string `json:"recordLabel"` CatalogueNumber string `json:"catalogueNumber"` TagList string `json:"tagList"` ReleaseType string `json:"releastType"` VanityHouse bool `json:"vanityHouse"` Image string `json:"image"` Torrents []TorrentStruct `json:"torrents"` } `json:"bookmarks"` }
type TorrentBookmarksResponse ¶
type TorrentBookmarksResponse struct { Status string `json:"status"` Error string `json:"error"` Response TorrentBookmarks `json:"response"` }
type TorrentCatalogueNumber ¶
type TorrentCatalogueNumber interface {
RemasterCatalogueNumber() string
}
type TorrentExt ¶
type TorrentExt interface { TorrentFiles Description() string }
type TorrentFiles ¶
type TorrentFiles interface { Torrent TorrentRecordLabel TorrentCatalogueNumber FilePath() string Files() ([]FileStruct, error) }
type TorrentGroup ¶
type TorrentGroup struct { Group GroupStruct `json:"group"` Torrent []TorrentStruct `json:"torrents"` }
type TorrentGroupResponse ¶
type TorrentGroupResponse struct { Status string `json:"status"` Error string `json:"error"` Response TorrentGroup `json:"response"` }
type TorrentRecordLabel ¶
type TorrentRecordLabel interface {
RemasterRecordLabel() string
}
type TorrentResponse ¶
type TorrentResponse struct { Status string `json:"status"` Error string `json:"error"` Response GetTorrentStruct `json:"response"` }
type TorrentSearch ¶
type TorrentSearch struct { CurrentPage int `json:"currentPage"` Pages int `json:"pages"` Results []TorrentSearchResultStruct `json:"results"` }
type TorrentSearchResponse ¶
type TorrentSearchResponse struct { Status string `json:"status"` Error string `json:"error"` Response TorrentSearch `json:"response"` }
type TorrentSearchResultStruct ¶
type TorrentSearchResultStruct struct { GroupID int `json:"groupId"` GroupName string `json:"groupName"` ArtistF string `json:"artist"` TagsF []string `json:"tags"` Bookmarked bool `json:"bookmarked"` VanityHouse bool `json:"vanityHouse"` GroupYear int `json:"groupYear"` ReleaseTypeF int `json:"releasetType,string"` GroupTime string `json:"groupTime"` TotalSnatched int `json:"totalSnatched"` TotalSeeders int `json:"totalSeeders"` TotalLeechers int `json:"totalLeechers"` Torrents []SearchTorrentStruct `json:"torrents"` }
func (TorrentSearchResultStruct) Artist ¶
func (ts TorrentSearchResultStruct) Artist() string
func (TorrentSearchResultStruct) ID ¶
func (ts TorrentSearchResultStruct) ID() int
func (TorrentSearchResultStruct) Name ¶
func (ts TorrentSearchResultStruct) Name() string
func (TorrentSearchResultStruct) ReleaseType ¶
func (ts TorrentSearchResultStruct) ReleaseType() int
func (TorrentSearchResultStruct) String ¶
func (ts TorrentSearchResultStruct) String() string
func (TorrentSearchResultStruct) Tags ¶
func (ts TorrentSearchResultStruct) Tags() []string
func (TorrentSearchResultStruct) Year ¶
func (ts TorrentSearchResultStruct) Year() int
type TorrentStruct ¶
type TorrentStruct struct { IDF int `json:"id"` InfoHash string `json:"infoHash"` MediaF string `json:"media"` FormatF string `json:"format"` EncodingF string `json:"encoding"` RemasteredF bool `json:"remastered"` RemasterYearF int `json:"remasterYear"` RemasterTitleF string `json:"remasterTitle"` RemasterRecordLabelF string `json:"remasterRecordLabel"` RemasterCatalogueNumberF string `json:"remasterCatalogueNumber"` SceneF bool `json:"scene"` HasLogF bool `json:"hasLog"` HasCue bool `json:"hasCue"` LogScore int `json:"logScore"` FileCountF int `json:"fileCount"` Size int64 `json:"size"` Seeders int `json:"seeders"` Leechers int `json:"leechers"` Snatched int `json:"snatched"` FreeTorrent bool `json:"freeTorrent"` Reported bool `json:"reported"` Time string `json:"time"` DescriptionF string `json:"description"` FileList string `json:"fileList"` FilePathF string `json:"filePath"` UserID int `json:"userID"` Username string `json:"username"` // contains filtered or unexported fields }
func (TorrentStruct) Description ¶
func (t TorrentStruct) Description() string
func (TorrentStruct) Encoding ¶
func (t TorrentStruct) Encoding() string
func (TorrentStruct) FileCount ¶
func (t TorrentStruct) FileCount() int
func (TorrentStruct) FilePath ¶
func (t TorrentStruct) FilePath() string
func (TorrentStruct) FileSize ¶
func (t TorrentStruct) FileSize() int64
func (*TorrentStruct) Files ¶
func (t *TorrentStruct) Files() ([]FileStruct, error)
func (TorrentStruct) Format ¶
func (t TorrentStruct) Format() string
func (TorrentStruct) HasLog ¶
func (t TorrentStruct) HasLog() bool
func (TorrentStruct) ID ¶
func (t TorrentStruct) ID() int
func (TorrentStruct) Media ¶
func (t TorrentStruct) Media() string
func (TorrentStruct) ParseFileList ¶
func (t TorrentStruct) ParseFileList() ([]FileStruct, error)
ParseFileList returns a slice of FileStruts for a torrent
func (TorrentStruct) RemasterCatalogueNumber ¶
func (t TorrentStruct) RemasterCatalogueNumber() string
func (TorrentStruct) RemasterRecordLabel ¶
func (t TorrentStruct) RemasterRecordLabel() string
func (TorrentStruct) RemasterTitle ¶
func (t TorrentStruct) RemasterTitle() string
func (TorrentStruct) RemasterYear ¶
func (t TorrentStruct) RemasterYear() int
func (TorrentStruct) Remastered ¶
func (t TorrentStruct) Remastered() bool
func (TorrentStruct) Scene ¶
func (t TorrentStruct) Scene() bool
func (TorrentStruct) String ¶
func (t TorrentStruct) String() string
type User ¶
type User struct { Username string `json:"username"` Avatar string `json:"avatar"` IsFriend bool `json:"isFriend"` ProfileText string `json:"profileText"` Stats struct { JoinedDate string `json:"joinedDate"` LastAccess string `json:"lastAccess"` Uploaded int64 `json:"uploaded"` Downloaded int64 `json:"downloaded"` Ratio string `json:"ratio"` RequiredRatio float64 `json:"requiredRatio"` } `json:"stats"` Ranks struct { Uploaded int `json:"uploaded"` Downloaded int `json:"downloaded"` Uploads int `json:"uploads"` Requests int `json:"requests"` Bounty int `json:"bounty"` Posts int `json:"posts"` Artists int `json:"artists"` Overall int `json:"overall"` } `json:"ranks"` Personal struct { Class string `json:"class"` Paranoia int `json:"paranoia"` ParanoiaText string `json:"paranoiaText"` Donor bool `json:"donor"` Warned bool `json:"warned"` Enabled bool `json:"enabled"` PassKey string `json:"passKey"` } `json:"personal"` Community struct { Posts int `json:"posts"` TorrentComments int `json:"torrentComments"` CollagesStarted int `json:"collagesStarted"` CollagesContrib int `json:"collagesContrib"` RequestsFilled int `json:"requestsFilled"` RequestsVoted int `json:"requestsVoted"` PerfectFlacs int `json:"perfectFlacs"` Uploaded int `json:"uploaded"` Groups int `json:"groups"` Seeding int `json:"seeding"` Leeching int `json:"leeching"` Snatched int `json:"snatched"` Invited int `json:"invited"` } `json:"community"` }
type UserResponse ¶
type UserSearch ¶
type UserSearchResponse ¶
type UserSearchResponse struct { Status string `json:"status"` Error string `json:"error"` Response UserSearch `json:"response"` }