Documentation ¶
Index ¶
- Constants
- type Account
- type Client
- func (client *Client) CreateAccount(shortName string, option *CreateAccountOption) (account *Account, err error)
- func (client *Client) CreatePage(title string, content []Node, option *CreatePageOption) (page *Page, err error)
- func (client *Client) EditAccountInfo(option *EditAccountInfoOption) (account *Account, err error)
- func (client *Client) EditPage(path, title string, content []Node, option *EditPageOption) (page *Page, err error)
- func (client *Client) GetAccountInfo(option *GetAccountInfoOption) (account *Account, err error)
- func (client *Client) GetPage(path string, option *GetPageOption) (page *Page, err error)
- func (client *Client) GetPageList(option *GetPageListOption) (pageList *PageList, err error)
- func (client *Client) GetViews(path string, year, month, day int, option *GetViewsOption) (pageViews *PageViews, err error)
- func (client *Client) RevokeAccessToken() (account *Account, err error)
- func (client *Client) Upload(filenames []string) (paths []string, err error)
- type ClientOption
- type CreateAccountOption
- type CreatePageOption
- type EditAccountInfoOption
- type EditPageOption
- type GetAccountInfoOption
- type GetPageListOption
- type GetPageOption
- type GetViewsOption
- type Node
- type NodeElement
- type Page
- type PageList
- type PageViews
Constants ¶
View Source
const ( FieldShortName = "short_name" FieldAuthorName = "author_name" FieldAuthorURL = "author_url" FieldAuthURL = "auth_url" FieldPageCount = "page_count" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { AccessToken string // contains filtered or unexported fields }
func NewClient ¶
func NewClient(accessToken string, option *ClientOption) (client *Client, err error)
func (*Client) CreateAccount ¶
func (client *Client) CreateAccount(shortName string, option *CreateAccountOption) (account *Account, err error)
func (*Client) CreatePage ¶
func (*Client) EditAccountInfo ¶
func (client *Client) EditAccountInfo(option *EditAccountInfoOption) (account *Account, err error)
func (*Client) GetAccountInfo ¶
func (client *Client) GetAccountInfo(option *GetAccountInfoOption) (account *Account, err error)
func (*Client) GetPage ¶
func (client *Client) GetPage(path string, option *GetPageOption) (page *Page, err error)
func (*Client) GetPageList ¶
func (client *Client) GetPageList(option *GetPageListOption) (pageList *PageList, err error)
func (*Client) RevokeAccessToken ¶
type ClientOption ¶
type CreateAccountOption ¶
type CreatePageOption ¶
type EditAccountInfoOption ¶
type EditPageOption ¶
type GetAccountInfoOption ¶
type GetAccountInfoOption struct {
Fields []string
}
type GetPageListOption ¶
type GetPageOption ¶
type GetPageOption struct {
ReturnContent bool
}
type GetViewsOption ¶
type GetViewsOption struct {
Hour int
}
type NodeElement ¶
type Page ¶
type Page struct { Path string `json:"path"` URL string `json:"url"` Title string `json:"title"` Description string `json:"description"` AuthorName string `json:"author_name,omitempty"` AuthorURL string `json:"author_url,omitempty"` ImageURL string `json:"image_url,omitempty"` Content []Node `json:"content,omitempty"` Views int `json:"views,omitempty"` CanEdit bool `json:"can_edit,omitempty"` }
Click to show internal directories.
Click to hide internal directories.