Documentation ¶
Index ¶
- Constants
- func CharacterRevisionTypes() []uint8
- func PersonRevisionTypes() []uint8
- func SubjectTypeString(s uint8) string
- type Character
- type CharacterID
- type CharacterRevision
- type CharacterRevisionData
- type CharacterRevisionDataItem
- type CollectPrivacy
- type Comment
- type CommentID
- type CommentState
- type Count
- type EpType
- type Episode
- type EpisodeCollection
- type EpisodeID
- type Extra
- type Group
- type GroupID
- type GroupMember
- type Index
- type IndexID
- type Person
- type PersonCharacterRelation
- type PersonID
- type PersonRevision
- type PersonRevisionData
- type PersonRevisionDataItem
- type Platform
- type Profession
- type Rating
- type RevisionCommon
- type RevisionID
- type RevisionType
- type SubComment
- type Subject
- type SubjectCharacterRelation
- type SubjectCollection
- type SubjectID
- type SubjectInternalRelation
- type SubjectPersonRelation
- type SubjectRevision
- type SubjectRevisionData
- type SubjectType
- type Tag
- type TimeLine
- type TimeLineBlogMemo
- type TimeLineCat
- type TimeLineDoujinMemo
- type TimeLineGroupMemo
- type TimeLineID
- type TimeLineImage
- type TimeLineImages
- type TimeLineIndexMemo
- type TimeLineMemo
- type TimeLineMemoContent
- type TimeLineMemoContentType
- type TimeLineMeta
- type TimeLineMonoMemo
- type TimeLineProgressMemo
- type TimeLineRelationMemo
- type TimeLineSay
- type TimeLineSayEdit
- type TimeLineSayMemo
- type TimeLineSubjectMemo
- type TimeLineWikiMemo
- type Topic
- type TopicDetail
- type TopicDisplay
- type TopicID
- type User
- type UserEpisodeCollection
- type UserGroupID
- type UserID
- type UserSubjectCollection
- type UserSubjectEpisodesCollection
Constants ¶
View Source
const ( RevisionTypeSubject = 1 // 条目 RevisionTypeSubjectCharacterRelation = 5 // 条目->角色关联 RevisionTypeSubjectCastRelation = 6 // 条目->声优关联 RevisionTypeSubjectPersonRelation = 10 // 条目->人物关联 RevisionTypeSubjectMerge = 11 // 条目管理 RevisionTypeSubjectErase = 12 RevisionTypeSubjectRelation = 17 // 条目关联 RevisionTypeSubjectLock = 103 RevisionTypeSubjectUnlock = 104 RevisionTypeCharacter = 2 // 角色 RevisionTypeCharacterSubjectRelation = 4 // 角色->条目关联 RevisionTypeCharacterCastRelation = 7 // 角色->声优关联 RevisionTypeCharacterMerge = 13 // 角色管理 RevisionTypeCharacterErase = 14 RevisionTypePerson = 3 // 人物 RevisionTypePersonCastRelation = 8 // 人物->声优关联 RevisionTypePersonSubjectRelation = 9 // 人物->条目关联 RevisionTypePersonMerge = 15 // 人物管理 RevisionTypePersonErase = 16 RevisionTypeEp = 18 // 章节 RevisionTypeEpMerge = 181 // 章节管理 RevisionTypeEpMove = 182 RevisionTypeEpLock = 183 RevisionTypeEpUnlock = 184 RevisionTypeEpErase = 185 )
Variables ¶
This section is empty.
Functions ¶
func CharacterRevisionTypes ¶
func CharacterRevisionTypes() []uint8
func PersonRevisionTypes ¶
func PersonRevisionTypes() []uint8
func SubjectTypeString ¶
Types ¶
type Character ¶
type Character struct { Name string Image string Infobox string Summary string ID CharacterID Redirect CharacterID CollectCount uint32 CommentCount uint32 FieldBirthYear uint16 Producer bool Type uint8 Artist bool Seiyu bool Writer bool Illustrator bool Actor bool FieldBloodType uint8 FieldGender uint8 FieldBirthMon uint8 Locked bool FieldBirthDay uint8 NSFW bool }
type CharacterID ¶ added in v0.20.2
type CharacterID uint32
type CharacterRevision ¶
type CharacterRevision struct { Data CharacterRevisionData RevisionCommon }
CharacterRevision concrete revision data type.
type CharacterRevisionData ¶
type CharacterRevisionData map[string]CharacterRevisionDataItem
type CharacterRevisionDataItem ¶ added in v0.16.9
type CollectPrivacy ¶ added in v0.23.8
type CollectPrivacy uint8
const ( // CollectPrivacyNone 默认公开收藏。 CollectPrivacyNone CollectPrivacy = 0 // CollectPrivacySelf 私有收藏,正常计入评分。 CollectPrivacySelf CollectPrivacy = 1 // CollectPrivacyBan Shadow Ban, 显示为私有收藏,不计入评分。 CollectPrivacyBan CollectPrivacy = 2 )
type Comment ¶ added in v0.22.0
type Comment struct { CreatedAt time.Time Content string SubComments []SubComment CreatorID UserID ID CommentID State CommentState }
type CommentState ¶ added in v0.22.0
type CommentState uint8
const ( CommentStateNone CommentState = 0 // 正常 // CommentStateAdminCloseTopic 管理员关闭主题 https://bgm.tv/subject/topic/12629#post_108127 CommentStateAdminCloseTopic CommentState = 1 // 关闭 CommentStateAdminReopen CommentState = 2 // 重开 CommentStateAdminPin CommentState = 3 // 置顶 CommentStateAdminMerge CommentState = 4 // 合并 // CommentStateAdminSilentTopic 管理员下沉 https://bgm.tv/subject/topic/18784#post_160402 CommentStateAdminSilentTopic CommentState = 5 // 下沉 CommentStateUserDelete CommentState = 6 // 自行删除 CommentStateAdminDelete CommentState = 7 // 管理员删除 )
type Episode ¶
type EpisodeCollection ¶ added in v0.22.5
type EpisodeCollection uint8
const ( EpisodeCollectionNone EpisodeCollection = 0 // 撤消/删除 EpisodeCollectionAll EpisodeCollection = 0 // 全部 EpisodeCollectionWish EpisodeCollection = 1 // 想看 EpisodeCollectionDone EpisodeCollection = 2 // 看过 EpisodeCollectionDropped EpisodeCollection = 3 // 抛弃 )
func (*EpisodeCollection) UnmarshalJSON ¶ added in v0.27.0
func (s *EpisodeCollection) UnmarshalJSON(bytes []byte) error
type GroupMember ¶ added in v0.20.9
type Person ¶
type Person struct { Name string Image string Infobox string Summary string ID PersonID Redirect PersonID CollectCount uint32 CommentCount uint32 FieldBirthYear uint16 Producer bool Mangaka bool Type uint8 Artist bool Seiyu bool Writer bool Illustrator bool Actor bool FieldBloodType uint8 FieldGender uint8 FieldBirthMon uint8 Locked bool FieldBirthDay uint8 }
type PersonCharacterRelation ¶
type PersonRevision ¶ added in v0.16.9
type PersonRevision struct { Data PersonRevisionData RevisionCommon }
type PersonRevisionData ¶ added in v0.16.9
type PersonRevisionData map[string]PersonRevisionDataItem
type PersonRevisionDataItem ¶
type PersonRevisionDataItem struct { Name string `json:"name" mapstructure:"prsn_name"` InfoBox string `json:"infobox" mapstructure:"prsn_infobox"` Summary string `json:"summary" mapstructure:"prsn_summary"` Profession Profession `json:"profession"` Extra Extra `json:"extra"` }
type Platform ¶
type Profession ¶
type Profession struct { Writer string `json:"writer,omitempty"` Producer string `json:"producer,omitempty"` Mangaka string `json:"mangaka,omitempty"` Artist string `json:"artist,omitempty"` Seiyu string `json:"seiyu,omitempty"` Illustrator string `json:"illustrator,omitempty"` Actor string `json:"actor,omitempty"` }
type RevisionCommon ¶
type RevisionCommon struct { CreatedAt time.Time Summary string ID RevisionID CreatorID UserID Type uint8 }
RevisionCommon common parts in revision.
type RevisionID ¶ added in v0.20.2
type RevisionID = uint32
type RevisionType ¶ added in v0.20.2
type RevisionType = uint8
type SubComment ¶ added in v0.22.0
type Subject ¶
type Subject struct { Image string Summary string Name string Date string // first release date NameCN string Infobox string CompatRawTags []byte // compat field for old tags Tags []Tag OnHold uint32 Dropped uint32 Volumes uint32 Eps uint32 Wish uint32 Collect uint32 Doing uint32 ID SubjectID PlatformID uint16 TypeID SubjectType Ban uint8 Airtime uint8 // air weekday, start from NSFW bool Rating Rating Redirect SubjectID }
type SubjectCollection ¶ added in v0.20.9
type SubjectCollection uint8
const ( SubjectCollectionAll SubjectCollection = 0 // 全部 SubjectCollectionWish SubjectCollection = 1 // 想看 SubjectCollectionDone SubjectCollection = 2 // 看过 SubjectCollectionDoing SubjectCollection = 3 // 在看 SubjectCollectionOnHold SubjectCollection = 4 // 搁置 SubjectCollectionDropped SubjectCollection = 5 // 抛弃 )
func (*SubjectCollection) UnmarshalJSON ¶ added in v0.27.0
func (s *SubjectCollection) UnmarshalJSON(bytes []byte) error
type SubjectInternalRelation ¶
type SubjectPersonRelation ¶
type SubjectRevision ¶ added in v0.16.9
type SubjectRevision struct { Data *SubjectRevisionData RevisionCommon }
type SubjectRevisionData ¶
type SubjectType ¶
type SubjectType = uint8
const ( SubjectTypeAll SubjectType = 0 SubjectTypeBook SubjectType = 1 // 书籍 SubjectTypeAnime SubjectType = 2 // 动画 SubjectTypeMusic SubjectType = 3 // 音乐 SubjectTypeGame SubjectType = 4 // 游戏 SubjectTypeReal SubjectType = 6 // 三次元 )
type TimeLine ¶ added in v0.25.7
type TimeLine struct { *TimeLineMeta *TimeLineMemo }
type TimeLineBlogMemo ¶ added in v0.25.7
type TimeLineCat ¶ added in v0.25.7
type TimeLineCat = uint16
const ( TimeLineCatRelation TimeLineCat = 1 TimeLineCatGroup TimeLineCat = 1 TimeLineCatWiki TimeLineCat = 2 TimeLineCatSubject TimeLineCat = 3 TimeLineCatProgress TimeLineCat = 4 TimeLineCatSay TimeLineCat = 5 TimeLineCatBlog TimeLineCat = 6 TimeLineCatIndex TimeLineCat = 7 TimeLineCatMono TimeLineCat = 8 TimeLineCatDoujin TimeLineCat = 9 )
type TimeLineDoujinMemo ¶ added in v0.25.7
type TimeLineGroupMemo ¶ added in v0.25.7
type TimeLineID ¶ added in v0.25.7
type TimeLineID uint32
type TimeLineImage ¶ added in v0.25.7
type TimeLineImages ¶ added in v0.25.7
type TimeLineImages []TimeLineImage
type TimeLineIndexMemo ¶ added in v0.25.7
type TimeLineMemo ¶ added in v0.25.7
type TimeLineMemo struct { Cat TimeLineCat // Category Type uint16 Content *TimeLineMemoContent }
func NewTimeLineMemo ¶ added in v0.25.7
func NewTimeLineMemo[T TimeLineMemoContentType](content T) *TimeLineMemo
type TimeLineMemoContent ¶ added in v0.25.7
type TimeLineMemoContent struct { *TimeLineRelationMemo *TimeLineGroupMemo *TimeLineWikiMemo *TimeLineSubjectMemo *TimeLineProgressMemo *TimeLineSayMemo *TimeLineBlogMemo *TimeLineIndexMemo *TimeLineMonoMemo *TimeLineDoujinMemo }
type TimeLineMemoContentType ¶ added in v0.25.7
type TimeLineMemoContentType interface { *TimeLineRelationMemo | *TimeLineGroupMemo | *TimeLineWikiMemo | *TimeLineSubjectMemo | *TimeLineProgressMemo | *TimeLineSayMemo | *TimeLineBlogMemo | *TimeLineIndexMemo | *TimeLineMonoMemo | *TimeLineDoujinMemo }
type TimeLineMeta ¶ added in v0.25.7
type TimeLineMeta struct { ID TimeLineID UID UserID Related string Batch uint8 Source uint8 Replies uint32 Dateline uint32 Image TimeLineImages }
type TimeLineMonoMemo ¶ added in v0.25.7
type TimeLineProgressMemo ¶ added in v0.25.7
type TimeLineRelationMemo ¶ added in v0.25.7
type TimeLineSay ¶ added in v0.25.7
type TimeLineSay string
type TimeLineSayEdit ¶ added in v0.25.7
type TimeLineSayMemo ¶ added in v0.25.7
type TimeLineSayMemo struct { *TimeLineSay *TimeLineSayEdit }
type TimeLineSubjectMemo ¶ added in v0.25.7
type TimeLineWikiMemo ¶ added in v0.25.7
type TopicDetail ¶ added in v0.23.2
type TopicDisplay ¶ added in v0.25.9
type TopicDisplay uint8
const ( TopicDisplayBan TopicDisplay = 0 // 软删除 TopicDisplayNormal TopicDisplay = 1 TopicDisplayReview TopicDisplay = 2 )
type User ¶
type User struct { RegistrationTime time.Time NickName string Avatar string Sign string UserName string ID UserID UserGroup UserGroupID }
User is visible for everyone.
type UserEpisodeCollection ¶ added in v0.23.0
type UserEpisodeCollection struct { ID EpisodeID Type EpisodeCollection }
type UserGroupID ¶ added in v0.20.2
type UserGroupID = uint8
type UserSubjectCollection ¶ added in v0.22.5
type UserSubjectEpisodesCollection ¶ added in v0.23.0
type UserSubjectEpisodesCollection map[EpisodeID]UserEpisodeCollection
Click to show internal directories.
Click to hide internal directories.