Documentation ¶
Index ¶
- type Client
- type ErrorResponse
- type LinkHop
- type PageListResponse
- type PageResponse
- type PageService
- func (s *PageService) Get(ctx context.Context, projectName string, title string) (PageResponse, error)
- func (s *PageService) IconURL(ctx context.Context, projectName string, title string) (bool, *url.URL, error)
- func (s *PageService) List(ctx context.Context, projectName string, offset, limit uint) (PageListResponse, error)
- func (s *PageService) ListAll(ctx context.Context, projectName string) (PageListResponse, error)
- func (s *PageService) Text(ctx context.Context, projectName string, title string) (string, error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Page *PageService // contains filtered or unexported fields }
Client scrapbox client
type ErrorResponse ¶
type ErrorResponse struct { Name string `json:"name"` Message string `json:"message"` StatusCode uint `json:"statusCode"` }
ErrorResponse api error response
type LinkHop ¶
type LinkHop 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"` UpdatedUnixTime uint64 `json:"updated"` AccessedUnixTime uint64 `json:"accessed"` }
LinkHop page link hop
type PageListResponse ¶
type PageListResponse struct { ProjectName string `json:"projectName"` Skip uint `json:"skip"` Limit uint `json:"limit"` Count uint `json:"count"` Pages []*struct { ID string `json:"id"` Title string `json:"title"` Image string `json:"image"` Descriptions []string `json:"descriptions"` User struct { ID string `json:"id"` } `json:"user"` Pin uint64 `json:"pin"` Views uint `json:"views"` Linked uint `json:"linked"` CommitID string `json:"commitId"` CreatedUnixTime uint64 `json:"created"` UpdatedUnixTime uint64 `json:"updated"` AccessedUnixTime uint64 `json:"accessed"` SnapshotCreatedUnixTime uint64 `json:"snapshotCreated"` } `json:"pages"` }
PageListResponse /api/pages/:projectName のresponse https://scrapbox.io/help-jp/API#58e676b197c29100006748f7
type PageResponse ¶
type PageResponse struct { ID string `json:"id"` Title string `json:"title"` Image string `json:"image"` Descriptions []string `json:"descriptions"` User User `json:"user"` Pin uint64 `json:"pin"` Views uint `json:"views"` Linked uint `json:"linked"` CommitID string `json:"commitId"` CreatedUnixTime uint64 `json:"created"` UpdatedUnixTime uint64 `json:"updated"` AccessedUnixTime uint64 `json:"accessed"` SnapshotCreatedUnixTime uint64 `json:"snapshotCreated"` Persistent bool `json:"persistent"` Lines []struct { ID string `json:"id"` Text string `json:"text"` UserID string `json:"userId"` Created int `json:"created"` Updated int `json:"updated"` } `json:"lines"` Links []string `json:"links"` Icons struct{} `json:"icons"` // TODO: ? RelatedPages struct { Links1Hop []*LinkHop `json:"links1hop"` Links2Hop []*LinkHop `json:"links2hop"` Icons1Hop []interface{} `json:"icons1hop"` // TODO: ? } `json:"relatedPages"` Collaborators []interface{} `json:"collaborators"` // TODO: ? LastAccessedUnixTime uint64 `json:"lastAccessed"` }
PageResponse page response https://scrapbox.io/help-jp/API#58e6775897c29100006748fe
type PageService ¶
type PageService struct {
*Client
}
PageService page service
func (*PageService) Get ¶
func (s *PageService) Get(ctx context.Context, projectName string, title string) (PageResponse, error)
Get get page
func (*PageService) IconURL ¶
func (s *PageService) IconURL(ctx context.Context, projectName string, title string) (bool, *url.URL, error)
IconURL get page icon url
func (*PageService) List ¶
func (s *PageService) List(ctx context.Context, projectName string, offset, limit uint) (PageListResponse, error)
List get page list
func (*PageService) ListAll ¶
func (s *PageService) ListAll(ctx context.Context, projectName string) (PageListResponse, error)
List get page list
Click to show internal directories.
Click to hide internal directories.