model

package
v0.0.0-...-e3366e6 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2015 License: MIT Imports: 5 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

type Accounts struct {
	Data []Page `json:"data"`
}

Accounts is used to unmarshal the /me/accounts response

https://developers.facebook.com/docs/graph-api/reference/v2.4/user/accounts#fields

type Formable

type Formable interface {
	AsForm() url.Values
}

Formable represents objects that can be encoded into HTTP form values

type Link struct {
	Link string `json:"link"`
}

Link is used as a pointer to images in a post

https://developers.facebook.com/docs/graph-api/reference/v2.4/link

type Location

type Location struct {
	Street  string `json:"street"`
	City    string `json:"city"`
	Country string `json:"country"`
}

Location holds the location information for a Facebook object, including the address and the geographical location.

https://developers.facebook.com/docs/graph-api/reference/location/

type Page

type Page struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Location    Location `json:"location,omitempty"`
	Phone       string   `json:"phone,omitempty"`
	Website     string   `json:"website,omitempty"`
	Emails      []string `json:"emails,omitempty"`
	AccessToken string   `json:"access_token,omitempty"`
}

Page represents a Facebook Page

https://developers.facebook.com/docs/graph-api/reference/v2.4/page#readfields

type Photo

type Photo struct {
	Post
	Photo io.Reader
}

type PhotoResponse

type PhotoResponse struct {
	ID     string `json:"id"`
	PostID string `json:"post_id"`
}

type Post

type Post struct {
	ID                   string    `json:"id"`
	Message              string    `json:"message,omitempty"`
	Published            bool      `json:"published"`
	ScheduledPublishTime time.Time `json:"scheduled_publish_time,omitempty"`
	BackdatedTime        time.Time `json:"backdated_time,omitempty"`
	ObjectAttachment     string    `json:"object_attachment,omitempty"`
	ChildAttachments     []Link    `json:"child_attachments,omitempty"`
}

Post represents a Facebook Post

https://developers.facebook.com/docs/graph-api/reference/v2.4/post

func (*Post) AsForm

func (p *Post) AsForm() url.Values

type PostResponse

type PostResponse struct {
	ID                   string    `json:"id"`
	Message              string    `json:"message"`
	IsPublished          bool      `json:"is_published"`
	ScheduledPublishTime time.Time `json:"scheduled_publish_time"`
	CreatedTime          time.Time `json:"created_time"`
}

PostResponse also holds fields specific only to the Post object when it's received as a response from Facebook, unlike the Post object which is used to post to Facebook.

type User

type User struct {
	ID string `json:"id"`
}

Jump to

Keyboard shortcuts

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