Documentation
¶
Index ¶
- func ListPosts(ctx context.Context, domain string, param url.Values) ([]Post, *Meta, error)
- func SetToken(t string)
- type Client
- func (c *Client) GetPost(ctx context.Context, domain string, id PostID) (*Post, error)
- func (c *Client) ListPosts(ctx context.Context, domain string, param url.Values) ([]Post, *Meta, error)
- func (c *Client) ListTags(ctx context.Context, domain string) ([]Tag, error)
- func (c *Client) NewPost(ctx context.Context, domain string, title string, body io.Reader, ...) (*Post, error)
- func (c *Client) NewRequest(ctx context.Context, method, _url string, body io.Reader, param *url.Values) (*http.Request, error)
- func (c *Client) UpdatePost(ctx context.Context, domain string, id PostID, body io.Reader, ...) (*Post, error)
- type Criteria
- type Meta
- type Post
- type PostID
- type PostOption
- type Scope
- type Tag
- type UpdateFields
- type User
- type UserID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
func (*Client) NewRequest ¶
type Criteria ¶
type Criteria struct {
Keywords []string
Include map[string][]interface{}
Exclude map[string][]interface{}
}
Criteria は、検索時の絞り込みオプションを定義する。
Notes:
指定可能なキーについては、 docbase 公式のオプションを参照してください。 https://help.docbase.io/posts/59432?list=%2Fsearch&q=%E6%A4%9C%E7%B4%A2#%E6%A4%9C%E7%B4%A2%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3
なお、Version 1.0 現在、`OR検索` には対応していません。
func (*Criteria) MarshalText ¶
type Post ¶
type Post struct {
ID PostID `json:"id"`
Title string `json:"title"`
Body string `json:"body"`
Draft bool `json:"draft"`
Archived bool `json:"archived"`
URL string `json:"url"`
CreatedAt string `json:"created_at"` // ISO 8601
UpdatedAt string `json:"updated_at"` // ISO 8601
Scope Scope `json:"scope"`
SharingURL string `json:"sharing_url"`
Tags []Tag `json:"tags"`
User User `json:"user"`
Stars int `json:"stars_count"`
GoodJob int `json:"good_jobs_count"`
Comments []interface{} `json:"comments"`
Groups []interface{} `json:"groups"`
}
type PostOption ¶
type UpdateFields ¶
type UpdateFields struct {
Title *string `json:"title,omitempty"`
Draft *bool `json:"draft,omitempty"`
Notice *bool `json:"notice,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Scope *string `json:"scope,omitempty"`
Groups *[]int `json:"groups,omitempty"`
}
UpdateFields は、更新対象のフィールドを保持します。
Click to show internal directories.
Click to hide internal directories.