Documentation ¶
Overview ¶
Package hummingbird is an API client for the https://hummingbird.me website.
Index ¶
- type API
- func (api *API) Library(username, status string) (errs []error, library []LibraryEntry)
- func (api *API) Search(title string) (errs []error, results []Anime)
- func (api *API) UserAuthenticate(username, email, password string) (errs []error, body string)
- func (api *API) UserFavorites(username string) (errs []error, animes []Anime)
- func (api *API) UserInformation(username string) (errs []error, user User)
- type Anime
- type Favorite
- type Genre
- type LibraryEntry
- type LibraryEntryRating
- type User
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API represents the API client
func NewAPI ¶
func NewAPI() *API
Instantiates the API and return a new API instance.
Example ¶
You can use the API by following this example
api := hummingbird.NewAPI() _, results := api.Search("One Piece") fmt.Print("%+v", results)
Output:
func (*API) Library ¶
func (api *API) Library(username, status string) (errs []error, library []LibraryEntry)
Library allows you to retrieve all the anime in the library of an user of the given type.
https://github.com/hummingbird-me/hummingbird/wiki/API-v1-Methods#library--get-all-entries
func (*API) Search ¶
Search allows you to search an anime by title.
https://github.com/hummingbird-me/hummingbird/wiki/API-v1-Methods#anime--search-by-title
func (*API) UserAuthenticate ¶
UserAuthenticate returns an user's authentication token if the credentials are correct.
https://github.com/hummingbird-me/hummingbird/wiki/API-v1-Methods#user--authenticate
func (*API) UserFavorites ¶
UserFavorites allows you to retrieve the favorite animes of a given user.
https://github.com/hummingbird-me/hummingbird/wiki/API-v1-Methods#user--get-favorite-anime
func (*API) UserInformation ¶
UserInformation allows you to retrieve all the informations about an user.
https://github.com/hummingbird-me/hummingbird/wiki/API-v1-Methods#user--get-activity-feed
type Anime ¶
type Anime struct { Id uint64 Slug string Status string Url string Title string Alternate_title string Episode_count uint64 Episode_length uint64 Cover_image string Synopsis string Show_type string Started_airing string Finished_airing string Community_rating float64 Age_rating string Genres []Genre `json:",omitempty"` }
https://github.com/hummingbird-me/hummingbird/wiki/API-v1-Structures#anime-object
type Favorite ¶
type Favorite struct { Id uint64 User_id uint64 Item_id uint64 Item_type string Created_at string Updated_at string // contains filtered or unexported fields }
https://github.com/hummingbird-me/hummingbird/wiki/API-v1-Structures#favorite-object
type LibraryEntry ¶
type LibraryEntry struct { Id uint64 Episodes_watched uint64 Last_watched string Updated_at string Rewatched_times uint64 Notes string Notes_present bool Status string Private bool Rewatching bool Anime Anime Rating LibraryEntryRating }
https://github.com/hummingbird-me/hummingbird/wiki/API-v1-Structures#library-entry-object
type LibraryEntryRating ¶
https://github.com/hummingbird-me/hummingbird/wiki/API-v1-Structures#library-entry-rating-object
type User ¶
type User struct { Name string Waifu string Waifu_or_husbando string Waifu_slug string Waifu_char_id string Location string Website string Avatar string Cover_image string About string Bio string Karma uint64 Life_spent_on_anime uint64 Show_adult_content bool Title_language_preference string Last_library_update string Online bool Following bool Favorites []Favorite }
https://github.com/hummingbird-me/hummingbird/wiki/API-v1-Structures#user-object