Documentation ¶
Index ¶
- Constants
- type APIResult
- type Album
- type Author
- type Band
- type CheckPermissionsResponse
- type Client
- func (client *Client) CallAPI(method string, path string, data map[string]interface{}) (*APIResult, error)
- func (client *Client) CheckPermissions(bandKey string, permissions []string) ([]string, error)
- func (client *Client) CreateComment(bandKey, postKey, body string) error
- func (client *Client) CreatePost(bandKey, content string, doPush bool) (returnBandKey, postKey string, err error)
- func (client *Client) GetAlbums(bandKey string) ([]*Album, *NextParams, error)
- func (client *Client) GetBands() (bands []*Band, err error)
- func (client *Client) GetComments(bandKey, postKey string, nextParams *NextParams, creationOrder bool) ([]*Comment, *NextParams, error)
- func (client *Client) GetPhotos(bandKey string, photoAlbumKey string) ([]*Photo, *NextParams, error)
- func (client *Client) GetPost(bandKey, postKey string) (*PostMoreInfo, error)
- func (client *Client) GetPosts(bandKey string, nextParams *NextParams, locale string) ([]*Post, *NextParams, error)
- func (client *Client) GetProfile(bandKey string) (*Profile, error)
- func (client *Client) RemoveComment(bandKey, postKey, commentKey string) error
- func (client *Client) RemovePost(bandKey, postKey string) error
- type Comment
- type CommentPhoto
- type CreatePostResponse
- type GetAlbumsResponse
- type GetBandsResponse
- type GetCommentsResponse
- type GetPhotosResponse
- type GetPostResponse
- type GetPostsResponse
- type LastComment
- type NextParams
- type Photo
- type Post
- type PostMoreInfo
- type Profile
Constants ¶
View Source
const ENDPOINT = "https://openapi.band.us"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResult ¶
type APIResult struct { ResultCode uint `json:"result_code"` ResultData interface{} `json:"result_data"` }
APIResult API 응답
type Album ¶
type Album struct { PhotoAlbumKey string `json:"photo_album_key"` Name string `json:"name"` PhotoCount uint `json:"photo_count"` CreateAt uint `json:"create_at"` Author Author `json:"author"` }
Album 앨범 정보
type Author ¶
type Author struct { Name string `json:"name"` Description string `json:"description"` Role string `json:"role"` ProfileImageUrl string `json:"profile_image_url"` UserKey string `json:"user_key"` }
Author 작성자 정보
type Band ¶
type Band struct { Name string `json:"name"` BandKey string `json:"band_key"` Cover string `json:"cover"` MemberCount uint `json:"member_count"` }
Band 밴드 정보 구조체
type CheckPermissionsResponse ¶
type CheckPermissionsResponse struct {
Permissions []string `json:"permissions"`
}
CheckPermissionsResponse 권한 조회 응답
type Client ¶
Client 클라이언트
func (*Client) CallAPI ¶
func (client *Client) CallAPI(method string, path string, data map[string]interface{}) (*APIResult, error)
CallAPI API 요청
func (*Client) CheckPermissions ¶
CheckPermissions 권한 조회
func (*Client) CreateComment ¶
CreateComment 댓글 생성
func (*Client) CreatePost ¶
func (client *Client) CreatePost(bandKey, content string, doPush bool) (returnBandKey, postKey string, err error)
CreatePost 글 생성
func (*Client) GetAlbums ¶
func (client *Client) GetAlbums(bandKey string) ([]*Album, *NextParams, error)
GetAlbums 앨범 목록 조회
func (*Client) GetComments ¶
func (client *Client) GetComments(bandKey, postKey string, nextParams *NextParams, creationOrder bool) ([]*Comment, *NextParams, error)
GetComments 댓글 목록 조회
func (*Client) GetPhotos ¶
func (client *Client) GetPhotos(bandKey string, photoAlbumKey string) ([]*Photo, *NextParams, error)
GetPhotos 사진 목록 조회
func (*Client) GetPost ¶
func (client *Client) GetPost(bandKey, postKey string) (*PostMoreInfo, error)
GetPost 글 상세 조회
func (*Client) GetPosts ¶
func (client *Client) GetPosts(bandKey string, nextParams *NextParams, locale string) ([]*Post, *NextParams, error)
func (*Client) GetProfile ¶
GetProfile 사용자 정보 조회
func (*Client) RemoveComment ¶
RemoveComment 댓글 삭제
func (*Client) RemovePost ¶
RemovePost 글 삭제
type Comment ¶
type Comment struct { BandKey string `json:"band_key"` Author *Author `json:"author"` PostKey string `json:"post_key"` CommentKey string `json:"comment_key"` Content string `json:"content"` EmoticonCount uint `json:"emoticon_count"` IsAudioIncluded bool `json:"is_audio_included"` CreateAt uint `json:"create_at"` Photo *CommentPhoto `json:"photo"` }
Comment 댓글 정보
type CommentPhoto ¶
type CommentPhoto struct { Url string `json:"url"` Height uint `json:"height"` Width uint `json:"width"` }
CommentPhoto 댓글 사진 정보
type CreatePostResponse ¶
type CreatePostResponse struct { BandKey string `json:"band_key"` PostKey string `json:"post_key"` }
CreatePostResponse 글 생성 응답
type GetAlbumsResponse ¶
type GetAlbumsResponse struct { Paging struct { NextParams *NextParams `json:"next_params"` } `json:"paging"` Items []*Album }
GetAlbumsResponse 앨범 목록 조회 응답
type GetBandsResponse ¶
type GetBandsResponse struct {
Bands []*Band `json:"bands"`
}
GetBandsResponse 밴드 목록 조회 응답
type GetCommentsResponse ¶
type GetCommentsResponse struct { Paging struct { NextParams *NextParams `json:"next_params"` } `json:"paging"` Items []*Comment `json:"items"` }
GetCommentsResponse 댓글 목록 조회 응답
type GetPhotosResponse ¶
type GetPhotosResponse struct { Paging struct { NextParams *NextParams `json:"next_params"` } `json:"paging"` Items []*Photo `json:"items"` }
GetPhotosResponse 사진 목록 조회 응답
type GetPostResponse ¶
type GetPostResponse struct {
Post *PostMoreInfo `json:"post"`
}
GetPostResponse 글 상제 조회 응답
type GetPostsResponse ¶
type GetPostsResponse struct { Paging struct { NextParams *NextParams `json:"next_params"` } `json:"paging"` Items []*Post `json:"items"` }
GetPostsResponse 글 목록 조회 응답
type LastComment ¶
type LastComment struct { Body string `json:"body"` Author *Author `json:"author"` CreatedAt uint `json:"created_at"` }
LastComment 최근 댓글 정보
type NextParams ¶
type NextParams struct { After string `json:"after"` Limit string `json:"limit"` BandKey string `json:"band_key"` AccessToken string `json:"access_token"` }
NextParams 페이징 요청
func (*NextParams) Apply ¶
func (params *NextParams) Apply(data map[string]interface{}) map[string]interface{}
Apply 페이징 요청 적용
type Photo ¶
type Photo struct { Height uint `json:"height"` Width uint `json:"width"` CreatedAt uint `json:"created_at"` Url string `json:"url"` Author *Author `json:"author"` PhotoAlbumKey string `json:"photo_album_key"` PhotoKey string `json:"photo_key"` CommentCount uint `json:"comment_count"` EmoticonCount uint `json:"emoticon_count"` IsVideoThumbnail bool `json:"is_video_thumbnail"` }
Photo 사진 정보
type Post ¶
type Post struct { Content string `json:"content"` Author *Author `json:"author"` PostKey string `json:"post_key"` CommentCount uint `json:"comment_count"` CreatedAt uint `json:"created_at"` Photos []*Photo `json:"photos"` EmoticonCount uint `json:"emoticon_count"` LastComments []*LastComment `json:"last_comments"` BandKey string `json:"band_key"` }
Post 글 정보
type PostMoreInfo ¶
type PostMoreInfo struct { Content string `json:"content"` Author *Author `json:"author"` PostKey string `json:"post_key"` CommentCount uint `json:"comment_count"` CreatedAt uint `json:"created_at"` Photos []*Photo `json:"photos"` EmoticonCount uint `json:"emoticon_count"` BandKey string `json:"band_key"` PostReadCount uint `json:"post_read_count"` }
PostMoreInfo 글 상세 정보
Source Files ¶
Click to show internal directories.
Click to hide internal directories.