social

package
v0.0.0-...-6740b9f Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2014 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FacebookProfileMeURL = "https://graph.facebook.com/v2.1/me?access_token=%s&appsecret_proof=%s"
	FacebookPictureURL   = "https://graph.facebook.com/%s/picture?redirect=0&height=320&width=320&type=square"
)
View Source
const (
	GPlusProfileURL string = "https://www.googleapis.com/plus/v1/people/%s?fields=id,displayName,name,emails,image,url&access_token=%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Facebook

type Facebook struct {
	AppEngineContext appengine.Context
	// contains filtered or unexported fields
}

func (*Facebook) Fetch

func (self *Facebook) Fetch(profileId, authToken string) (Profile, error)

type FacebookPicture

type FacebookPicture struct {
	Data FacebookPictureData `json:"data"`
}

type FacebookPictureData

type FacebookPictureData struct {
	URL string `json:"url"`
}

type FacebookProfile

type FacebookProfile struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	FullName  string `json:"name"`
	Email     string `json:"email"`
	Verified  bool   `json:"verified"`
	ImageURL  string
}

type Fetcher

type Fetcher interface {
	Fetch(profileId, authToken string) (Profile, error)
}

func NewFacebook

func NewFacebook(appEngineContext appengine.Context, appSecret string) Fetcher

func NewGooglePlus

func NewGooglePlus(appEngineContext appengine.Context) Fetcher

type GooglePlus

type GooglePlus struct {
	AppEngineContext appengine.Context
	// contains filtered or unexported fields
}

func (*GooglePlus) Do

func (self *GooglePlus) Do(method, url string) (*http.Response, error)

func (*GooglePlus) Fetch

func (self *GooglePlus) Fetch(profileId, authToken string) (Profile, error)

type GooglePlusEmailData

type GooglePlusEmailData struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type GooglePlusProfile

type GooglePlusProfile struct {
	Id          string                     `json:"id"`
	Url         string                     `json:"url"`
	Name        GooglePlusUserNameData     `json:"name"`
	DisplayName string                     `json:"displayName"`
	Emails      []GooglePlusEmailData      `json:"emails"`
	Image       GooglePlusProfileImageData `json:"image"`
}

type GooglePlusProfileImageData

type GooglePlusProfileImageData struct {
	Url string `json:"url"`
}

type GooglePlusUserNameData

type GooglePlusUserNameData struct {
	GivenName  string `json:"givenName"`
	FamilyName string `json:"familyName"`
}

type Profile

type Profile struct {
	FullName  string
	FirstName string
	LastName  string
	Email     string
	PhotoURL  string
}

Jump to

Keyboard shortcuts

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