Documentation ¶
Index ¶
- Constants
- type Achievement
- type Achievements
- type Anime
- type AnimeDetailed
- type AnimeImage
- type AnimeRate
- type AnimeRates
- type AnimeVideo
- type Animes
- type DeleteAllMessages
- type Genre
- type Genres
- type InnerMessage
- type MarkReadMessages
- type Message
- type MessageResult
- type ReadAllMessages
- type ScoreStat
- type Screenshot
- type Screenshots
- type Studio
- type Studios
- type UseStat
- type User
- type UserBrief
- type UserDetailed
- type UserImage
- type Users
- type Video
- type Videos
Constants ¶
const ( // kinds of anime AnimeKindTV = "tv" AnimeKindMovie = "movie" AnimeKindOVA = "ova" AnimeKindONA = "ona" AnimeKindSpecial = "special" AnimeKindMusic = "music" AnimeKindTV13 = "tv_13" AnimeKindTV24 = "tv_24" AnimeKindTV48 = "tv_48" // status of anime AnimeStatusAnons = "anons" AnimeStatusOngoing = "ongoing" AnimeStatusReleased = "released" // durations of episode AnimeDurationLess10Min = "S" AnimeDurationLess30Min = "D" AnimeDurationMore30Min = "F" // age rating of episode AnimeRatingNone = "none" // none – No rating AnimeRatingG = "g" // G - All ages AnimeRatingPG = "pg" // PG - Children AnimeRatingPG13 = "pg_13" // PG-13 - Teens 13 or older AnimeRatingR = "r" // R - 17+ recommended (violence & profanity) AnimeRatingRPlus = "r_plus" // R+ - Mild Nudity (may also contain violence & profanity) AnimeRatingRx = "rx" // Rx - Hentai (extreme sexual content/nudity) // user list statuses AnimeListPlanned = "planned" AnimeListWatching = "watching" AnimeListRewatching = "rewatching" AnimeListCompleted = "completed" AnimeListOnHold = "on_hold" AnimeListDropped = "dropped" // sort order AnimeOrderByID = "id" AnimeOrderByRanked = "ranked" AnimeOrderByKind = "kind" AnimeOrderByPopularity = "popularity" AnimeOrderByName = "name" AnimeOrderByAiredOn = "aired_on" AnimeOrderByEpisodes = "episodes" AnimeOrderByStatus = "status" AnimeOrderByRandom = "random" )
const ( // kind of anime video AnimeVideoKindRaw = "raw" AnimeVideoKindSubtitles = "subtitles" AnimeVideoKindFandub = "fandub" AnimeVideoKindUnknown = "unknown" // languages of anime video AnimeVideoLanguageRussian = "russian" AnimeVideoLanguageEnglish = "english" AnimeVideoLanguageOriginal = "original" AnimeVideoLanguageUnknown = "unknown" // quality of video AnimeVideoQualityBD = "bd" AnimeVideoQualityWeb = "web" AnimeVideoQualityTV = "tv" AnimeVideoQualityDVD = "dvd" AnimeVideoQualityUnknown = "unknown" )
const ( // MessageKindPrivate is one of InnerMessage.Kind MessageKindPrivate = "Private" // Message types MessageTypeNews = "news" MessageTypeNotifications = "notifications" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Achievement ¶
type Achievement struct { ID int32 `json:"id"` NekoID string `json:"neko_id"` Level int32 `json:"level"` // Progress has int8 because it changes 0..100 (?) Progress int8 `json:"progress"` UserID int32 `json:"user_id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Achievement of Shikimori
type Anime ¶
type Anime struct { ID int32 `json:"id"` Name string `json:"name"` RussianName string `json:"russian"` Image AnimeImage `json:"image"` URL string `json:"url"` Kind string `json:"kind"` Status string `json:"status"` Episodes int16 `json:"episodes"` EpisodesAired int16 `json:"episodes_aired"` // todo: посмотреть, можно ли их как-нибудь легко/удобно перевести в time.Time AiredOn string `json:"aired_on"` ReleasedOn string `json:"released_on"` }
Anime is short description of some anime. Ex., GET /api/anime
type AnimeDetailed ¶
type AnimeDetailed struct { Anime Rating string `json:"rating"` English []string `json:"english"` Japanese []string `json:"japanese"` Synonyms []string `json:"synonyms"` // Duration of an episode Duration int16 `json:"duration"` Score string `json:"score"` Description string `json:"description"` HTMLDescription string `json:"description_html"` SourceDescription string `json:"description_source"` Franchise string `json:"franchise"` Favoured bool `json:"favoured"` Anons bool `json:"anons"` Ongoing bool `json:"ongoing"` ThreadID int32 `json:"thread_id"` TopicID int32 `json:"topic_id"` MyListAnimeID int32 `json:"myanimelist_id"` RatesScoresStats []ScoreStat `json:"rates_scores_stats"` RatesStatusesStats []UseStat `json:"rates_statuses_stats"` UpdatedAt time.Time `json:"updated_at"` NextEpisodeAt time.Time `json:"next_episode_at"` Genres Genres `json:"genres"` Studios Studios `json:"studios"` // Last videos of anime (not all: get it all separately) LastVideos Videos `json:"videos"` LastScreenshots Screenshots `json:"screenshots"` UserRate AnimeRate `json:"user_rate"` }
AnimeDetailed is full description of some anime. Ex., GET /api/animes/:id
type AnimeImage ¶
type AnimeRates ¶
type AnimeRates []AnimeRate
type AnimeVideo ¶
type AnimeVideo struct { AnimeID int32 `json:"anime_id"` Episode int16 `json:"episode"` Kind string `json:"kind"` Language string `json:"language"` Quality string `json:"quality"` Source string `json:"source"` URL string `json:"url"` // Формат записи: Название_проекта/студии (Ник_даббера1 & Ник_даббера2). // Поле необязательное. AuthorName string `json:"author_name,omitempty"` }
type DeleteAllMessages ¶
DeleteAllMessages - Delete all messages https://shikimori.org/api/doc/1.0/messages/delete_all
type InnerMessage ¶
type InnerMessage struct { Body string `json:"body"` Kind string `json:"kind"` FromID string `json:"from_id"` ToID string `json:"to_id"` }
InnerMessage of Message struct
type MarkReadMessages ¶
type MarkReadMessages struct { // IDs list separated by comma. // Ex., "17,18,987654". IDs string `json:"ids"` // Ex., "1" IsRead string `json:"is_read"` }
MarkReadMessages - Mark messages as read or unread. https://shikimori.org/api/doc/1.0/messages/read_all
type Message ¶
type Message struct { Frontend bool `json:"frontend"` Inner InnerMessage `json:"message"` }
Message of Shikimori
type MessageResult ¶
type MessageResult struct { ID int32 `json:"id"` Kind string `json:"kind"` Read bool `json:"read"` Body string `json:"body"` HTMLBody string `json:"html_body"` CreatedAt time.Time `json:"created_at"` // todo: посмотреть, что это. Linked interface{} From User `json:"from"` To User `json:"to"` }
MessageResult of POST-request Message struct
type ReadAllMessages ¶
ReadAllMessages - Mark all messages as read https://shikimori.org/api/doc/1.0/messages/read_all
type Screenshot ¶
type Screenshots ¶
type Screenshots []Screenshot
type Studio ¶
type Studio struct { ID int32 `json:"id"` Name string `json:"name"` FilteredName string `json:"filtered_name"` Real bool `json:"real"` Image string `json:"image"` }
Studio on Shikimori
type User ¶
type User struct { ID int32 `json:"id"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` Image UserImage `json:"image"` LastOnlineAt time.Time `json:"last_online_at"` }
User of Shikimori. Ex., GET /api/users
type UserBrief ¶
type UserBrief struct { User Name string `json:"name"` Sex string `json:"sex"` Website string `json:"website"` BirthDate string `json:"birth_on"` Locale string `json:"locale"` }
UserBrief of Shikimori. Ex., GET /api/users/:id/info
type UserDetailed ¶
type UserDetailed struct { // todo UserBrief }
UserDetailed of Shikimori. Ex., GET /api/users/:id
type UserImage ¶
type UserImage struct { X160 string `json:"x160"` X148 string `json:"x148"` X80 string `json:"x80"` X64 string `json:"x64"` X48 string `json:"x48"` X32 string `json:"x32"` X16 string `json:"x16"` }
UserImage of Shikimori user