Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client provides methods to interact with canny.io api
func (*Client) CreateComment ¶
func (s *Client) CreateComment(comment CreateComment) (string, error)
CreateComment create a new comment in Canny and returns its id or error
func (*Client) CreatePost ¶
func (s *Client) CreatePost(post CreatePost) (string, error)
CreatePost create a new post in Canny and returns its id or error
func (*Client) CreateVote ¶
func (s *Client) CreateVote(vote CreateVote) error
CreateVote create a new vote in Canny and returns its id or error
func (*Client) FindOrCreateUser ¶
func (s *Client) FindOrCreateUser(user FindOrCreateUser) (string, error)
FindOrCreateUser finds or creates a user
type CreateComment ¶
type CreateComment struct { AuthorID string `json:"authorID"` PostID string `json:"postID"` Value string `json:"value"` ImageURLs []string `json:"imageURLs,omitempty"` ParentID string `json:"parentID,omitempty"` }
CreateComment contains fields/params for a comments/create api call
type CreatePost ¶
type CreatePost struct { AuthorID string `json:"authorID"` BoardID string `json:"boardID"` Details string `json:"details"` Title string `json:"title"` ImageURLs []string `json:"imageURLs,omitempty"` }
CreatePost contains fields/params for a posts/create api call
type CreateVote ¶
CreateVote contains fields/params for a votes/create api call
type FindOrCreateUser ¶
type FindOrCreateUser struct { AvatarURL string `json:"avatarURL,omitempty"` Created time.Time `json:"created,omitempty"` Email string `json:"email,omitempty"` Name string `json:"name,omitempty"` UserID string `json:"userID,omitempty"` }
FindOrCreateUser contains fields/params for find_or_create api call
Click to show internal directories.
Click to hide internal directories.