Documentation
¶
Index ¶
- func ValidMAC(message, messageMAC, key []byte) bool
- type Config
- type GogramClient
- func (client *GogramClient) Config(config Config) *GogramClient
- func (client *GogramClient) GetAccessToken(code string) (response string, err error)
- func (client *GogramClient) GetAlbumContents(mediaId int, accessToken string, fields []string) (response string, err error)
- func (client *GogramClient) GetAuthorizeRedirect() (uri string, err error)
- func (client *GogramClient) GetLongLivedToken(shortLivedAccessToken string) (response string, err error)
- func (client *GogramClient) GetMediaData(mediaId int, accessToken string, fields []string) (response string, err error)
- func (client *GogramClient) GetUserProfile(accessToken string, fields []string) (response string, err error)
- func (client *GogramClient) GetUsersMedia(accessToken string, fields []string) (response string, err error)
- func (client *GogramClient) ParseSignedRequest(sr string) (response string, err error)
- func (client *GogramClient) RefreshLongLivedToken(longLivedAccessToken string) (response string, err error)
- type Next
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GogramClient ¶
type GogramClient struct {
// contains filtered or unexported fields
}
GogramClient is the main struct of the package
func NewGogram ¶
func NewGogram() *GogramClient
func (*GogramClient) Config ¶
func (client *GogramClient) Config(config Config) *GogramClient
Config is needed to success api work
func (*GogramClient) GetAccessToken ¶
func (client *GogramClient) GetAccessToken(code string) (response string, err error)
func (*GogramClient) GetAlbumContents ¶
func (client *GogramClient) GetAlbumContents(mediaId int, accessToken string, fields []string) (response string, err error)
GetAlbumContents https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-profiles-and-media#get-album-contents https://developers.facebook.com/docs/instagram-basic-display-api/reference/media#fields
func (*GogramClient) GetAuthorizeRedirect ¶
func (client *GogramClient) GetAuthorizeRedirect() (uri string, err error)
GetAuthorizeRedirect https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-access-tokens-and-permissions#step-1--get-authorization
func (*GogramClient) GetLongLivedToken ¶
func (client *GogramClient) GetLongLivedToken(shortLivedAccessToken string) (response string, err error)
GetLongLivedToken https://developers.facebook.com/docs/instagram-basic-display-api/guides/long-lived-access-tokens#get-a-long-lived-token
func (*GogramClient) GetMediaData ¶
func (client *GogramClient) GetMediaData(mediaId int, accessToken string, fields []string) (response string, err error)
GetMediaData https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-profiles-and-media#get-media-data https://developers.facebook.com/docs/instagram-basic-display-api/reference/media#fields
func (*GogramClient) GetUserProfile ¶
func (client *GogramClient) GetUserProfile(accessToken string, fields []string) (response string, err error)
GetUserProfile https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-profiles-and-media#get-a-user-s-profile https://developers.facebook.com/docs/instagram-basic-display-api/reference/user#fields
func (*GogramClient) GetUsersMedia ¶
func (client *GogramClient) GetUsersMedia(accessToken string, fields []string) (response string, err error)
GetUsersMedia https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-profiles-and-media#get-a-user-s-media https://developers.facebook.com/docs/instagram-basic-display-api/reference/media#fields
func (*GogramClient) ParseSignedRequest ¶
func (client *GogramClient) ParseSignedRequest(sr string) (response string, err error)
ParseSignedRequest https://developers.facebook.com/docs/games/gamesonfacebook/login#parsingsr https://developers.facebook.com/docs/instagram-basic-display-api/getting-started#deauthorize-callback-url https://developers.facebook.com/docs/instagram-basic-display-api/getting-started#data-deletion-request-callback-url
func (*GogramClient) RefreshLongLivedToken ¶
func (client *GogramClient) RefreshLongLivedToken(longLivedAccessToken string) (response string, err error)
RefreshLongLivedToken https://developers.facebook.com/docs/instagram-basic-display-api/guides/long-lived-access-tokens#refresh-a-long-lived-token