Documentation
¶
Overview ¶
Package qiita は Qiita API のラッパーです.
References:
https://qiita.com/docs
Index ¶
- type Client
- func (c *Client) DeleteItem(uuid string) error
- func (c *Client) Item(uuid string) (ret *Item, err error)
- func (c *Client) Items(params map[string]interface{}) (ret []Item, err error)
- func (c *Client) Login(username, password string) error
- func (c *Client) Me(params map[string]interface{}) (ret *User, err error)
- func (c *Client) MyItems(params map[string]interface{}) (ret []Item, err error)
- func (c *Client) MyStocks(params map[string]interface{}) (ret []Item, err error)
- func (c *Client) PostItem(params map[string]interface{}) (ret *Item, err error)
- func (c *Client) RateLimit() (ret *RateLimit, err error)
- func (c *Client) SearchItems(query string, params map[string]interface{}) (ret []Item, err error)
- func (c *Client) StockItem(uuid string) error
- func (c *Client) TagItems(tag string, params map[string]interface{}) (ret []Item, err error)
- func (c *Client) Tags(params map[string]interface{}) (ret []Tag, err error)
- func (c *Client) UnStockItem(uuid string) error
- func (c *Client) UpdateItem(uuid string, params map[string]interface{}) (ret *Item, err error)
- func (c *Client) User(UserName string, params map[string]interface{}) (ret *User, err error)
- func (c *Client) UserFollowingTags(UserName string, params map[string]interface{}) (ret []Tag, err error)
- func (c *Client) UserFollowingUsers(UserName string, params map[string]interface{}) (ret []User, err error)
- func (c *Client) UserItems(UserName string, params map[string]interface{}) (ret []Item, err error)
- func (c *Client) UserStocks(UserName string, params map[string]interface{}) (ret []Item, err error)
- type Item
- type RateLimit
- type Tag
- type User
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClientWithToken ¶
func (*Client) DeleteItem ¶
func (*Client) PostItem ¶
Example ¶
c := NewClientWithToken("token")
param := map[string]interface{}{
"title": "Title",
"tags": []map[string]interface{}{
{"name": "Tag1", "versions": []string{"1.1", "1.2"}},
{"name": "Tag2", "versions": []string{"1.3", "1.4"}},
},
"body": "body",
"private": false,
"gist": true,
"tweet": true,
}
_, _ = c.PostItem(param)
func (*Client) RateLimit ¶
Example ¶
c := NewClient() ret, _ := c.RateLimit() fmt.Println(ret.Remaining)
func (*Client) SearchItems ¶
func (*Client) UnStockItem ¶
func (*Client) UpdateItem ¶
func (*Client) UserFollowingTags ¶
func (*Client) UserFollowingUsers ¶
type Item ¶
type Item struct {
ID int64 `json:"id"`
UpdatedAt string `json:"updated_at"`
Tags []struct {
Name string `json:"name"`
URLName string `json:"url_name"`
IconURL string `json:"icon_url"`
Versions []string `json:"versions"`
} `json:"tags"`
StockUsers []string `json:"stock_users"`
CommentCount int64 `json:"comment_count"`
URL string `json:"url"`
GistURL string `json:"gist_url"`
Tweet bool `json:"tweet"`
Title string `json:"title"`
StockCount int64 `json:"stock_count"`
Comments []struct {
ID int64 `json:"id"`
Uuid string `json:"uuid"`
User struct {
Name string `json:"name"`
URLName string `json:"url_name"`
ProfileImageURL string `json:"profile_image_url"`
} `json:"user"`
Body string `json:"body"`
} `json:"comments"`
Uuid string `json:"uuid"`
User struct {
Name string `json:"name"`
URLName string `json:"url_name"`
ProfileImageURL string `json:"profile_image_url"`
} `json:"user"`
UpdatedAtInWords string `json:"updated_at_in_words"`
Private bool `json:"private"`
Stocked bool `json:"stocked"`
Body string `json:"body"`
CreatedAt string `json:"created_at"`
CreatedAtInWords string `json:"created_at_in_words"`
}
type User ¶
type User struct {
Description string `json:"description"`
Facebook string `json:"facebook"`
Teams []struct {
Name string `json:"name"`
URLName string `json:"url_name"`
} `json:"teams"`
Name string `json:"name"`
ProfileImageURL string `json:"profile_image_url"`
URL string `json:"url"`
Organization string `json:"organization"`
Location string `json:"location"`
Github string `json:"github"`
Linkedin string `json:"linkedin"`
FollowingUsers int64 `json:"following_users"`
Items int64 `json:"items"`
URLName string `json:"url_name"`
WebsiteURL string `json:"website_url"`
Twitter string `json:"twitter"`
Followers int64 `json:"followers"`
}
Click to show internal directories.
Click to hide internal directories.