mal

package module
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 6 Imported by: 8

README

mal

Godoc Report Tests Coverage Sponsor

MyAnimeList API client written in Go.

Style

Please take a look at the style guidelines if you'd like to make a pull request.

Sponsors

Cedric Fung Scott Rayapoullé Eduard Urbach
Cedric Fung Scott Rayapoullé Eduard Urbach

Want to see your own name here?

Documentation

Index

Constants

View Source
const (
	AnimeListStatusWatching  = 1
	AnimeListStatusCompleted = 2
	AnimeListStatusPlanned   = 6
	AnimeListStatusHold      = 3
	AnimeListStatusDropped   = 4
)

AnimeListStatus values for anime list items

Variables

This section is empty.

Functions

This section is empty.

Types

type Anime

type Anime struct {
	ID             string
	URL            string
	Title          string
	EnglishTitle   string
	JapaneseTitle  string
	Image          string
	Synonyms       []string
	Synopsis       string
	Rating         string
	SynopsisSource string
	Status         string
	Source         string
	StartDate      string
	EndDate        string
	EpisodeCount   int
	EpisodeLength  int
	Genres         []string
	Studios        []*Producer
	Producers      []*Producer
	Licensors      []*Producer
	Characters     []*AnimeCharacter
}

Anime represents an anime on MyAnimeList.

type AnimeCharacter

type AnimeCharacter struct {
	ID   string
	Role string
}

AnimeCharacter represents a character connection on MyAnimeList anime.

type AnimeList

type AnimeList []*AnimeListItem

AnimeList is just a slice of anime list items.

func GetAnimeList

func GetAnimeList(userName string) (AnimeList, error)

GetAnimeList returns the user's anime list.

type AnimeListItem

type AnimeListItem struct {
	AnimeID            int    `json:"anime_id"`
	AnimeTitle         string `json:"anime_title"`
	Status             int    `json:"status"`
	Score              int    `json:"score"`
	IsRewatching       bool   `json:"is_rewatching"`
	NumWatchedEpisodes int    `json:"num_watched_episodes"`
}

AnimeListItem represents a single list item.

func (item AnimeListItem) AnimeLink() string

AnimeLink ...

type Character

type Character struct {
	ID           string
	URL          string
	Image        string
	Name         string
	JapaneseName string
	Description  string
	Spoilers     []string
}

Character represents a character on MyAnimeList.

func (character *Character) ImageLink() string

ImageLink returns the URL of the image.

type Person

type Person struct {
	ID  string
	URL string
}

Person represents a person on MyAnimeList.

type Producer

type Producer struct {
	ID   string
	Name string
}

Producer ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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