Documentation
¶
Index ¶
- Constants
- type Client
- func (c Client) DeleteAnime(id int) (string, error)
- func (c Client) GetAnimeList(user, status, sort string, limit, offset int, fields []string) ([]a.Anime, bool, error)
- func (c Client) SetIsRewatching(id int, isRewatching bool) (UpdateResponse, error)
- func (c Client) SetPriority(id int, priority int) (UpdateResponse, error)
- func (c Client) SetRewatchCount(id int, rewatchCount int) (UpdateResponse, error)
- func (c Client) SetRewatchValue(id int, rewatchValue int) (UpdateResponse, error)
- func (c Client) SetScore(id int, score int) (UpdateResponse, error)
- func (c Client) SetStatus(id int, status string) (UpdateResponse, error)
- func (c Client) SetWatchedEpisodes(id int, episodesWatched int) (UpdateResponse, error)
- func (c Client) UpdateAnime(id int, data UpdateAnimeData) (UpdateResponse, error)
- func (c Client) UpdateComments(id int, comments string) (UpdateResponse, error)
- func (c Client) UpdateTags(id int, tags string) (UpdateResponse, error)
- type UpdateAnimeData
- type UpdateResponse
Constants ¶
View Source
const BASE_URL string = "https://api.myanimelist.net/v2"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client util.DefaultClient
func (Client) DeleteAnime ¶
Delete an anime from user's anime list
func (Client) GetAnimeList ¶
func (c Client) GetAnimeList(user, status, sort string, limit, offset int, fields []string) ([]a.Anime, bool, error)
Get authenticated user's anime list returns true as second value if there are more animes present
func (Client) SetIsRewatching ¶
func (c Client) SetIsRewatching(id int, isRewatching bool) (UpdateResponse, error)
update just an anime's rewatching status
func (Client) SetPriority ¶
func (c Client) SetPriority(id int, priority int) (UpdateResponse, error)
update just an anime's priority
func (Client) SetRewatchCount ¶
func (c Client) SetRewatchCount(id int, rewatchCount int) (UpdateResponse, error)
update just an anime's rewatch count
func (Client) SetRewatchValue ¶
func (c Client) SetRewatchValue(id int, rewatchValue int) (UpdateResponse, error)
update just an anime's rewatch value
func (Client) SetScore ¶
func (c Client) SetScore(id int, score int) (UpdateResponse, error)
update just the anime's score
func (Client) SetStatus ¶
func (c Client) SetStatus(id int, status string) (UpdateResponse, error)
update just an anime's status
func (Client) SetWatchedEpisodes ¶
func (c Client) SetWatchedEpisodes(id int, episodesWatched int) (UpdateResponse, error)
update just an anime's num of episodes watched
func (Client) UpdateAnime ¶
func (c Client) UpdateAnime(id int, data UpdateAnimeData) (UpdateResponse, error)
This will overwrite everything * i won't use it.. but it's pretty flexible * so this will stay here
Update/Add an anime to user's anime list
func (Client) UpdateComments ¶
func (c Client) UpdateComments(id int, comments string) (UpdateResponse, error)
update just an anime's comments
func (Client) UpdateTags ¶
func (c Client) UpdateTags(id int, tags string) (UpdateResponse, error)
update just an anime's tags
type UpdateAnimeData ¶
type UpdateResponse ¶
type UpdateResponse struct {
Status string `json:"status"`
Score int `json:"score"`
EpWatched int `json:"num_episodes_watched"`
IsRewatching bool `json:"is_rewatching"`
StartDate string `json:"start_date"`
FinishDate string `json:"finish_date"`
Priority string `json:"priority"`
TimesRewatched string `json:"num_times_rewatched"`
RewatchValue string `json:"rewatch_value"`
Tags string `json:"tags"`
Comments string `json:"string"`
UpdatedAt string `json:"updated_at"`
}
Click to show internal directories.
Click to hide internal directories.