Versions in this module Expand all Collapse all v1 v1.0.6 Aug 1, 2024 v1.0.5 May 24, 2024 v1.0.4 Jun 25, 2023 v1.0.3 Jun 15, 2023 v1.0.2 Jan 10, 2023 Changes in this version type TopicServiceHandler + func (a *TopicServiceHandler) ShowPosts(ctx context.Context, id string, postIDs []int) (*SingleTopicResponse, error) type TopicsService + ShowPosts func(ctx context.Context, id string, postIDs []int) (*SingleTopicResponse, error) v1.0.1 Jan 9, 2023 v1.0.0 Jan 9, 2023 Changes in this version + const CategoriesBaseURL + const PostsBaseURL + const TopicsBaseURL + func NewStdLogger(l Logger) retryablehttp.Logger + type CategoriesService interface + List func(ctx context.Context) (*LatestCategoriesResponse, error) + type CategoryModel struct + CanEdit bool + Color string + DefaultListFilter string + DefaultTopPeriod string + DefaultView string + Description string + DescriptionExcerpt string + DescriptionText string + HasChildren bool + ID int + IsUncategorized bool + MinimumRequiredTags int + Name string + NavigateToFirstPostAfterRead bool + NotificationLevel int + NumFeaturedTopics int + Permission int + Position int + PostCount int + ReadRestricted bool + ShowSubcategoryList bool + Slug string + SortAscending string + SortOrder string + SubcategoryIDs []int + SubcategoryList []CategoryModel + SubcategoryListStyle string + TextColor string + TopicCount int + TopicTemplate string + TopicUrl string + TopicsAllTime int + TopicsDay int + TopicsMonth int + TopicsWeek int + TopicsYear int + UploadedBackground string + UploadedLogo string + UploadedLogoDark string + type CategoryServiceHandler struct + func (a *CategoryServiceHandler) List(ctx context.Context) (*LatestCategoriesResponse, error) + type Client struct + Categories CategoriesService + Posts PostsService + Topics TopicsService + func NewClient(cc *ClientConfig) *Client + func (c *Client) Do(ctx context.Context, req *http.Request, content interface{}) error + func (c *Client) NewRequest(ctx context.Context, method string, location string, body interface{}) (*http.Request, error) + type ClientConfig struct + Credentials map[string]string + Endpoint string + HTTPClient *http.Client + Logger Logger + func NewDefaultClientConfig(endpoint string, credentials map[string]string, logger Logger) ClientConfig + type CreatePostModel struct + Archetype string + Category int + CreatedAt string + EmbedURL string + ExternalID string + Raw string + ReplyToPostNumber int + TargetRecipients string + Title string + TopicID int + type ErrorBody struct + Errors []string + type LatestCategoriesResponse struct + CategoryList struct{ ... } + type LatestTopicsResponse struct + TopicList struct{ ... } + Users []struct{ ... } + type ListPostsResponse struct + LatestPosts []PostModel + type Logger interface + Debug func(args ...interface{}) + Debugf func(format string, args ...interface{}) + Error func(args ...interface{}) + Errorf func(format string, args ...interface{}) + Fatal func(args ...interface{}) + Fatalf func(format string, args ...interface{}) + Info func(args ...interface{}) + Infof func(format string, args ...interface{}) + Warn func(args ...interface{}) + Warnf func(format string, args ...interface{}) + type PostModel struct + ActionsSummary []struct{ ... } + Admin bool + AvatarTemplate string + CanDelete bool + CanEdit bool + CanRecover bool + CanViewEditHistory bool + CanWiki bool + CategoryID int + Cooked string + CreatedAt string + DeletedAt string + DisplayUsername string + EditReason string + FlairBGColor string + FlairColor string + FlairName string + FlairURL string + Hidden bool + ID int + IncomingLinkCount int + Moderator bool + Name string + PostNumber int + PostType int + PrimaryGroupName string + Raw string + ReadersCount int + Reads int + ReplyCount int + ReviewableID string + ReviewableScoreCount int + ReviewableScorePendingCount int + Score float32 + Staff bool + TopicHTMLTitle string + TopicID int + TopicSlug string + TopicTitle string + TrustLevel int + UpdatedAt string + UserDeleted bool + UserID int + UserTitle string + Username string + Version int + Wiki bool + Yours bool + type PostServiceHandler struct + func (a *PostServiceHandler) Create(ctx context.Context, w *CreatePostModel) (PostModel, error) + func (a *PostServiceHandler) List(ctx context.Context) (*ListPostsResponse, error) + func (a *PostServiceHandler) Show(ctx context.Context, id string) (PostModel, error) + type PostsService interface + Create func(ctx context.Context, w *CreatePostModel) (PostModel, error) + List func(ctx context.Context) (*ListPostsResponse, error) + Show func(ctx context.Context, id string) (PostModel, error) + type RequestError struct + Err error + func (re *RequestError) Error() string + type ShowPostResponse struct + Post PostModel + type SingleTopicResponse struct + PostStream struct{ ... } + type StdLogger struct + L Logger + func (l *StdLogger) Printf(message string, v ...interface{}) + type TopicModel struct + Archetype string + Archived bool + Bookmarked bool + Bumped bool + BumpedAt string + CategoryID int + Closed bool + CreatedAt string + FancyTitle string + FeaturedLink string + HasSummary bool + HighestPostNumber int + ID int + ImageURL string + LastPostedAt string + LastPosterUsername string + LastReadPostNumber int + LikeCount int + Liked bool + NotificationLevel int + OpLikeCount int + Pinned bool + PinnedGlobally bool + Posters []struct{ ... } + PostsCount int + ReplyCount int + Slug string + Title string + Unpinned string + UnreadPosts int + Unseen bool + Views int + Visible bool + type TopicServiceHandler struct + func (a *TopicServiceHandler) ListLatest(ctx context.Context, categorySlug string, categoryID int) (*LatestTopicsResponse, error) + func (a *TopicServiceHandler) Show(ctx context.Context, id string) (*SingleTopicResponse, error) + type TopicsService interface + ListLatest func(ctx context.Context, categorySlug string, categoryID int) (*LatestTopicsResponse, error) + Show func(ctx context.Context, id string) (*SingleTopicResponse, error)