Documentation ¶
Overview ¶
Categories functions
download related operations
General Information ¶
operations related to page interaction
Categories search functions ¶
tag related functions
Index ¶
- Constants
- func CategoryIndex(category, name string, c interface{}) error
- func DoujinshiCategoryIndex(name string, c interface{}) error
- func LegalCategory(category string) bool
- func MangaCategoryIndex(name string, c interface{}) error
- func Online() bool
- type Attribute
- type AttributeList
- type CommentBody
- type Content
- func (this *Content) ArtistsString() string
- func (this *Content) Comments() (*ContentCommentList, error)
- func (this *Content) CommentsPage(page uint) (*ContentCommentList, error)
- func (this *Content) Cover() (image.Image, error)
- func (this *Content) CoverBytes() ([]byte, error)
- func (this *Content) CoverUrl() (*url.URL, error)
- func (this *Content) Date() time.Time
- func (this *Content) Downloads() (DownloadList, error)
- func (this *Content) PosterUrl() (*url.URL, error)
- func (this *Content) ReadOnline() (PageList, error)
- func (this *Content) RelatedContent() (*RelatedContentList, error)
- func (this *Content) RelatedContentPage(page uint) (*RelatedContentList, error)
- func (this *Content) Sample() (image.Image, error)
- func (this *Content) SampleBytes() ([]byte, error)
- func (this *Content) SampleUrl() (*url.URL, error)
- func (this *Content) SaveCover(path string, perms os.FileMode) error
- func (this *Content) SaveSample(path string, perms os.FileMode) error
- func (this *Content) SeriesString() string
- func (this *Content) TagsString() string
- func (this *Content) TopComments() (*ContentCommentList, error)
- func (this *Content) TranslatorsString() string
- func (c *Content) UnmarshalJSON(b []byte) error
- func (this *Content) Url() (*url.URL, error)
- type ContentComment
- type ContentCommentList
- type ContentList
- func ControversialDoujinshi() (ContentList, error)
- func ControversialManga() (ContentList, error)
- func EnglishDoujinshi() (ContentList, error)
- func EnglishManga() (ContentList, error)
- func FavoritesDoujinshi() (ContentList, error)
- func FavoritesManga() (ContentList, error)
- func NewestDoujinshi() (ContentList, error)
- func NewestManga() (ContentList, error)
- func PopularDoujinshi() (ContentList, error)
- func PopularManga() (ContentList, error)
- type ContentSearchResults
- type Download
- type DownloadList
- type ErrorStatus
- type Forum
- type ForumCategory
- type ForumPost
- type ForumPosts
- type ForumPostsApiFunction
- type ForumTopics
- type ForumTopicsApiFunction
- type FrontPageFeaturedTopics
- type FrontPageList
- type FrontPagePoll
- type FrontPagePosts
- type GeneralInformation
- type Page
- func (this *Page) Image() (image.Image, error)
- func (this *Page) ImageBytes() ([]byte, error)
- func (this *Page) ImageUrl() (*url.URL, error)
- func (this *Page) SaveImage(path string, perms os.FileMode) error
- func (this *Page) SaveThumb(path string, perms os.FileMode) error
- func (this *Page) ThumbBytes() ([]byte, error)
- func (this *Page) ThumbUrl() (*url.URL, error)
- func (this *Page) Thumbnail() (image.Image, error)
- type PageList
- type PollOption
- type PollOptionList
- type ReadOnlineContent
- type RelatedContentList
- type Tag
- type Topic
- type UnknownEntry
- type UserAchievement
- type UserAchievementList
- type UserComment
- type UserCommentList
- type UserFavorites
- type UserPost
- type UserPostList
- type UserPosts
- type UserProfile
- func (this *UserProfile) AvatarUrl() (*url.URL, error)
- func (this *UserProfile) Comments() (*UserCommentList, error)
- func (this *UserProfile) CommentsPage(page uint) (*UserCommentList, error)
- func (this *UserProfile) Favorites() (*UserFavorites, error)
- func (this *UserProfile) FavoritesPage(page uint) (*UserFavorites, error)
- func (this *UserProfile) Gold() bool
- func (this *UserProfile) LastVisit() time.Time
- func (this *UserProfile) Posts() (*UserPosts, error)
- func (this *UserProfile) PostsPage(page uint) (*UserPosts, error)
- func (this *UserProfile) RegistrationDate() time.Time
- func (this *UserProfile) Url() (*url.URL, error)
- type UserTopic
- type UserTopicList
- type UserTopics
- type UserTopicsApiFunction
Constants ¶
const ( CategoryManga = "manga" CategoryDoujinshi = "doujinshi" CategoryVideos = "videos" // Is this a legal category? )
const ( ErrorContentDoesntExist = "Content doesn't exist" ErrorUnknownJsonData = "Got unknown json data back from content request. API Change?" ErrorUnknownJsonLayout = "Got an unknown layout back from content request. API Change?" )
const ( ResponseOk = 200 ResponseNotFound = 404 )
Variables ¶
This section is empty.
Functions ¶
func CategoryIndex ¶
func DoujinshiCategoryIndex ¶
func LegalCategory ¶
func MangaCategoryIndex ¶
Types ¶
type Attribute ¶
type AttributeList ¶
type AttributeList []Attribute
func (AttributeList) JoinString ¶
func (this AttributeList) JoinString(separator string) string
type CommentBody ¶
type CommentBody struct { Id int64 `json:"comment_id"` Parent int64 `json:"comment_attached_id"` Reputation float64 `json:"comment_reputation"` Text string `json:"comment_text"` RawDate int64 `json:"comment_date"` }
Most of the data returned from the fakku rest api are statements made by users in some sort of aggregation A statement can be a post, comment, or topic An aggregation can be a topic, content, user, forum,
The problem is that there are usually two aggregators (ways) which can be used to get to the same core statement The difference is the link that refers to the other aggregate embedded in the structure.
For example, there are two types of comment: user-aggregate comment and content-aggregate comment the actual content (minus the other aggregate reference) is the same between the two types.
In real terms this means:
- a comment from a content-aggregate has the poster information in it (user-aggregate)
- a comment from a user-aggregate has the content information in it (content-aggregate)
I view this as each statement having two aggregate references to it. - Comment has references to: User and Content - Post has references to: User and Topic - Topic has reference to: User and Forum
Notice that each statement has a reference to the user which made the statement The other aggregate is where the statement is located (Content, Topic, Forum)
This implies that a User is really just an aggregator of different types of statements A "content" is just an aggregate of Statements made by users A topic is just an aggregate of Statements made by users A forum is just an aggregate of Statements made by users
While these statements are different the concept is still the same across all types of aggregates ¶
When dealing with the fact that there are two aggregates for each statement we have to remain cognizant of the "perspective" of how we got to that statement and where we can go and where we can go from that statement.
All of this is leading me to believe that it isn't easy to merge UserComments and ContentComments without losing some sort of perspective of where we came from.
func (*CommentBody) Date ¶
func (this *CommentBody) Date() time.Time
type Content ¶
type Content struct { Name string RawUrl string Description string Language string Category string RawDate int64 FileSize int64 Favorites int64 CommentCount int64 Pages int64 Poster string RawPosterUrl string Tags AttributeList `json:"content_tags"` Translators AttributeList `json:"content_translators"` Series AttributeList `json:"content_series"` Artists AttributeList `json:"content_artists"` Images struct { RawCover string RawSample string } // contains filtered or unexported fields }
func GetContent ¶
func (*Content) ArtistsString ¶
func (*Content) Comments ¶
func (this *Content) Comments() (*ContentCommentList, error)
func (*Content) CommentsPage ¶
func (this *Content) CommentsPage(page uint) (*ContentCommentList, error)
func (*Content) CoverBytes ¶
func (*Content) Downloads ¶
func (this *Content) Downloads() (DownloadList, error)
func (*Content) ReadOnline ¶
func (*Content) RelatedContent ¶
func (this *Content) RelatedContent() (*RelatedContentList, error)
func (*Content) RelatedContentPage ¶
func (this *Content) RelatedContentPage(page uint) (*RelatedContentList, error)
func (*Content) SampleBytes ¶
func (*Content) SeriesString ¶
func (*Content) TagsString ¶
func (*Content) TopComments ¶
func (this *Content) TopComments() (*ContentCommentList, error)
func (*Content) TranslatorsString ¶
func (*Content) UnmarshalJSON ¶
type ContentComment ¶
type ContentComment struct { CommentBody Poster string `json:"comment_poster_name"` RawUrl string `json:"comment_poster_url"` }
func (*ContentComment) User ¶
func (this *ContentComment) User() (*UserProfile, error)
type ContentCommentList ¶
type ContentCommentList struct { Comments []ContentComment `json:"comments"` PageNumber int `json:"page"` Total int `json:"total"` Pages int `json:"pages"` }
func ContentComments ¶
func ContentComments(category, name string) (*ContentCommentList, error)
func ContentCommentsPage ¶
func ContentCommentsPage(category, name string, page uint) (*ContentCommentList, error)
func ContentTopComments ¶
func ContentTopComments(category, name string) (*ContentCommentList, error)
type ContentList ¶
type ContentList []Content
func ControversialDoujinshi ¶
func ControversialDoujinshi() (ContentList, error)
func ControversialManga ¶
func ControversialManga() (ContentList, error)
func EnglishDoujinshi ¶
func EnglishDoujinshi() (ContentList, error)
func EnglishManga ¶
func EnglishManga() (ContentList, error)
func FavoritesDoujinshi ¶
func FavoritesDoujinshi() (ContentList, error)
func FavoritesManga ¶
func FavoritesManga() (ContentList, error)
func NewestDoujinshi ¶
func NewestDoujinshi() (ContentList, error)
func NewestManga ¶
func NewestManga() (ContentList, error)
func PopularDoujinshi ¶
func PopularDoujinshi() (ContentList, error)
func PopularManga ¶
func PopularManga() (ContentList, error)
type ContentSearchResults ¶
type ContentSearchResults struct { Content ContentList `json:"content"` Total uint `json:"total"` Pages uint `json:"pages"` }
func ContentSearch ¶
func ContentSearch(terms string) (*ContentSearchResults, error)
func ContentSearchPage ¶
func ContentSearchPage(terms string, page uint) (*ContentSearchResults, error)
type Download ¶
type Download struct { Type string `json:"download_type"` RawUrl string `json:"download_url"` Info string `json:"download_info"` DownloadCount float64 `json:"download_count"` RawTime float64 `json:"download_time"` Poster string `json:"download_poster"` RawPosterUrl string `json:"download_poster_url"` }
type DownloadList ¶
type DownloadList []Download
func ContentDownloads ¶
func ContentDownloads(category, name string) (DownloadList, error)
func (DownloadList) HasDownloads ¶
func (this DownloadList) HasDownloads() bool
type ErrorStatus ¶
func (ErrorStatus) Error ¶
func (e ErrorStatus) Error() string
type Forum ¶
type Forum struct { Name string `json:"forum_name"` Description string `json:"forum_description"` RawUrl string `json:"forum_url"` Posts uint `json:"forum_posts"` TopicCount uint `json:"forum_topics"` Silent uint `json:"forum_silent"` Total uint `json:"total"` Page uint `json:"page"` PageCount uint `json:"pages"` Topics []Topic `json:"topics"` RecentTopic Topic `json:"forum_recent_topic"` // this is used in some calls but not others :/ }
type ForumCategory ¶
type ForumCategory struct { Title string `json:"category_title"` Order uint `json:"category_order"` Forums []Forum `json:"forums"` }
func GetForumCategories ¶
func GetForumCategories() ([]ForumCategory, error)
type ForumPost ¶
type ForumPost struct { Id uint `json:"post_id"` Date uint `json:"post_date"` Poster string `json:"post_poster"` PosterUrl string `json:"post_poster_url"` Text string `json:"post_text"` Image string `json:"post_image"` Thumb string `json:"post_thumb"` Reputation int `json:"post_reputation"` User *UserProfile `json:"post_user"` }
type ForumPosts ¶
type ForumPosts struct { Topic *Topic `json:"topic"` Forum *Forum `json:"forum"` Posts []*ForumPost `json:"posts"` Total uint `json:"total"` Page uint `json:"page"` Pages uint `json:"pages"` }
func GetForumPosts ¶
func GetForumPosts(forum, topic string) (*ForumPosts, error)
func GetForumPostsPage ¶
func GetForumPostsPage(forum, topic string, page uint) (*ForumPosts, error)
type ForumPostsApiFunction ¶
type ForumPostsApiFunction struct { Forum string Topic string // contains filtered or unexported fields }
func (ForumPostsApiFunction) Construct ¶
func (c ForumPostsApiFunction) Construct() string
type ForumTopics ¶
type ForumTopics struct { Forum *Forum `json:"forum"` Topics []*Topic `json:"topics"` Total uint `json:"total"` Page uint `json:"page"` Pages uint `json:"pages"` }
func GetForumTopics ¶
func GetForumTopics(forum string) (*ForumTopics, error)
func GetForumTopicsPage ¶
func GetForumTopicsPage(forum string, page uint) (*ForumTopics, error)
type ForumTopicsApiFunction ¶
type ForumTopicsApiFunction struct { Forum string // contains filtered or unexported fields }
func (ForumTopicsApiFunction) Construct ¶
func (c ForumTopicsApiFunction) Construct() string
type FrontPageFeaturedTopics ¶
func GetFrontPageFeaturedTopics ¶
func GetFrontPageFeaturedTopics() (*FrontPageFeaturedTopics, error)
type FrontPageList ¶
type FrontPageList []interface{}
type FrontPagePoll ¶
type FrontPagePoll struct { Question string `json:"poll_question"` RawUrl string `json:"poll_url"` Options PollOptionList `json:"poll_options"` }
func GetFrontPagePoll ¶
func GetFrontPagePoll() (*FrontPagePoll, error)
func (*FrontPagePoll) UnmarshalJSON ¶
func (c *FrontPagePoll) UnmarshalJSON(b []byte) error
type FrontPagePosts ¶
type FrontPagePosts struct { Index FrontPageList `json:"index"` Total uint `json:"total"` }
func GetFrontPage ¶
func GetFrontPage() (*FrontPagePosts, error)
func GetFrontPagePostsPage ¶
func GetFrontPagePostsPage(page uint) (*FrontPagePosts, error)
func (*FrontPagePosts) UnmarshalJSON ¶
func (c *FrontPagePosts) UnmarshalJSON(b []byte) error
type GeneralInformation ¶
type GeneralInformation struct { Title string `json:"title"` RawUrl string `json:"url"` Documentation string `json:"documentation"` }
func GetGeneralInformation ¶
func GetGeneralInformation() (*GeneralInformation, error)
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
func (*Page) ImageBytes ¶
func (*Page) ThumbBytes ¶
type PollOption ¶
func (*PollOption) String ¶
func (this *PollOption) String() string
type PollOptionList ¶
type PollOptionList []PollOption
type ReadOnlineContent ¶
func ReadOnline ¶
func ReadOnline(category, name string) (*ReadOnlineContent, error)
func (*ReadOnlineContent) UnmarshalJSON ¶
func (r *ReadOnlineContent) UnmarshalJSON(b []byte) error
type RelatedContentList ¶
type RelatedContentList struct { Related ContentList `json:"related"` Total uint `json:"total"` Pages uint `json:"pages"` }
func RelatedContent ¶
func RelatedContent(category, name string) (*RelatedContentList, error)
func RelatedContentPage ¶
func RelatedContentPage(category, name string, page uint) (*RelatedContentList, error)
func (*RelatedContentList) UnmarshalJSON ¶
func (c *RelatedContentList) UnmarshalJSON(b []byte) error
type Tag ¶
type Topic ¶
type Topic struct { Title string `json:"topic_title"` RawUrl string `json:"topic_url"` TopicTime uint `json:"topic_time"` FirstPostId uint `json:"topic_first_post_id"` LastPostId uint `json:"topic_last_post_id"` FrontPage uint `json:"front_page"` Status uint `json:"topic_status"` Vote uint `json:"topic_vote"` Type uint `json:"topic_type"` Poster string `json:"topic_poster"` RawPosterUrl string `json:"topic_poster_url"` RawTime int64 `json:"topic_url"` }
func (*Topic) OnFrontPage ¶
type UnknownEntry ¶
type UnknownEntry struct {
Message string
}
func (UnknownEntry) Error ¶
func (e UnknownEntry) Error() string
type UserAchievement ¶
type UserAchievement struct { Name string `json:"achievement_name"` Description string `json:"achievement_description"` RawIcon string `json:"achievement_icon"` Class string `json:"achievement_class"` RawDate int64 `json:"achievement_date"` }
func (*UserAchievement) Date ¶
func (this *UserAchievement) Date() time.Time
func (*UserAchievement) String ¶
func (this *UserAchievement) String() string
type UserAchievementList ¶
type UserAchievementList []UserAchievement
func GetUserAchievements ¶
func GetUserAchievements(user string) (UserAchievementList, error)
type UserComment ¶
type UserComment struct { CommentBody ContentName string `json:"comment_content_name"` RawUrl string `json:"comment_content_url"` }
func (*UserComment) Content ¶
func (this *UserComment) Content() (*Content, error)
func (*UserComment) ContentUrl ¶
func (this *UserComment) ContentUrl() (*url.URL, error)
type UserCommentList ¶
type UserCommentList struct { Comments []UserComment `json:"comments"` Total uint `json:"total"` Pages uint `json:"pages"` }
func UserComments ¶
func UserComments(user string) (*UserCommentList, error)
func UserCommentsPage ¶
func UserCommentsPage(user string, page uint) (*UserCommentList, error)
type UserFavorites ¶
type UserFavorites struct { Favorites ContentList `json:"favorites"` Total uint `json:"total"` Pages uint `json:"pages"` }
func GetUserFavorites ¶
func GetUserFavorites(user string) (*UserFavorites, error)
func GetUserFavoritesPage ¶
func GetUserFavoritesPage(user string, page uint) (*UserFavorites, error)
type UserPost ¶
type UserPostList ¶
type UserPostList []UserPost
type UserPosts ¶
type UserPosts struct { Posts UserPostList `json:"posts"` Total uint `json:"total"` Pages uint `json:"pages"` }
func GetUserPosts ¶
type UserProfile ¶
type UserProfile struct { Username string `json:"user_username"` RawUrl string `json:"user_url"` Rank string `json:"user_rank"` RawAvatar string `json:"user_avatar"` RawRegistrationDate int64 `json:"user_registration_date"` RawLastVisit int64 `json:"user_last_visit"` Subscribed uint `json:"user_subscribed"` PostCount uint `json:"user_posts"` Topics uint `json:"user_topics"` CommentCount uint `json:"user_comments"` Signature string `json:"user_signature"` ForumReputation int `json:"user_forum_reputation"` CommentReputation int `json:"user_comment_reputation"` RawGold uint `json:"user_gold"` }
DAMN, I can't just have Go convert these to bools for me. I'll need to do the conversion manually
func GetUser ¶
func GetUser(name string) (*UserProfile, error)
func (*UserProfile) Comments ¶
func (this *UserProfile) Comments() (*UserCommentList, error)
func (*UserProfile) CommentsPage ¶
func (this *UserProfile) CommentsPage(page uint) (*UserCommentList, error)
func (*UserProfile) Favorites ¶
func (this *UserProfile) Favorites() (*UserFavorites, error)
func (*UserProfile) FavoritesPage ¶
func (this *UserProfile) FavoritesPage(page uint) (*UserFavorites, error)
func (*UserProfile) Gold ¶
func (this *UserProfile) Gold() bool
func (*UserProfile) LastVisit ¶
func (this *UserProfile) LastVisit() time.Time
func (*UserProfile) Posts ¶
func (this *UserProfile) Posts() (*UserPosts, error)
func (*UserProfile) RegistrationDate ¶
func (this *UserProfile) RegistrationDate() time.Time
type UserTopic ¶
type UserTopic struct { Title string `json:"topic_title"` RawUrl string `json:"topic_url"` RawTime int64 `json:"topic_time"` Replies uint `json:"topic_replies"` Status uint `json:"topic_status"` Poll uint `json:"topic_poll"` LastPostId uint `json:"topic_last_post_id"` PostPreview string `json:"topic_post_preview"` Poster string `json:"topic_poster"` RawPosterUrl string `json:"topic_poster_url"` }
type UserTopicList ¶
type UserTopicList []UserTopic
type UserTopics ¶
type UserTopics struct { Topics UserTopicList `json:"topics"` Total uint `json:"total"` Pages uint `json:"pages"` }
func GetUserTopics ¶
func GetUserTopics(user string) (*UserTopics, error)
func GetUserTopicsPage ¶
func GetUserTopicsPage(user string, page uint) (*UserTopics, error)
type UserTopicsApiFunction ¶
type UserTopicsApiFunction struct {
// contains filtered or unexported fields
}
func (UserTopicsApiFunction) Construct ¶
func (c UserTopicsApiFunction) Construct() string