Versions in this module Expand all Collapse all v1 v1.0.0 Sep 29, 2019 Changes in this version + const APIKeyHeader + const APIVersion + const BaseURL + var ErrMissingConfig = errors.New("missing configuration") + var ErrMissingRequiredParameter = errors.New("a required parameter is missing") + var ErrProtectedEndpoint = errors.New("to use this resource you need to provide an authentication method") + type Article struct + BodyHTML string + BodyMarkdown string + CanonicalURL *WebURL + CommentsCount uint + CoverImage *WebURL + CreatedAt *time.Time + CrossPostedAt *time.Time + Description string + EditedAt *time.Time + ID uint32 + LastCommentAt *time.Time + Path *WebURL + PositiveReactionsCount uint + Published bool + PublishedAt *time.Time + ReadablePublishDate string + Slug string + SocialImage *WebURL + TagList string + Tags Tags + Title string + TypeOf string + URL *WebURL + User User + type ArticleListOptions struct + Page int + State string + Tags string + Top string + Username string + type ArticleUpdate struct + BodyMarkdown string + CanonicalURL string + Description string + MainImage string + OrganizationID int32 + Published bool + Series *string + Tags []string + Title string + type ArticlesResource struct + API *Client + func (ar *ArticlesResource) Find(ctx context.Context, id uint32) (Article, error) + func (ar *ArticlesResource) List(ctx context.Context, opt ArticleListOptions) ([]ListedArticle, error) + func (ar *ArticlesResource) ListAllMyArticles(ctx context.Context, opts *MyArticlesOptions) ([]ListedArticle, error) + func (ar *ArticlesResource) ListForTag(ctx context.Context, tag string, page int) ([]ListedArticle, error) + func (ar *ArticlesResource) ListForUser(ctx context.Context, username string, page int) ([]ListedArticle, error) + func (ar *ArticlesResource) ListMyPublishedArticles(ctx context.Context, opts *MyArticlesOptions) ([]ListedArticle, error) + func (ar *ArticlesResource) ListMyUnpublishedArticles(ctx context.Context, opts *MyArticlesOptions) ([]ListedArticle, error) + func (ar *ArticlesResource) New(ctx context.Context, u ArticleUpdate) (Article, error) + func (ar *ArticlesResource) Update(ctx context.Context, u ArticleUpdate, id uint32) (Article, error) + type Client struct + Articles *ArticlesResource + BaseURL *url.URL + Config *Config + Context context.Context + HTTPClient httpClient + func NewClient(ctx context.Context, conf *Config, bc httpClient, bu string) (dev *Client, err error) + func (c *Client) NewRequest(method string, uri string, body io.Reader) (*http.Request, error) + type Config struct + APIKey string + InsecureOnly bool + func NewConfig(p bool, k string) (c *Config, err error) + type ErrorResponse struct + ErrorMessage string + Status int + func (e *ErrorResponse) Error() string + type FlareTag struct + BGColorHex string + Name string + TextColorHex string + type ListedArticle struct + BodyMarkdown string + CanonicalURL *WebURL + CommentsCount uint + CoverImage *WebURL + Description string + FlareTag *FlareTag + ID uint32 + Organization *Organization + Path string + PositiveReactionsCount uint + Published bool + PublishedAt *time.Time + PublishedTimestamp string + Slug string + TagList Tags + Title string + TypeOf string + URL *WebURL + User User + func (a *ListedArticle) UnmarshalJSON(b []byte) error + type MyArticlesOptions struct + Page int + PerPage int + type Organization struct + Name string + ProfileImage *WebURL + ProfileImage90 *WebURL + Slug string + Username string + type Tags []string + type User struct + GithubUsername string + Name string + ProfileImage *WebURL + ProfileImage90 *WebURL + TwitterUsername string + Username string + WebsiteURL *WebURL + type WebURL struct + func (s *WebURL) UnmarshalJSON(b []byte) error