Documentation ¶
Overview ¶
Package sqiima は Qiita API v2 のリクエストやレスポンスで使う JSON オブジェクトのスキーマ(構図)を Go の構造体に定義したセットです.
JSON スキーマは以下の公式ドキュメントを参考に作成しています。
- 参考文献: https://qiita.com/api/v2/schema (2021/08/23 現在)
Index ¶
- type AccessToken
- type AuthenticatedUser
- type Comment
- type CommentUser
- type ExpandedTemplate
- type ExpandedTemplateExpandedTagsItem
- type Group
- type ISO8601
- type Item
- type ItemGroup
- type ItemTagsItem
- type ItemTeamMembership
- type ItemUser
- type Items
- type Like
- type LikeUser
- type Project
- type Reaction
- type ReactionUser
- type RemoveTeamMember
- type Tag
- type Tagging
- type Team
- type TeamAccessToken
- type TeamInvitation
- type Template
- type TemplateExpandedTagsItem
- type TemplateTagsItem
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct { // ClientID : 登録された API クライアントを特定するための ID ClientID string `json:"client_id"` // Token : アクセストークンを表現する文字列 Token string `json:"token"` // Scopes : アクセストークンに許された操作の一覧 Scopes []string `json:"scopes"` }
AccessToken は Qiita API v2 で認証・認可を行うためのアクセストークンのオブジェクトを表します.
type AuthenticatedUser ¶
type AuthenticatedUser struct { // Description : 自己紹介文 Description *string `json:"description"` // FacebookID : Facebook ID FacebookID *string `json:"facebook_id"` // GithubLoginName : GitHub ID GithubLoginName *string `json:"github_login_name"` // LinkedinID : LinkedIn ID LinkedinID *string `json:"linkedin_id"` // Location : 居住地 Location *string `json:"location"` // Name : 設定している名前 Name *string `json:"name"` // Organization : 所属している組織 Organization *string `json:"organization"` // TwitterScreenName : Twitterのスクリーンネーム TwitterScreenName *string `json:"twitter_screen_name"` // WebsiteURL : 設定しているWebサイトのURL WebsiteURL *string `json:"website_url"` // ID : ユーザID ID string `json:"id"` // ProfileImageURL : 設定しているプロフィール画像のURL ProfileImageURL string `json:"profile_image_url"` // FolloweesCount : このユーザがフォローしているユーザの数 FolloweesCount int64 `json:"followees_count"` // FollowersCount : このユーザをフォローしているユーザの数 FollowersCount int64 `json:"followers_count"` // ImageMonthlyUploadLimit : 1ヶ月あたりにQiitaにアップロードできる画像の総容量 ImageMonthlyUploadLimit int64 `json:"image_monthly_upload_limit"` // ImageMonthlyUploadRemaining : その月にQiitaにアップロードできる画像の残りの容量 ImageMonthlyUploadRemaining int64 `json:"image_monthly_upload_remaining"` // ItemsCount : このユーザが qiita.com 上で公開している記事の数 (Qiita Teamでの記事数は含まれません) ItemsCount int64 `json:"items_count"` // PermanentID : ユーザごとに割り当てられる整数のID PermanentID int64 `json:"permanent_id"` // TeamOnly : Qiita Team専用モードに設定されているかどうか TeamOnly bool `json:"team_only"` }
AuthenticatedUser は現在のアクセストークンで認証中のユーザのオブジェクトを表します. 通常のユーザ情報よりも詳細な情報を含んでいます.
type Comment ¶
type Comment struct { // CreatedAt : データが作成された日時 CreatedAt ISO8601 `json:"created_at"` // UpdatedAt : データが最後に更新された日時 UpdatedAt ISO8601 `json:"updated_at"` // Body : コメントの内容を表す Markdown 形式の文字列 Body string `json:"body"` // ID : コメントの一意な ID ID string `json:"id"` // RenderedBody : コメントの内容を表す HTML 形式の文字列 RenderedBody string `json:"rendered_body"` // User : Qiita 上のユーザを表します。 User CommentUser `json:"user"` }
Comment は 記事やプロジェクトに付けられたコメントのオブジェクトを表します. プロジェクトへのコメントは Qiita Team でのみ有効です.
type CommentUser ¶
type CommentUser struct { // Description : 自己紹介文 Description *string `json:"description"` // FacebookID : Facebook ID FacebookID *string `json:"facebook_id"` // GithubLoginName : GitHub ID GithubLoginName *string `json:"github_login_name"` // LinkedinID : LinkedIn ID LinkedinID *string `json:"linkedin_id"` // Location : 居住地 Location *string `json:"location"` // Name : 設定している名前 Name *string `json:"name"` // Organization : 所属している組織 Organization *string `json:"organization"` // TwitterScreenName : Twitter のスクリーンネーム TwitterScreenName *string `json:"twitter_screen_name"` // WebsiteURL : 設定している Web サイトの URL WebsiteURL *string `json:"website_url"` // ID : ユーザ ID ID string `json:"id"` // ProfileImageURL : 設定しているプロフィール画像の URL ProfileImageURL string `json:"profile_image_url"` // FolloweesCount : このユーザがフォローしているユーザの数 FolloweesCount int64 `json:"followees_count"` // FollowersCount : このユーザをフォローしているユーザの数 FollowersCount int64 `json:"followers_count"` // ItemsCount : このユーザが qiita.com 上で公開している記事の数 (Qiita Team での記事数は含まれません) ItemsCount int64 `json:"items_count"` // PermanentID : ユーザごとに割り当てられる整数の ID PermanentID int64 `json:"permanent_id"` // TeamOnly : Qiita Team 専用モードに設定されているかどうか TeamOnly bool `json:"team_only"` }
CommentUser はコメントの Qiita 上のユーザのオブジェクトを表します.
type ExpandedTemplate ¶
type ExpandedTemplate struct { // ExpandedBody : 変数を展開した状態の本文 ExpandedBody string `json:"expanded_body"` // ExpandedTitle : 変数を展開した状態のタイトル ExpandedTitle string `json:"expanded_title"` // ExpandedTags : 変数を展開した状態のタグ一覧 ExpandedTags []ExpandedTemplateExpandedTagsItem `json:"expanded_tags"` }
ExpandedTemplate はテンプレートを保存する前に変数展開後の状態をプレビューするためのオブジェクトです. Qiita Team でのみ有効です.
type ExpandedTemplateExpandedTagsItem ¶
type ExpandedTemplateExpandedTagsItem struct { // Name : タグの名前 Name string `json:"name"` // Versions: タグが付けられたバージョンの一覧 Versions []string `json:"versions,omitempty"` }
ExpandedTemplateExpandedTagsItem は拡張テンプレートに付いたタグのオブジェクトです. Qiita Team でのみ有効です.
type Group ¶
type Group struct { // CreatedAt : データが作成された日時 CreatedAt ISO8601 `json:"created_at"` // UpdatedAt : データが最後に更新された日時 UpdatedAt ISO8601 `json:"updated_at"` // Description : グループの詳細を表します Description string `json:"description"` // URLName : グループのチーム上での一意な名前を表します URLName string `json:"url_name"` // Name : グループに付けられた表示用の名前を表します Name string `json:"name"` // ID : グループの一意な ID を表します ID int64 `json:"id"` // Private : 非公開グループかどうかを表します Private bool `json:"private"` }
Group は Qiita Team のグループのオブジェクトを表します.
type ISO8601 ¶
ISO8601 は ISO-8601("2000-01-01T00:00:00+00:00")フォーマットの日付オブジェクトを示します. Qiita API の日付は ATOM(ISO-8601)形式であるため、通常の Unmarshal/Marshal では変換に失敗するため.
func (*ISO8601) MarshalJSON ¶
MarshalJSON は json.Marshal() で struct から JSON に変換する際に呼び出されるメソッドで、 time を ISO8601 形式に変換します.
func (*ISO8601) UnmarshalJSON ¶
UnmarshalJSON は json.Unmarshal() で JSON から struct に変換する際に呼び出されるメソッドで、 ISO8601 形式の文字列を time.Time に変換します.
type Item ¶
type Item struct { // PageViewsCount : 閲覧数 PageViewsCount *int64 `json:"page_views_count"` // CreatedAt : データが作成された日時 CreatedAt ISO8601 `json:"created_at"` // UpdatedAt : データが最後に更新された日時 UpdatedAt ISO8601 `json:"updated_at"` // Body : Markdown 形式の本文 Body string `json:"body"` // ID : 記事の一意な ID ID string `json:"id"` // RenderedBody : HTML 形式の本文 RenderedBody string `json:"rendered_body"` // Title : 記事のタイトル Title string `json:"title"` // URL : 記事の URL URL string `json:"url"` // Tags : 記事に付いたタグ一覧 Tags []ItemTagsItem `json:"tags"` // TeamMembership : Qiita Team のチームメンバー情報を表します。 TeamMembership ItemTeamMembership `json:"team_membership"` // Group : Qiita Team のグループを表します。 Group Group `json:"group"` // User : Qiita 上のユーザを表します。 User ItemUser `json:"user"` // CommentsCount : この記事へのコメントの数 CommentsCount int64 `json:"comments_count"` // LikesCount : この記事への「LGTM!」の数(Qiita でのみ有効) LikesCount int64 `json:"likes_count"` // ReactionsCount : 絵文字リアクションの数(Qiita Team でのみ有効) ReactionsCount int64 `json:"reactions_count"` // Coediting : この記事が共同更新状態かどうか (Qiita Team でのみ有効) Coediting bool `json:"coediting"` // Private : 限定共有状態かどうかを表すフラグ (Qiita Team では無効) Private bool `json:"private"` }
Item はユーザの投稿のオブジェクトを表します.
type ItemGroup ¶
type ItemGroup struct { // CreatedAt : データが作成された日時 CreatedAt ISO8601 `json:"created_at"` // UpdatedAt : データが最後に更新された日時 UpdatedAt ISO8601 `json:"updated_at"` // Description : グループの詳細を表します。 Description string `json:"description"` // URLName : グループのチーム上での一意な名前を表します。 URLName string `json:"url_name"` // Name : グループに付けられた表示用の名前を表します。 Name string `json:"name"` // ID : グループの一意な ID を表します。 ID int64 `json:"id"` // Private : 非公開グループかどうかを表します。 Private bool `json:"private"` }
ItemGroup は Qiita Team のグループのオブジェクトを表します.
type ItemTagsItem ¶
type ItemTagsItem struct { Name string `json:"name"` Versions []string `json:"versions,omitempty"` }
ItemTagsItem はタグのオブジェクトを示します.
type ItemTeamMembership ¶
type ItemTeamMembership struct { // Name : チームに登録しているユーザー名 Name string `json:"name"` }
ItemTeamMembership は Qiita Team のチームメンバー情報のオブジェクトを表します.
type ItemUser ¶
type ItemUser struct { // Description : 自己紹介文 Description *string `json:"description"` // FacebookID : Facebook ID FacebookID *string `json:"facebook_id"` // GithubLoginName : GitHub ID GithubLoginName *string `json:"github_login_name"` // LinkedinID : LinkedIn ID LinkedinID *string `json:"linkedin_id"` // Location : 居住地 Location *string `json:"location"` // Name : 設定している名前 Name *string `json:"name"` // Organization : 所属している組織 Organization *string `json:"organization"` // TwitterScreenName : Twitter のスクリーンネーム TwitterScreenName *string `json:"twitter_screen_name"` // WebsiteURL : 設定している Web サイトの URL WebsiteURL *string `json:"website_url"` // ID : ユーザ ID ID string `json:"id"` // ProfileImageURL : 設定しているプロフィール画像の URL ProfileImageURL string `json:"profile_image_url"` // ItemsCount : このユーザが qiita.com 上で公開している記事の数 (Qiita Team での記事数は含まれません) ItemsCount int64 `json:"items_count"` // FolloweesCount : このユーザがフォローしているユーザの数 FolloweesCount int64 `json:"followees_count"` // FollowersCount : このユーザをフォローしているユーザの数 FollowersCount int64 `json:"followers_count"` // PermanentID : ユーザごとに割り当てられる整数の ID PermanentID int64 `json:"permanent_id"` // TeamOnly : Qiita Team 専用モードに設定されているかどうか TeamOnly bool `json:"team_only"` }
ItemUser は Qiita 上のユーザのオブジェクトを表します.
type Like ¶
type Like struct { // CreatedAt : データが作成された日時 CreatedAt ISO8601 `json:"created_at"` // User : Qiita 上のユーザを表します。 User LikeUser `json:"user"` }
Like は記事につけられた「LGTM!」のオブジェクトを表します. Note: Qiita Team の LGTM API は 2020 年 11 月 4 日より廃止となりました。今後は絵文字リアクション API をご利用ください.
type LikeUser ¶
type LikeUser struct { // Description : 自己紹介文 Description *string `json:"description"` // FacebookID : Facebook ID FacebookID *string `json:"facebook_id"` // GithubLoginName : GitHub ID GithubLoginName *string `json:"github_login_name"` // LinkedinID : LinkedIn ID LinkedinID *string `json:"linkedin_id"` // Location : 居住地 Location *string `json:"location"` // Name : 設定している名前 Name *string `json:"name"` // Organization : 所属している組織 Organization *string `json:"organization"` // TwitterScreenName : Twitterのスクリーンネーム TwitterScreenName *string `json:"twitter_screen_name"` // WebsiteURL : 設定しているWebサイトのURL WebsiteURL *string `json:"website_url"` // ID : ユーザID ID string `json:"id"` // ProfileImageURL : 設定しているプロフィール画像のURL ProfileImageURL string `json:"profile_image_url"` // ItemsCount : このユーザが qiita.com 上で公開している記事の数 (Qiita Teamでの記事数は含まれません) ItemsCount int64 `json:"items_count"` // PermanentID : ユーザごとに割り当てられる整数のID PermanentID int64 `json:"permanent_id"` // FolloweesCount : このユーザがフォローしているユーザの数 FolloweesCount int64 `json:"followees_count"` // FollowersCount : このユーザをフォローしているユーザの数 FollowersCount int64 `json:"followers_count"` // TeamOnly : Qiita Team専用モードに設定されているかどうか TeamOnly bool `json:"team_only"` }
LikeUser は Qiita 上のユーザのオブジェクトを表します.
type Project ¶
type Project struct { // CreatedAt : データが作成された日時 CreatedAt ISO8601 `json:"created_at"` // UpdatedAt : データが最後に更新された日時 UpdatedAt ISO8601 `json:"updated_at"` // Body : Markdown形式の本文 Body string `json:"body"` // Name : プロジェクト名 Name string `json:"name"` // RenderedBody : HTML形式の本文 RenderedBody string `json:"rendered_body"` // ID : プロジェクトのチーム上での一意なID ID int64 `json:"id"` // ReactionsCount : 絵文字リアクション数 ReactionsCount int64 `json:"reactions_count"` // Archived : このプロジェクトが進行中かどうか Archived bool `json:"archived"` }
Project は Qiita Team 上でのプロジェクトを表します. Qiita Team でのみ有効です.
type Reaction ¶
type Reaction struct { // CreatedAt : データが作成された日時 CreatedAt ISO8601 `json:"created_at"` // ImageURL : 絵文字画像の URL ImageURL string `json:"image_url"` // Name : 絵文字の識別子 Name string `json:"name"` // User : Qiita 上のユーザを表します。 User ReactionUser `json:"user"` }
Reaction は Qiita Team 上での絵文字リアクションを表します. Qiita Team でのみ有効です.
type ReactionUser ¶
type ReactionUser struct { // Description : 自己紹介文 Description *string `json:"description"` // FacebookID : Facebook ID FacebookID *string `json:"facebook_id"` // GithubLoginName : GitHub ID GithubLoginName *string `json:"github_login_name"` // LinkedinID : LinkedIn ID LinkedinID *string `json:"linkedin_id"` // Location : 居住地 Location *string `json:"location"` // Name : 設定している名前 Name *string `json:"name"` // Organization : 所属している組織 Organization *string `json:"organization"` // TwitterScreenName : Twitter のスクリーンネーム TwitterScreenName *string `json:"twitter_screen_name"` // WebsiteURL : 設定している Web サイトの URL WebsiteURL *string `json:"website_url"` // ID : ユーザ ID ID string `json:"id"` // ProfileImageURL : 設定しているプロフィール画像の URL ProfileImageURL string `json:"profile_image_url"` // FolloweesCount : このユーザがフォローしているユーザの数 FolloweesCount int64 `json:"followees_count"` // FollowersCount : このユーザをフォローしているユーザの数 FollowersCount int64 `json:"followers_count"` // ItemsCount : このユーザが qiita.com 上で公開している記事の数 (Qiita Team での記事数は含まれません) ItemsCount int64 `json:"items_count"` // PermanentID : ユーザごとに割り当てられる整数の ID PermanentID int64 `json:"permanent_id"` // TeamOnly : Qiita Team 専用モードに設定されているかどうか TeamOnly bool `json:"team_only"` }
ReactionUser は Qiita 上のユーザのオブジェクトを表します(144->96).
type RemoveTeamMember ¶
type RemoveTeamMember map[string]interface{}
RemoveTeamMember は指定のユーザーをチームから離脱させる際のオブジェクトを表します. Note: 自身とチームのオーナーはこの API では離脱させられません.
type Tag ¶
type Tag struct { // IconURL : このタグに設定されたアイコン画像の URL IconURL *string `json:"icon_url"` // ID : タグを特定するための一意な名前 ID string `json:"id"` // FollowersCount : このタグをフォローしているユーザの数 FollowersCount int64 `json:"followers_count"` // ItemsCount : このタグが付けられた記事の数 ItemsCount int64 `json:"items_count"` }
Tag は記事に付けられた個々のタグのオブジェクトを表します.
type Tagging ¶
type Tagging struct { // Name : タグを特定するための一意な名前 Name string `json:"name"` Versions []string `json:"versions"` }
Tagging は記事とタグとの関連を表します.
type Team ¶
type Team struct { // ID : チームの一意な ID ID string `json:"id"` // Name : チームに設定されている名前を表します。 Name string `json:"name"` // Active : チームが利用可能な状態かどうか Active bool `json:"active"` }
Team は Qiita Team 上 で所属しているチームのオブジェクトを表します. Qiita Team でのみ有効です.
type TeamAccessToken ¶
type TeamAccessToken struct { // ClientID : 登録されたAPIクライアントを特定するための ID ClientID string `json:"client_id"` // Token : アクセストークンを表現する文字列 Token string `json:"token"` // Scopes : アクセストークンに許された操作の一覧 Scopes []string `json:"scopes"` }
TeamAccessToken は Qiita API v2 で認証・認可を行うためのチーム別アクセストークンのオブジェクトを表します. Qiita Team でのみ有効です.
type TeamInvitation ¶
type TeamInvitation struct { // Email : 招待中のメンバーの email アドレスです。 Email string `json:"email"` // URL : 招待用URLです。有効期限は 1 日です。 URL string `json:"url"` }
TeamInvitation は Qiita Team での招待中のメンバーのオブジェクトを表します. Note: Qiita Team でのみ有効です。管理者権限が必要です.
type Template ¶
type Template struct { // Body : テンプレートの本文 Body string `json:"body"` // ExpandedBody : 変数を展開した状態の本文 ExpandedBody string `json:"expanded_body"` // ExpandedTitle : 変数を展開した状態のタイトル ExpandedTitle string `json:"expanded_title"` // Name : テンプレートを判別するための名前 Name string `json:"name"` // Title : 生成される記事のタイトルの雛形 Title string `json:"title"` // Tags : タグ一覧 Tags []TemplateTagsItem `json:"tags"` // ExpandedTags : 変数を展開した状態のタグ一覧 ExpandedTags []TemplateExpandedTagsItem `json:"expanded_tags"` // ID : テンプレートの一意な ID ID int64 `json:"id"` }
Template は記事のひな形に利用できるテンプレートのオブジェクトを表します. Note: Qiita Team でのみ有効です.
type TemplateExpandedTagsItem ¶
type TemplateExpandedTagsItem struct { Name string `json:"name"` Versions []string `json:"versions,omitempty"` }
TemplateExpandedTagsItem はテンプレートの拡張タグのオブジェクトを表します. Qiita Team でのみ有効です.
type TemplateTagsItem ¶
type TemplateTagsItem struct { Name string `json:"name"` Versions []string `json:"versions,omitempty"` }
TemplateTagsItem はテンプレートのタグのオブジェクトを表します. Qiita Team でのみ有効です.
type User ¶
type User struct { // Description : 自己紹介文 Description *string `json:"description"` // FacebookID : Facebook ID FacebookID *string `json:"facebook_id"` // GithubLoginName : GitHub ID GithubLoginName *string `json:"github_login_name"` // LinkedinID : LinkedIn ID LinkedinID *string `json:"linkedin_id"` // Location : 居住地 Location *string `json:"location"` // Name : 設定している名前 Name *string `json:"name"` // Organization : 所属している組織 Organization *string `json:"organization"` // TwitterScreenName : Twitterのスクリーンネーム TwitterScreenName *string `json:"twitter_screen_name"` // WebsiteURL : 設定しているWebサイトのURL WebsiteURL *string `json:"website_url"` // ID : ユーザID ID string `json:"id"` // ProfileImageURL : 設定しているプロフィール画像のURL ProfileImageURL string `json:"profile_image_url"` // FolloweesCount : このユーザがフォローしているユーザの数 FolloweesCount int64 `json:"followees_count"` // FollowersCount : このユーザをフォローしているユーザの数 FollowersCount int64 `json:"followers_count"` // ItemsCount : このユーザが qiita.com 上で公開している記事の数 (Qiita Teamでの記事数は含まれません) ItemsCount int64 `json:"items_count"` // PermanentID : ユーザごとに割り当てられる整数のID PermanentID int64 `json:"permanent_id"` // TeamOnly : Qiita Team専用モードに設定されているかどうか TeamOnly bool `json:"team_only"` }
User は Qiita 上のユーザを表します.
Source Files ¶
- AccessToken.go
- AuthenticatedUser.go
- Comment.go
- CommentUser.go
- ExpandedTemplate.go
- ExpandedTemplateExpandedTagsItem.go
- Group.go
- ISO8601.go
- Item.go
- ItemGroup.go
- ItemTagsItem.go
- ItemTeamMembership.go
- ItemUser.go
- Items.go
- Like.go
- LikeUser.go
- Project.go
- Reaction.go
- ReactionUser.go
- RemoveTeamMember.go
- Tag.go
- Tagging.go
- Team.go
- TeamAccessToken.go
- TeamInvitation.go
- Template.go
- TemplateExpandedTagsItem.go
- TemplateTagsItem.go
- User.go
- docs.go