Documentation ¶
Index ¶
- Constants
- type AuthenticationResponse
- type CommentResponse
- type Conversation
- type Counters
- type Embed
- type Entry
- type EntryComment
- type EntryResponse
- type FavoriteResponse
- type FavoritesList
- type Link
- type LinkComment
- type Meta
- type Notification
- type PrivateMessage
- type Profile
- type RankSorting
- type TagsEntries
- type UpvoteType
- type Vote
- type VoteResponse
- type Voter
- type WykopError
- type WykopErrorMessage
- type WykopHandler
- func (wh *WykopHandler) AddComment(linkId uint, parentCommentId uint, content string, embedUrl string) (CommentResponse, *WykopError)
- func (wh *WykopHandler) AddEntryComment(entryId uint, comment string) (commentResponse CommentResponse, wypokError *WykopError)
- func (wh *WykopHandler) AddEntryCommentWithEmbeddedContent(entryId uint, comment string, embeddedUrl string) (commentResponse CommentResponse, wypokError *WykopError)
- func (wh *WykopHandler) BlockProfile(username string) (success bool, wypokError *WykopError)
- func (wh *WykopHandler) BuryLink(id uint) (returned [2]int, wypokError *WykopError)
- func (wh *WykopHandler) DeleteComment(commentId uint) (commentResponse CommentResponse, wykopError *WykopError)
- func (wh *WykopHandler) DeleteConversation(conversation string) (succeeded bool, wykopError *WykopError)
- func (wh *WykopHandler) DeleteEntry(id uint) (entryResponse EntryResponse, wypokError *WykopError)
- func (wh *WykopHandler) DeleteEntryComment(entryId uint, commentId uint) (commentResponse CommentResponse, wypokError *WykopError)
- func (wh *WykopHandler) EditComment(commentId uint, newContent string) (commentResponse CommentResponse, wykopError *WykopError)
- func (wh *WykopHandler) EditEntry(entryId uint, content string) (entryResponse EntryResponse, wypokError *WykopError)
- func (wh *WykopHandler) EditEntryComment(entryId uint, commentId uint, comment string) (commentResponse CommentResponse, wypokError *WykopError)
- func (wh *WykopHandler) FavoriteEntry(entryId uint) (favoriteResponse FavoriteResponse, wypokError *WykopError)
- func (wh *WykopHandler) GetConversation(conversation string) (messages []PrivateMessage, wykopError *WykopError)
- func (wh *WykopHandler) GetConversationsList() (conversationsList []Conversation, wykopError *WykopError)
- func (wh *WykopHandler) GetEntriesFromTag(tag string, page uint) (tagEntries TagsEntries, wypokError *WykopError)
- func (wh *WykopHandler) GetEntry(id uint) (entry Entry, wypokError *WykopError)
- func (wh *WykopHandler) GetFavoritesComments() (comments []LinkComment, wypokError *WykopError)
- func (wh *WykopHandler) GetFavoritesEntries() (entries []Entry, wypokError *WykopError)
- func (wh *WykopHandler) GetFavoritesListLinks(id uint) (links []Link, wypokError *WykopError)
- func (wh *WykopHandler) GetFavoritesLists() (lists []FavoritesList, wypokError *WykopError)
- func (wh *WykopHandler) GetMainPageLinks(page uint) (mainPageLinks []Link, wypokError *WykopError)
- func (wh *WykopHandler) GetProfile(username string) (profile Profile, wypokError *WykopError)
- func (wh *WykopHandler) GetProfileAdded(username string, page uint) (links []Link, wypokError *WykopError)
- func (wh *WykopHandler) GetProfileBuried(username string, page uint) (links []Link, wypokError *WykopError)
- func (wh *WykopHandler) GetProfileCommented(username string, page uint) (links []Link, wypokError *WykopError)
- func (wh *WykopHandler) GetProfileComments(username string, page uint) (linkComments []LinkComment, wypokError *WykopError)
- func (wh *WykopHandler) GetProfileDigged(username string, page uint) (links []Link, wypokError *WykopError)
- func (wh *WykopHandler) GetProfileEntries(username string, page uint) (entries []Entry, wypokError *WykopError)
- func (wh *WykopHandler) GetProfileEntriesComments(username string, page uint) (entryComments []EntryComment, wypokError *WykopError)
- func (wh *WykopHandler) GetProfileFavorites(username string) (links []Link, wypokError *WykopError)
- func (wh *WykopHandler) GetProfilePublished(username string, page uint) (links []Link, wypokError *WykopError)
- func (wh *WykopHandler) GetRank() (profiles []Profile, wypokError *WykopError)
- func (wh *WykopHandler) GetRankBySortingType(sorting RankSorting) (profiles []Profile, wypokError *WykopError)
- func (wh *WykopHandler) GetStreamEntries(page uint) (entries []Entry, wypokError *WykopError)
- func (wh *WykopHandler) GetStreamLast12HoursHotEntries(page uint) (entries []Entry, wypokError *WykopError)
- func (wh *WykopHandler) GetStreamLast24HoursHotEntries(page uint) (entries []Entry, wypokError *WykopError)
- func (wh *WykopHandler) GetStreamLast6HoursHotEntries(page uint) (entries []Entry, wypokError *WykopError)
- func (wh *WykopHandler) GetUpcomingLinks(page uint) (mainPageLinks []Link, wypokError *WykopError)
- func (wh *WykopHandler) LoginToWypok() *WykopError
- func (wh *WykopHandler) MinusComment(linkId uint, commentId uint) (vote Vote, wykopError *WykopError)
- func (wh *WykopHandler) ObserveProfile(username string) (success bool, wypokError *WykopError)
- func (wh *WykopHandler) PlusComment(linkId uint, commentId uint) (vote Vote, wykopError *WykopError)
- func (wh *WykopHandler) PostEntry(content string) (entryResponse EntryResponse, wypokError *WykopError)
- func (wh *WykopHandler) PostEntryWithEmbeddedContent(content string, embeddedUrl string) (entryResponse EntryResponse, wypokError *WykopError)
- func (wh *WykopHandler) PostEntryWithImage(content string, absolutePath string) (entryResponse EntryResponse, wypokError *WykopError)
- func (wh *WykopHandler) ProfileFollowed(username string, page uint) (profiles []Profile, wypokError *WykopError)
- func (wh *WykopHandler) ProfileFollowers(username string, page uint) (profiles []Profile, wypokError *WykopError)
- func (wh *WykopHandler) SendPrivateMessageTo(to string, message string) (succeeded bool, wykopError *WykopError)
- func (wh *WykopHandler) SendPrivateMessageWithEmbeddedUrlTo(to string, message string, embed string) (succeeded bool, wykopError *WykopError)
- func (wh *WykopHandler) SetAppKey(appKey string)
- func (wh *WykopHandler) SetConnectionKey(connectionKey string)
- func (wh *WykopHandler) SetSecret(secret string)
- func (wh *WykopHandler) UnblockProfile(username string) (success bool, wypokError *WykopError)
- func (wh *WykopHandler) UnobserveProfile(username string) (success bool, wypokError *WykopError)
- func (wh *WykopHandler) UnvoteEntry(entryId uint) (voteResponse VoteResponse, wypokError *WykopError)
- func (wh *WykopHandler) UnvoteEntryComment(entryId uint, commentId uint) (voteResponse VoteResponse, wypokError *WykopError)
- func (wh *WykopHandler) UpvoteEntry(entryId uint) (voteResponse VoteResponse, wypokError *WykopError)
- func (wh *WykopHandler) UpvoteEntryComment(entryId uint, commentId uint) (voteResponse VoteResponse, wypokError *WykopError)
- type WykopShitUserVote
- type WypokShitDate
Constants ¶
const ( COMMENTS_BASE_URL = "https://a.wykop.pl/comments/%s/appkey/%s/userkey/%s" FAKE_VOTE_VALUE = -9999 )
const ( LOGIN_URL = "https://a.wykop.pl/user/login/appkey/%s" LINK_INDEX = "https://a.wykop.pl/link/index/%s/appkey/%s" LINK_DIG = "https://a.wykop.pl/link/dig/%d/appkey/%s/userkey/%s" LINK_BURY = "https://a.wykop.pl/link/bury/%d/2/appkey/%s/userkey/%s" PROFILE_INDEX = "https://a.wykop.pl/profile/index/%s/appkey/%s" PROFILE_ADDED = "https://a.wykop.pl/profile/added/%s/appkey/%s/page/%d" PROFILE_GROUPS = "https://a.wykop.pl/profile/groups/%s/appkey/%s" PROFILE_PUBLISHED = "https://a.wykop.pl/profile/published/%s/appkey/%s/page/%d" PROFILE_COMMENTED = "https://a.wykop.pl/profile/commented/%s/appkey/%s/page/%d" PROFILE_COMMENTS = "https://a.wykop.pl/profile/comments/%s/appkey/%s/userkey/%s/page/%d" PROFILE_DIGGED = "https://a.wykop.pl/profile/digged/%s/appkey/%s/page/%d" PROFILE_BURIED = "https://a.wykop.pl/profile/buried/%s/appkey/%s/userkey/%s/page/%d" PROFILE_OBSERVE = "https://a.wykop.pl/profile/observe/%s/appkey/%s/userkey/%s" PROFILE_UNOBSERVE = "https://a.wykop.pl/profile/unobserve/%s/appkey/%s/userkey/%s" PROFILE_BLOCK = "https://a.wykop.pl/profile/block/%s/userkey/%s/appkey/%s" // for some reason this order is important PROFILE_UNBLOCK = "https://a.wykop.pl/profile/unblock/%s/userkey/%s/appkey/%s" PROFILE_FOLLOWERS = "https://a.wykop.pl/profile/followers/%s/appkey/%s/page/%d" PROFILE_FOLLOWED = "https://a.wykop.pl/profile/followed/%s/appkey/%s/page/%d" PROFILE_ENTRIES = "https://a.wykop.pl/profile/entries/%s/appkey/%s/userkey/%s/page/%d" PROFILE_FAVORITES = "https://a.wykop.pl/profile/favorites/%s/appkey/%s/userkey/%s" PROFILE_ENTRY_COMMENTS = "https://a.wykop.pl/profile/entriesComments/%s/appkey/%s/userkey/%s/page/%d" ENTRY_INDEX = "https://a.wykop.pl/entries/index/%d/appkey/%s" ENTRY_ADD = "https://a.wykop.pl/entries/add/appkey/%s/userkey/%s" ENTRY_EDIT = "https://a.wykop.pl/entries/edit/%d/appkey/%s/userkey/%s" ENTRY_DELETE = "https://a.wykop.pl/entries/delete/%d/appkey/%s/userkey/%s" ENTRY_ADD_COMMENT = "https://a.wykop.pl/entries/addComment/%d/appkey/%s/userkey/%s" ENTRY_COMMENT_EDIT = "https://a.wykop.pl/entries/editComment/%d/%d/appkey/%s/userkey/%s" ENTRY_COMMENT_DELETE = "https://a.wykop.pl/entries/deleteComment/%d/%d/appkey/%s/userkey/%s" ENTRY_VOTE = "https://a.wykop.pl/entries/vote/entry/%d/appkey/%s/userkey/%s" ENTRY_COMMENT_VOTE = "https://a.wykop.pl/entries/vote/comment/%d/%d/appkey/%s/userkey/%s" ENTRY_UNVOTE = "https://a.wykop.pl/entries/unvote/entry/%d/appkey/%s/userkey/%s" ENTRY_COMMENT_UNVOTE = "https://a.wykop.pl/entries/unvote/comment/%d/%d/appkey/%s/userkey/%s" ENTRY_FAVORITE = "https://a.wykop.pl/entries/favorite/%d/appkey/%s/userkey/%s" RANK_INDEX = "https://a.wykop.pl/rank/index/appkey/%s/order/%s" MAIN_PAGE = "https://a.wykop.pl/links/promoted/appkey/%s/page/%d" MAIN_PAGE_LOGGEDIN = "https://a.wykop.pl/links/promoted/userkey/%s/appkey/%s/page/%d" UPCOMING_PAGE = "https://a.wykop.pl/links/upcoming/appkey/%s/page/%d" UPCOMING_PAGE_LOGGEDIN = "https://a.wykop.pl/links/upcoming/userkey/%s/appkey/%s/page/%d" ENTRIES_FROM_TAG = "https://a.wykop.pl/tag/entries/%s/appkey/%s/page/%d" FAVORITES_INDEX = "https://a.wykop.pl/favorites/index/%d/appkey/%s/userkey/%s" FAVORITES_LISTS = "https://a.wykop.pl/favorites/lists/appkey/%s/userkey/%s" FAVORITES_COMMENTS = "https://a.wykop.pl/favorites/comments/appkey/%s/userkey/%s" FAVORITES_ENTRIES = "https://a.wykop.pl/favorites/entries/appkey/%s/userkey/%s" STREAM_INDEX = "https://a.wykop.pl/stream/index/appkey/%s/page/%d" STREAM_INDEX_LOGGEDIN = "https://a.wykop.pl/stream/index/userkey/%s/appkey/%s/page/%d" STREAM_HOT = "https://a.wykop.pl/stream/hot/appkey/%s/page/%d/period/%d" STREAM_HOT_LOGGEDIN = "https://a.wykop.pl/stream/hot/userkey/%s/appkey/%s/page/%d/period/%d" BASE_NOTIFICATIONS_URL = "https://a.wykop.pl/MYWYKOP/%s/appkey/%s/userkey/%s" )
const (
PM_URL_PATTERN = "https://a.wykop.pl/pm/%s/appkey/%s/userkey/%s"
)
const (
TRUE_WYPOK_ANSWER = "[true]"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationResponse ¶
type CommentResponse ¶
type CommentResponse struct {
ID uint `json:"id"`
}
type Conversation ¶
type Conversation struct { Author string `json:"author"` LastUpdate WypokShitDate `json:"last_update"` AuthorAvatar string `json:"author_avatar"` AuthorAvatarBig string `json:"author_avatar_big"` AuthorAvatarMed string `json:"author_avatar_med"` AuthorAvatarLow string `json:"author_avatar_Lo"` AuthorGroup int `json:"author_group"` AuthorSex string `json:"author_sex"` Status string `json:"status"` }
type Entry ¶
type Entry struct { ID uint Author string AuthorAvatar string `json:"author_avatar"` AuthorAvatarBig string `json:"author_big"` AuthorAvatarMed string `json:"author_med"` AuthorAvatarLo string `json:"author_lo"` AuthorGroup int `json:"author_group"` AuthorSex string `json:"author_sex"` Date WypokShitDate `json:"date"` Body string Source string Url string Receiver string ReceiverAvatar string `json:"receiver_avatar"` ReceiverAvatarBig string `json:"receiver_avatar_big"` ReceiverAvatarMed string `json:"receiver_avatar_med"` ReceiverAvatarLo string `json:"receiver_avatar_lo"` ReceiverGroup string `json:"receiver_group"` ReceiverSex string `json:"receiver_sex"` Comments []EntryComment Blocked bool VoteCount int `json:"vote_count"` UserVote int `json:"user_vote"` Voters []Voter UserFavorite bool `json:"user_favorite"` EntryType string `json:"type"` Embed Embed Deleted bool ViolationUrl string `json:"violation_url"` CanComment bool `json:"can_comment"` App string CommentCount int `json:"comment_count"` }
type EntryComment ¶
type EntryComment struct { ID uint `json:"id"` Author string `json:"author"` AuthorAvatar string `json:"author_avatar"` AuthorAvatarBig string `json:"author_avatar_big"` AuthorAvatarMed string `json:"author_avatar_med"` AuthorAvatarLo string `json:"author_avatar_lo"` AuthorGroup int `json:"author_group"` AuthorSex string `json:"author_sex"` Date WypokShitDate `json:"date"` Body string `json:"body"` Source string `json:"source"` EntryId int `json:"entry_id"` Blocked bool `json:"blocked"` Deleted bool `json:"deleted"` VoteCount int `json:"vote_count"` UserVote int `json:"user_vote"` Voters []Voter Embed Embed `json:"embed"` Type string `json:"type"` App string `json:"app"` ViolationURL string `json:"violation_url"` Entry Entry }
type EntryResponse ¶
type EntryResponse struct {
ID uint `json:"id"`
}
type FavoriteResponse ¶
type FavoriteResponse struct {
UserFavorite bool `json:"user_favorite"`
}
type FavoritesList ¶
type FavoritesList struct { ID uint `json:"id"` Name string `json:"name"` Public bool `json:"is_public"` }
FavoritesList contains properties of single favorites list
type Link ¶
type Link struct { ID uint Title string Description string Tags string Url string SourceUrl string `json:"source_url"` VoteCount int `json:"vote_count"` CommentCount int `json:"comment_count"` ReportCount int `json:"report_count"` Date WypokShitDate `json:"date"` Author string AuthorAvatar string `json:"avatar_avatar"` AuthorAvatarMed string `json:"avatar_med"` AuthorAvatarLo string `json:"avatar_lo"` AuthorGroup int `json:"author_group"` AuthorSex string `json:"author_sex"` Preview string UserLists []int `json:"user_lists"` Plus18 bool `json:"plus_18"` Status string CanVote bool `json:"can_vote"` IsHot bool `json:"is_hot"` HasOwnContent bool `json:"has_own_content"` Category string CategoryName string `json:"category_name,omitempty"` UserVote WykopShitUserVote `json:"user_vote,omitempty"` UserObserve bool `json:"user_observe,omitempty"` UserFavorite bool `json:"user_favorite,omitempty"` }
type LinkComment ¶
type LinkComment struct { ID uint `json:"id"` Date string `json:"date"` Author string `json:"author"` AuthorGroup int `json:"author_group"` AuthorAvatar string `json:"author_avatar"` AuthorAvatarBig string `json:"author_avatar_big"` AuthorAvatarMed string `json:"author_avatar_med"` AuthorAvatarLo string `json:"author_avatar_lo"` AuthorSex string `json:"author_sex"` VoteCount int `json:"vote_count"` VoteCountPlus int `json:"vote_count_plus"` VoteCountMinus int `json:"vote_count_minus"` Body string `json:"body"` Source string `json:"source"` ParentID int `json:"parent_id"` Status string `json:"status"` CanVote bool `json:"can_vote"` UserVote WykopShitUserVote `json:"user_vote"` Blocked bool `json:"blocked"` Deleted bool `json:"deleted"` Embed Embed `json:"embed"` Type string `json:"type"` App string `json:"app"` UserFavorite bool `json:"user_favorite"` ViolationURL string `json:"violation_url"` Link Link }
type Notification ¶
type Notification struct { ID uint `json:"id"` Author string `json:"author"` Avatar string `json:"author_avatar"` AvatarMedium string `json:"author_avatar_med"` AvatarLow string `json:"author_avatar_lo"` AvatarBig string `json:"author_avatar_big"` AuthorGroup string `json:"author_group"` AuthorSex string `json:"author_sex"` Date WypokShitDate `json:"date"` Content string `json:"body"` Type string `json:"type"` Url string `json:"url"` }
type PrivateMessage ¶
type PrivateMessage struct { Author string `json:"author"` AuthorAvatar string `json:"author_avatar"` AuthorAvatarBig string `json:"author_avatar_big"` AuthorAvatarMed string `json:"author_avatar_med"` AuthorAvatarLow string `json:"author_avatar_Lo"` AuthorGroup int `json:"author_group"` AuthorSex string `json:"author_sex"` Status string `json:"status"` Date WypokShitDate `json:"date"` Content string `json:"body"` Direction string `json:"direction"` Embed Embed `json:"embed"` App string `json:"app"` }
type Profile ¶
type Profile struct { ID uint Login string Email string PublicEmail string `json:"public_email"` Name string Www string Jabber string City string About string AuthorGroup int `json:"author_group"` LinksAdded int `json:"links_added"` LinksPublished int `json:"links_published"` Comments int Rank int Followers int Following int Entries int EntriesComments int `json:"entries_comments"` Diggs int Buries int RelatedLinks int `json:"related_links"` Groups int Sex string Avatar string AvatarLo string `json:"avatar_lo"` AvatarMed string `json:"avatar_med"` AvatarBig string `json:"avatar_big"` IsObserved bool `json:"is_observed"` }
type RankSorting ¶
type RankSorting int
func (RankSorting) String ¶
func (m RankSorting) String() string
return sorting type string based on int value of const
type TagsEntries ¶
type UpvoteType ¶
type UpvoteType uint
func (UpvoteType) String ¶
func (m UpvoteType) String() string
return sorting type string based on uint value of const
type VoteResponse ¶
type VoteResponse struct {
Vote int
}
type Voter ¶
type Voter struct { Author string AuthorAvatar string `json:"author_avatar"` AuthorAvatarBig string `json:"author_big"` AuthorAvatarMed string `json:"author_med"` AuthorAvatarLo string `json:"author_lo"` AuthorSex string `json:"author_sex"` AuthorGroup int `json:"author_group"` Date WypokShitDate `json:"date"` }
type WykopError ¶
type WykopError struct {
ErrorObject WykopErrorMessage `json:"error"`
}
type WykopErrorMessage ¶
type WykopHandler ¶
type WykopHandler struct {
// contains filtered or unexported fields
}
func (*WykopHandler) AddComment ¶
func (wh *WykopHandler) AddComment(linkId uint, parentCommentId uint, content string, embedUrl string) (CommentResponse, *WykopError)
* * parentCommentId - for a comment directly to link (so no parent comment) set to 0 *
func (*WykopHandler) AddEntryComment ¶
func (wh *WykopHandler) AddEntryComment(entryId uint, comment string) (commentResponse CommentResponse, wypokError *WykopError)
func (*WykopHandler) AddEntryCommentWithEmbeddedContent ¶
func (wh *WykopHandler) AddEntryCommentWithEmbeddedContent(entryId uint, comment string, embeddedUrl string) (commentResponse CommentResponse, wypokError *WykopError)
func (*WykopHandler) BlockProfile ¶
func (wh *WykopHandler) BlockProfile(username string) (success bool, wypokError *WykopError)
func (*WykopHandler) BuryLink ¶
func (wh *WykopHandler) BuryLink(id uint) (returned [2]int, wypokError *WykopError)
func (*WykopHandler) DeleteComment ¶
func (wh *WykopHandler) DeleteComment(commentId uint) (commentResponse CommentResponse, wykopError *WykopError)
func (*WykopHandler) DeleteConversation ¶
func (wh *WykopHandler) DeleteConversation(conversation string) (succeeded bool, wykopError *WykopError)
func (*WykopHandler) DeleteEntry ¶
func (wh *WykopHandler) DeleteEntry(id uint) (entryResponse EntryResponse, wypokError *WykopError)
func (*WykopHandler) DeleteEntryComment ¶
func (wh *WykopHandler) DeleteEntryComment(entryId uint, commentId uint) (commentResponse CommentResponse, wypokError *WykopError)
func (*WykopHandler) EditComment ¶
func (wh *WykopHandler) EditComment(commentId uint, newContent string) (commentResponse CommentResponse, wykopError *WykopError)
func (*WykopHandler) EditEntry ¶
func (wh *WykopHandler) EditEntry(entryId uint, content string) (entryResponse EntryResponse, wypokError *WykopError)
func (*WykopHandler) EditEntryComment ¶
func (wh *WykopHandler) EditEntryComment(entryId uint, commentId uint, comment string) (commentResponse CommentResponse, wypokError *WykopError)
func (*WykopHandler) FavoriteEntry ¶
func (wh *WykopHandler) FavoriteEntry(entryId uint) (favoriteResponse FavoriteResponse, wypokError *WykopError)
func (*WykopHandler) GetConversation ¶
func (wh *WykopHandler) GetConversation(conversation string) (messages []PrivateMessage, wykopError *WykopError)
func (*WykopHandler) GetConversationsList ¶
func (wh *WykopHandler) GetConversationsList() (conversationsList []Conversation, wykopError *WykopError)
func (*WykopHandler) GetEntriesFromTag ¶
func (wh *WykopHandler) GetEntriesFromTag(tag string, page uint) (tagEntries TagsEntries, wypokError *WykopError)
func (*WykopHandler) GetEntry ¶
func (wh *WykopHandler) GetEntry(id uint) (entry Entry, wypokError *WykopError)
func (*WykopHandler) GetFavoritesComments ¶
func (wh *WykopHandler) GetFavoritesComments() (comments []LinkComment, wypokError *WykopError)
GetFavoritesComments returns user favorites links comments. It requires privileges for profile.
func (*WykopHandler) GetFavoritesEntries ¶
func (wh *WykopHandler) GetFavoritesEntries() (entries []Entry, wypokError *WykopError)
GetFavoritesEntries returns user favorites entries. It requires privileges for profile.
func (*WykopHandler) GetFavoritesListLinks ¶
func (wh *WykopHandler) GetFavoritesListLinks(id uint) (links []Link, wypokError *WykopError)
GetFavoritesListLinks returns user favorites list links. It requires privileges for profile.
func (*WykopHandler) GetFavoritesLists ¶
func (wh *WykopHandler) GetFavoritesLists() (lists []FavoritesList, wypokError *WykopError)
GetFavoritesLists returns user favorites lists It requires privileges for profile.
func (*WykopHandler) GetMainPageLinks ¶
func (wh *WykopHandler) GetMainPageLinks(page uint) (mainPageLinks []Link, wypokError *WykopError)
func (*WykopHandler) GetProfile ¶
func (wh *WykopHandler) GetProfile(username string) (profile Profile, wypokError *WykopError)
func (*WykopHandler) GetProfileAdded ¶
func (wh *WykopHandler) GetProfileAdded(username string, page uint) (links []Link, wypokError *WykopError)
func (*WykopHandler) GetProfileBuried ¶
func (wh *WykopHandler) GetProfileBuried(username string, page uint) (links []Link, wypokError *WykopError)
func (*WykopHandler) GetProfileCommented ¶
func (wh *WykopHandler) GetProfileCommented(username string, page uint) (links []Link, wypokError *WykopError)
func (*WykopHandler) GetProfileComments ¶
func (wh *WykopHandler) GetProfileComments(username string, page uint) (linkComments []LinkComment, wypokError *WykopError)
func (*WykopHandler) GetProfileDigged ¶
func (wh *WykopHandler) GetProfileDigged(username string, page uint) (links []Link, wypokError *WykopError)
func (*WykopHandler) GetProfileEntries ¶
func (wh *WykopHandler) GetProfileEntries(username string, page uint) (entries []Entry, wypokError *WykopError)
func (*WykopHandler) GetProfileEntriesComments ¶
func (wh *WykopHandler) GetProfileEntriesComments(username string, page uint) (entryComments []EntryComment, wypokError *WykopError)
func (*WykopHandler) GetProfileFavorites ¶
func (wh *WykopHandler) GetProfileFavorites(username string) (links []Link, wypokError *WykopError)
func (*WykopHandler) GetProfilePublished ¶
func (wh *WykopHandler) GetProfilePublished(username string, page uint) (links []Link, wypokError *WykopError)
func (*WykopHandler) GetRank ¶
func (wh *WykopHandler) GetRank() (profiles []Profile, wypokError *WykopError)
func (*WykopHandler) GetRankBySortingType ¶
func (wh *WykopHandler) GetRankBySortingType(sorting RankSorting) (profiles []Profile, wypokError *WykopError)
func (*WykopHandler) GetStreamEntries ¶
func (wh *WykopHandler) GetStreamEntries(page uint) (entries []Entry, wypokError *WykopError)
GetStreamEntries returns entries from Mikroblog. If user is logged in, blocked tags will be filtered.
func (*WykopHandler) GetStreamLast12HoursHotEntries ¶
func (wh *WykopHandler) GetStreamLast12HoursHotEntries(page uint) (entries []Entry, wypokError *WykopError)
GetStreamLast12HoursHotEntries returns hot entries ("Gorące dyskusje") from Mikroblog which took place in last 12 hours If user is logged in, blocked tags will be filtered.
func (*WykopHandler) GetStreamLast24HoursHotEntries ¶
func (wh *WykopHandler) GetStreamLast24HoursHotEntries(page uint) (entries []Entry, wypokError *WykopError)
GetStreamLast24HoursHotEntries returns hot entries ("Gorące dyskusje") from Mikroblog which took place in last 24 hours If user is logged in, blocked tags will be filtered.
func (*WykopHandler) GetStreamLast6HoursHotEntries ¶
func (wh *WykopHandler) GetStreamLast6HoursHotEntries(page uint) (entries []Entry, wypokError *WykopError)
GetStreamLast6HoursHotEntries returns hot entries ("Gorące dyskusje") from Mikroblog which took place in last 6 hours If user is logged in, blocked tags will be filtered.
func (*WykopHandler) GetUpcomingLinks ¶
func (wh *WykopHandler) GetUpcomingLinks(page uint) (mainPageLinks []Link, wypokError *WykopError)
func (*WykopHandler) LoginToWypok ¶
func (wh *WykopHandler) LoginToWypok() *WykopError
func (*WykopHandler) MinusComment ¶
func (wh *WykopHandler) MinusComment(linkId uint, commentId uint) (vote Vote, wykopError *WykopError)
func (*WykopHandler) ObserveProfile ¶
func (wh *WykopHandler) ObserveProfile(username string) (success bool, wypokError *WykopError)
func (*WykopHandler) PlusComment ¶
func (wh *WykopHandler) PlusComment(linkId uint, commentId uint) (vote Vote, wykopError *WykopError)
func (*WykopHandler) PostEntry ¶
func (wh *WykopHandler) PostEntry(content string) (entryResponse EntryResponse, wypokError *WykopError)
func (*WykopHandler) PostEntryWithEmbeddedContent ¶
func (wh *WykopHandler) PostEntryWithEmbeddedContent(content string, embeddedUrl string) (entryResponse EntryResponse, wypokError *WykopError)
func (*WykopHandler) PostEntryWithImage ¶
func (wh *WykopHandler) PostEntryWithImage(content string, absolutePath string) (entryResponse EntryResponse, wypokError *WykopError)
func (*WykopHandler) ProfileFollowed ¶
func (wh *WykopHandler) ProfileFollowed(username string, page uint) (profiles []Profile, wypokError *WykopError)
func (*WykopHandler) ProfileFollowers ¶
func (wh *WykopHandler) ProfileFollowers(username string, page uint) (profiles []Profile, wypokError *WykopError)
func (*WykopHandler) SendPrivateMessageTo ¶
func (wh *WykopHandler) SendPrivateMessageTo(to string, message string) (succeeded bool, wykopError *WykopError)
func (*WykopHandler) SendPrivateMessageWithEmbeddedUrlTo ¶
func (wh *WykopHandler) SendPrivateMessageWithEmbeddedUrlTo(to string, message string, embed string) (succeeded bool, wykopError *WykopError)
func (*WykopHandler) SetAppKey ¶
func (wh *WykopHandler) SetAppKey(appKey string)
func (*WykopHandler) SetConnectionKey ¶
func (wh *WykopHandler) SetConnectionKey(connectionKey string)
func (*WykopHandler) SetSecret ¶
func (wh *WykopHandler) SetSecret(secret string)
func (*WykopHandler) UnblockProfile ¶
func (wh *WykopHandler) UnblockProfile(username string) (success bool, wypokError *WykopError)
func (*WykopHandler) UnobserveProfile ¶
func (wh *WykopHandler) UnobserveProfile(username string) (success bool, wypokError *WykopError)
func (*WykopHandler) UnvoteEntry ¶
func (wh *WykopHandler) UnvoteEntry(entryId uint) (voteResponse VoteResponse, wypokError *WykopError)
func (*WykopHandler) UnvoteEntryComment ¶
func (wh *WykopHandler) UnvoteEntryComment(entryId uint, commentId uint) (voteResponse VoteResponse, wypokError *WykopError)
func (*WykopHandler) UpvoteEntry ¶
func (wh *WykopHandler) UpvoteEntry(entryId uint) (voteResponse VoteResponse, wypokError *WykopError)
func (*WykopHandler) UpvoteEntryComment ¶
func (wh *WykopHandler) UpvoteEntryComment(entryId uint, commentId uint) (voteResponse VoteResponse, wypokError *WykopError)
type WykopShitUserVote ¶
type WykopShitUserVote string
func (*WykopShitUserVote) UnmarshalJSON ¶
func (value *WykopShitUserVote) UnmarshalJSON(data []byte) error
when user is NOT logged in, user_vote field will not be provided when user is logged in, user_vote might have value of "bury" or "dig" if user made such action in the past, however, when user didn't vote on the link wypok.pl provides user_vote as false (see no quotes), which golang unmarshaller tries to read as `bool` not `string` and panics. This wrapper type ensures that bool will be converted to string and string treated as string.
type WypokShitDate ¶
func (*WypokShitDate) UnmarshalJSON ¶
func (self *WypokShitDate) UnmarshalJSON(b []byte) (err error)