Documentation ¶
Index ¶
- func NewPeriod(period string) (startedAt, endedAt time.Time, err error)
- func VideoTypeToMemberTypes(vt VideoType) []string
- type Channel
- type ChannelSnippet
- type Channels
- type Creator
- type CreatorInfo
- type Creators
- type MemberType
- type Pagination
- type Period
- type Platform
- type Platforms
- type Status
- type ThumbnailURL
- type Video
- type VideoType
- type Videos
- func (vs Videos) FilterByChannels(channels Channels) Videos
- func (vs Videos) FilterDeletedVideos(comparedVideos Videos) Videos
- func (vs Videos) FilterUpdatedVideos(comparedVideos Videos) Videos
- func (vs Videos) IDs() []string
- func (vs Videos) SetVideoType(t VideoType) Videos
- func (vs Videos) UpdateCreatorInfo(cs Creators) Videos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VideoTypeToMemberTypes ¶
VideoTypeToMemberTypes represents the type of video.
Types ¶
type Channel ¶
type Channel struct { ID string CreatorID string Youtube ChannelSnippet Twitch ChannelSnippet TwitCasting ChannelSnippet Niconico ChannelSnippet }
Channel represents a channel.
type ChannelSnippet ¶
type ChannelSnippet struct { ID string Name string Description string ThumbnailURL ThumbnailURL PublishedAt time.Time TotalViewCount int SubscriberCount int TotalVideoCount int UpdateAt time.Time IsDeleted bool }
ChannelSnippet represents a channel snippet.
type Channels ¶
type Channels []*Channel
Channels represents a list of channels.
func (Channels) FilterUpdateTarget ¶
FilterUpdateTarget is ...
func (Channels) RetrieveYoutubeIDs ¶
RetrieveYoutubeIDs is ...
type Creator ¶
type Creator struct { ID string Name string MemberType MemberType ThumbnailURL ThumbnailURL Channel Channel }
Creator represents a content creator.
func NewCreator ¶
func NewCreator(id, name string, memberType MemberType, thumbnailURL ThumbnailURL, channel Channel) *Creator
NewCreator creates a new Creator.
type CreatorInfo ¶
type CreatorInfo struct { ID string ChannelID string Name string ThumbnailURL ThumbnailURL }
CreatorInfo represents the information about the creator of a video.
type Creators ¶
type Creators []*Creator
Creators is a slice of pointers to Creator.
func (Creators) RetrieveChannels ¶
RetrieveChannels is ...
type MemberType ¶
type MemberType string
const ( MemberTypeVspoJP MemberType = "vspo_jp" MemberTypeVspoEN MemberType = "vspo_en" MemberTypeGeneral MemberType = "general" )
func NewMemberType ¶
func NewMemberType(s string) (MemberType, error)
NewMemberType creates a new MemberType.
func (MemberType) String ¶
func (t MemberType) String() string
type Pagination ¶
type Pagination struct { CurrentPage uint64 PrevPage uint64 NextPage uint64 TotalPage uint64 TotalCount uint64 HasNext bool }
Pagination struct holds the information about the pagination of data.
func NewPagination ¶
func NewPagination( page uint64, limit uint64, totalCount uint64, ) *Pagination
NewPagination is a function to create a new Pagination instance. It takes the current page number, limit per page, and total count of items as parameters.
type Platform ¶
type Platform string
Platform represents a live platform.
func NewPlatform ¶
NewPlatform creates a new Platform type based on the provided string.
type Platforms ¶
type Platforms []Platform
func NewPlatforms ¶
NewPlatforms creates a new Platform type based on the provided string slice.
type ThumbnailURL ¶
type ThumbnailURL string
ThumbnailURL is a struct that represents the thumbnail of a video
func (ThumbnailURL) String ¶
func (t ThumbnailURL) String() string
type Video ¶
type Video struct { ID string Title string Description string PublishedAt *time.Time StartedAt *time.Time EndedAt *time.Time Platform Platform Status Status Tags []string ViewCount uint64 ThumbnailURL ThumbnailURL VideoType VideoType IsDeleted bool CreatorInfo CreatorInfo }
Video represents each platform video
type Videos ¶
type Videos []*Video
Videos is a slice of pointers to Video.
func (Videos) FilterByChannels ¶
func (Videos) FilterDeletedVideos ¶
func (Videos) FilterUpdatedVideos ¶
func (Videos) SetVideoType ¶
SetVideoType sets the video type of all videos in the slice.