Documentation ¶
Index ¶
- type AstMap
- type Attachment
- type Markdown
- type Post
- func (p Post) AstMap() AstMap
- func (p Post) Blocks() ([]Markdown, []Attachment)
- func (p Post) ContentWarnings() []string
- func (p Post) Filename() string
- func (p Post) Headline() string
- func (p Post) Id() int
- func (p Post) NumComments() int
- func (p Post) NumSharedComments() int
- func (p Post) PlainTextBody() string
- func (p Post) PostingProject() Project
- func (p Post) PublishedAt() time.Time
- func (p Post) RelatedProjects() []Project
- func (p Post) ShareTree() []Post
- func (p Post) State() int
- func (p Post) Tags() []string
- func (p Post) Url() string
- type Project
- func (p Project) AvatarShape() string
- func (p Project) AvatarURL() string
- func (p Project) Description() string
- func (p Project) DisplayName() string
- func (p Project) EditPost(postId int, adult bool, markdown []Markdown, attachments []Attachment, ...) (Post, error)
- func (p Project) Flags() [][]byte
- func (p Project) FrequentlyUsedTags() []string
- func (p Project) GetPosts(page int) ([]Post, error)
- func (p Project) Handle() string
- func (p Project) HeaderURL() string
- func (p Project) Headline() string
- func (p Project) Post(adult bool, markdown []Markdown, attachments []Attachment, tags, cws []string, ...) (Post, error)
- func (p Project) Privacy() string
- func (p Project) ProjectId() int
- func (p Project) Pronouns() string
- func (p Project) URL() string
- type User
- func (u User) Activated() bool
- func (u User) DefaultProject() (Project, error)
- func (u User) Email() string
- func (u User) GetEditedProjects() ([]Project, error)
- func (u User) GetProject(handle string) (Project, error)
- func (u User) Id() int
- func (u User) ModMode() bool
- func (u User) ProjectId() int
- func (u User) ReadOnly() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
func (Attachment) FileUrl ¶ added in v0.1.2
func (a Attachment) FileUrl() string
type Post ¶
type Post struct {
// contains filtered or unexported fields
}
func (Post) Blocks ¶
func (p Post) Blocks() ([]Markdown, []Attachment)
func (Post) ContentWarnings ¶
func (Post) NumComments ¶
func (Post) NumSharedComments ¶
func (Post) PlainTextBody ¶
func (Post) PostingProject ¶
func (Post) PublishedAt ¶
func (Post) RelatedProjects ¶ added in v0.2.0
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
func (Project) AvatarShape ¶
func (Project) Description ¶
func (Project) DisplayName ¶
func (Project) FrequentlyUsedTags ¶
func (Project) Post ¶
func (p Project) Post(adult bool, markdown []Markdown, attachments []Attachment, tags, cws []string, headline string, draft bool) (Post, error)
Makes a post on your current project Returns a Post struct that contains info about the post, including the postId needed for editing! Returns an empty Post in the case of a draft or an error
type User ¶
type User struct {
// contains filtered or unexported fields
}
func LoginWithCookie ¶
Start a user session with your connect.sid cookie from Cohost If you don't have any special needs for an HTTP client, pass it as nil
func LoginWithPass ¶
Start a user session with your Cohost email and password If you don't have any special needs for an HTTP client, pass it as nil
func (User) DefaultProject ¶
Returns your first project.
func (User) GetEditedProjects ¶
Lists all the projects for an authenticated user
func (User) GetProject ¶
Retrieve one of your projects by its handle
Click to show internal directories.
Click to hide internal directories.