hummingbird

package module
v0.0.0-...-29d7117 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2015 License: MIT Imports: 3 Imported by: 0

README

hummingbird-go

GoDoc

Hummingbird Go Client

Usage

See main/main.go and the documentation.

Documentation

Overview

Package hummingbird is an API client for the https://hummingbird.me website.

Index

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

func (api *API) Search(title string) (errs []error, results []Anime)

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

func (api *API) UserAuthenticate(username, email, password string) (errs []error, body string)

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

func (api *API) UserFavorites(username string) (errs []error, animes []Anime)

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

func (api *API) UserInformation(username string) (errs []error, user User)

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 Genre

type Genre struct {
	Name string
}

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 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL