user

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnimeList

type AnimeList struct {
	RequestHash        string          `json:"request_hash"`
	RequestCached      bool            `json:"request_cached"`
	RequestCacheExpiry int64           `json:"request_cache_expiry"`
	Anime              []AnimeListItem `json:"anime"`
}

func GetAnimeList

func GetAnimeList(user common.MALItem, filter Filter) (AnimeList, error)

type AnimeListItem

type AnimeListItem struct {
	MalID           int64       `json:"mal_id"`
	Title           string      `json:"title"`
	VideoURL        string      `json:"video_url"`
	URL             string      `json:"url"`
	ImageURL        string      `json:"image_url"`
	Type            string      `json:"type"`
	WatchingStatus  int64       `json:"watching_status"`
	Score           int64       `json:"score"`
	WatchedEpisodes int64       `json:"watched_episodes"`
	TotalEpisodes   int64       `json:"total_episodes"`
	AiringStatus    int64       `json:"airing_status"`
	SeasonName      interface{} `json:"season_name"`
	SeasonYear      interface{} `json:"season_year"`
	HasEpisodeVideo bool        `json:"has_episode_video"`
	HasPromoVideo   bool        `json:"has_promo_video"`
	HasVideo        bool        `json:"has_video"`
	IsRewatching    bool        `json:"is_rewatching"`
	Tags            interface{} `json:"tags"`
	Rating          string      `json:"rating"`
	StartDate       string      `json:"start_date"`
	EndDate         string      `json:"end_date"`
	WatchStartDate  interface{} `json:"watch_start_date"`
	WatchEndDate    interface{} `json:"watch_end_date"`
	Days            interface{} `json:"days"`
	Storage         interface{} `json:"storage"`
	Priority        string      `json:"priority"`
	AddedToList     bool        `json:"added_to_list"`
	Studios         []string    `json:"studios"`
	Licensors       []string    `json:"licensors"`
}

type AnimeStats

type AnimeStats struct {
	DaysWatched     float64 `json:"days_watched"`
	MeanScore       float64 `json:"mean_score"`
	Watching        int64   `json:"watching"`
	Completed       int64   `json:"completed"`
	OnHold          int64   `json:"on_hold"`
	Dropped         int64   `json:"dropped"`
	PlanToWatch     int64   `json:"plan_to_watch"`
	TotalEntries    int64   `json:"total_entries"`
	Rewatched       int64   `json:"rewatched"`
	EpisodesWatched int64   `json:"episodes_watched"`
}

type FavoriteAnime

type FavoriteAnime struct {
	MalID    int64  `json:"mal_id"`
	URL      string `json:"url"`
	ImageURL string `json:"image_url"`
	Name     string `json:"name"`
}

func (FavoriteAnime) GetID

func (r FavoriteAnime) GetID() interface{}

func (FavoriteAnime) GetType

func (r FavoriteAnime) GetType() string

type FavoriteCharacter

type FavoriteCharacter struct {
	MalID    int64  `json:"mal_id"`
	URL      string `json:"url"`
	ImageURL string `json:"image_url"`
	Name     string `json:"name"`
}

func (FavoriteCharacter) GetID

func (r FavoriteCharacter) GetID() interface{}

func (FavoriteCharacter) GetType

func (r FavoriteCharacter) GetType() string

type FavoriteManga

type FavoriteManga struct {
	MalID    int64  `json:"mal_id"`
	URL      string `json:"url"`
	ImageURL string `json:"image_url"`
	Name     string `json:"name"`
}

func (FavoriteManga) GetID

func (r FavoriteManga) GetID() interface{}

func (FavoriteManga) GetType

func (r FavoriteManga) GetType() string

type FavoritePerson

type FavoritePerson struct {
	MalID    int64  `json:"mal_id"`
	URL      string `json:"url"`
	ImageURL string `json:"image_url"`
	Name     string `json:"name"`
}

func (FavoritePerson) GetID

func (r FavoritePerson) GetID() interface{}

func (FavoritePerson) GetType

func (r FavoritePerson) GetType() string

type Favorites

type Favorites struct {
	Anime      []FavoriteAnime     `json:"anime"`
	Manga      []FavoriteManga     `json:"manga"`
	Characters []FavoriteCharacter `json:"characters"`
	People     []FavoritePerson    `json:"people"`
}

type Filter

type Filter string
const (
	AllList         Filter = "all"
	WatchingList    Filter = "watching"
	ReadingList     Filter = "reading"
	CompletedList   Filter = "completed"
	OnHoldList      Filter = "onhold"
	PlanToWatchList Filter = "plantowatch"
	PlanToReadList  Filter = "plantoread"
)

watching /reading /completed /completed /onhold /onhold /dropped /dropped /plantowatch /plantoread /ptw (alias)

type Friend

type Friend struct {
	URL          string  `json:"url"`
	Username     string  `json:"username"`
	ImageURL     string  `json:"image_url"`
	LastOnline   string  `json:"last_online"`
	FriendsSince *string `json:"friends_since"`
}

func (Friend) GetID

func (r Friend) GetID() interface{}

func (Friend) GetType

func (r Friend) GetType() string

type Friends

type Friends struct {
	RequestHash        string   `json:"request_hash"`
	RequestCached      bool     `json:"request_cached"`
	RequestCacheExpiry int64    `json:"request_cache_expiry"`
	Friends            []Friend `json:"friends"`
}

func GetFriends

func GetFriends(m common.MALItem, page int) (Friends, error)

type History

type History struct {
	RequestHash        string           `json:"request_hash"`
	RequestCached      bool             `json:"request_cached"`
	RequestCacheExpiry int64            `json:"request_cache_expiry"`
	History            []HistoryElement `json:"history"`
}

func GetHistory

func GetHistory(m common.MALItem, history_type HistoryType) (History, error)

type HistoryElement

type HistoryElement struct {
	Meta      common.TypedMALItem `json:"meta"`
	Increment int64               `json:"increment"`
	Date      string              `json:"date"`
}

type HistoryType

type HistoryType = string
const (
	HistoryAll   HistoryType = ""
	HistoryManga HistoryType = "manga"
	HistoryAnime HistoryType = "anime"
)

type MangaList

type MangaList struct {
	RequestHash        string          `json:"request_hash"`
	RequestCached      bool            `json:"request_cached"`
	RequestCacheExpiry int64           `json:"request_cache_expiry"`
	Manga              []MangaListItem `json:"manga"`
}

func GetMangaList

func GetMangaList(user common.MALItem, filter Filter) (MangaList, error)

type MangaListItem

type MangaListItem struct {
	MalID            int64       `json:"mal_id"`
	Title            string      `json:"title"`
	URL              string      `json:"url"`
	ImageURL         string      `json:"image_url"`
	Type             string      `json:"type"`
	ReadingStatus    int64       `json:"reading_status"`
	Score            int64       `json:"score"`
	ReadChapters     int64       `json:"read_chapters"`
	ReadVolumes      int64       `json:"read_volumes"`
	TotalChapters    int64       `json:"total_chapters"`
	TotalVolumes     int64       `json:"total_volumes"`
	PublishingStatus int64       `json:"publishing_status"`
	IsRereading      bool        `json:"is_rereading"`
	Tags             interface{} `json:"tags"`
	StartDate        string      `json:"start_date"`
	EndDate          string      `json:"end_date"`
	ReadStartDate    interface{} `json:"read_start_date"`
	ReadEndDate      interface{} `json:"read_end_date"`
	Days             interface{} `json:"days"`
	Retail           interface{} `json:"retail"`
	Priority         string      `json:"priority"`
	AddedToList      bool        `json:"added_to_list"`
	Magazines        []string    `json:"magazines"`
}

type MangaStats

type MangaStats struct {
	DaysRead     float64 `json:"days_read"`
	MeanScore    float64 `json:"mean_score"`
	Reading      int64   `json:"reading"`
	Completed    int64   `json:"completed"`
	OnHold       int64   `json:"on_hold"`
	Dropped      int64   `json:"dropped"`
	PlanToRead   int64   `json:"plan_to_read"`
	TotalEntries int64   `json:"total_entries"`
	Reread       int64   `json:"reread"`
	ChaptersRead int64   `json:"chapters_read"`
	VolumesRead  int64   `json:"volumes_read"`
}

type User

type User struct {
	RequestHash        string     `json:"request_hash"`
	RequestCached      bool       `json:"request_cached"`
	RequestCacheExpiry int64      `json:"request_cache_expiry"`
	UserID             int64      `json:"user_id"`
	Username           string     `json:"username"`
	URL                string     `json:"url"`
	ImageURL           string     `json:"image_url"`
	LastOnline         string     `json:"last_online"`
	Gender             string     `json:"gender"`
	Birthday           string     `json:"birthday"`
	Location           string     `json:"location"`
	Joined             string     `json:"joined"`
	AnimeStats         AnimeStats `json:"anime_stats"`
	MangaStats         MangaStats `json:"manga_stats"`
	Favorites          Favorites  `json:"favorites"`
	About              string     `json:"about"`
}

func GetUser

func GetUser(user common.MALItem) (User, error)

func (User) GetID

func (r User) GetID() interface{}

func (User) GetType

func (r User) GetType() string

Jump to

Keyboard shortcuts

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