social

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is responsible for making calls to different providers

func NewClient

func NewClient(timeout time.Duration) *Client

NewClient creates a new Social Client

func (*Client) CheckGameCenterID

func (c *Client) CheckGameCenterID(playerID string, bundleID string, timestamp int64, salt string, signature string, publicKeyURL string) (bool, error)

CheckGameCenterID checks to see validity of the GameCenter playerID

func (*Client) GetFacebookFriends

func (c *Client) GetFacebookFriends(accessToken string) ([]FacebookProfile, error)

GetFacebookFriends queries the Facebook Graph. Token is expected to also have the "user_friends" permission.

func (*Client) GetFacebookProfile

func (c *Client) GetFacebookProfile(accessToken string) (*FacebookProfile, error)

GetFacebookProfile retrieves the user's Facebook Profile given the accessToken

func (*Client) GetGoogleProfile

func (c *Client) GetGoogleProfile(accessToken string) (*GoogleProfile, error)

GetGoogleProfile retrieves the user's Google Profile given the accessToken

func (*Client) GetSteamProfile

func (c *Client) GetSteamProfile(publisherKey string, appID int, ticket string) (*SteamProfile, error)

GetSteamProfile retrieves the user's Steam Profile. Key and App ID should be configured at the application level. See: https://partner.steamgames.com/documentation/auth#client_to_backend_webapi

type FacebookProfile

type FacebookProfile struct {
	ID       string  `json:"id"`
	Name     string  `json:"name"`
	Email    string  `json:"email"`
	Gender   string  `json:"gender"`
	Locale   string  `json:"locale"`
	Timezone float64 `json:"timezone"`
}

FacebookProfile is an abbreviated version of a Facebook profile.

type GoogleProfile

type GoogleProfile struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Email  string `json:"email"`
	Gender string `json:"gender"`
	Locale string `json:"locale"`
}

GoogleProfile is an abbreviated version of a Google profile.

type SteamProfile

type SteamProfile struct {
	SteamID uint64 `json:"steamid"`
}

SteamProfile is an abbreviated version of a Steam profile.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL