Documentation ¶
Index ¶
- type Client
- func (c *Client) Do(req *http.Request, v interface{}) (*http.Response, error)
- func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)
- func (s *Client) PageIcon(title string) ([]byte, *http.Response, error)
- func (s *Client) PageList(lo *ListOptions) (*PageList, *http.Response, error)
- func (s *Client) PageText(title string) ([]byte, *http.Response, error)
- func (s *Client) PageTitle(title string) (*PageText, *http.Response, error)
- func (c *Client) Text(req *http.Request) (*http.Response, []byte, error)
- type Collaborator
- type Line
- type Links1
- type ListOptions
- type Page
- type PageList
- type PageText
- type RelatedPage
- type UserID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { BaseURL *url.URL ProjectName string UserAgent string // contains filtered or unexported fields }
Client is scrapbox API client
func (*Client) NewRequest ¶
NewRequest returns new http request
type Collaborator ¶
type Collaborator struct { ID string `json:"id"` Name string `json:"name"` DisplayName string `json:"displayName"` Photo string `json:"photo"` }
Collaborator is a collection of pagelist elements
type Line ¶
type Line struct { ID string `json:"id"` Text string `json:"text"` UserID string `json:"userId"` Created int `json:"created"` Updated int `json:"updated"` }
Line is a collection of pagelist elements
type Links1 ¶
type Links1 struct { ID string `json:"id"` Title string `json:"title"` TitleLc string `json:"titleLc"` Image string `json:"image"` Descriptions []string `json:"descriptions"` LinksLc []string `json:"linksLc"` Updated int `json:"updated"` Accessed int `json:"accessed"` }
Links1 is a collection of pagelist elements
type ListOptions ¶
ListOptions is an option for getting PageList
type Page ¶
type Page struct { ID string `json:"id"` Title string `json:"title"` Image string `json:"image"` Descriptions []string `json:"descriptions"` User UserID `json:"user"` Pin int `json:"pin"` Views int `json:"views"` Linked int `json:"linked"` CommitID string `json:"commitId"` Created int `json:"created"` Updated int `json:"updated"` Accessed int `json:"accessed"` SnapshotCreated int `json:"snapshotCreated"` }
Page is a collection of pagelist elements
type PageList ¶
type PageList struct { ProjectName string `json:"projectName"` Skip int `json:"skip"` Limit int `json:"limit"` Count int `json:"count"` Pages []Page `json:"pages"` }
PageList is a collection of pagelist elements
type PageText ¶
type PageText struct { ID string `json:"id"` Title string `json:"title"` Image string `json:"image"` Descriptions []string `json:"descriptions"` User UserID `json:"user"` Pin int `json:"pin"` Views int `json:"views"` Linked int `json:"linked"` CommitID string `json:"commitId"` Created int `json:"created"` Updated int `json:"updated"` Accessed int `json:"accessed"` SnapshotCreated int `json:"snapshotCreated"` Persistent bool `json:"persistent"` Lines []Line `json:"lines"` Links []string `json:"links"` Icons struct{} `json:"icons"` RelatedPages RelatedPage `json:"relatedPages"` Collaborators []Collaborator `json:"collaborators"` LastAccessed int `json:"lastAccessed"` }
PageText is a collection of pagelist elements
type RelatedPage ¶
type RelatedPage struct { Links1hop []Links1 `json:"links1hop"` // TODO: not implement Links2hop []interface{} `json:"links2hop"` Icons1hop []interface{} `json:"icons1hop"` }
RelatedPage is a collection of pagelist elements
Click to show internal directories.
Click to hide internal directories.