controllers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoardCreateOptionals

type BoardCreateOptionals struct {
	Description string
}

BoardCreateOptionals is a struct that represents the optional parameters that can be passed to the Create endpoint

type BoardUpdateOptionals

type BoardUpdateOptionals struct {
	Name        string
	Description string
}

BoardUpdateOptionals is a struct that represents the optional parameters that can be passed to the Update endpoint

type BoardsController

type BoardsController struct {
	Pins *BoardsPinsController
	// contains filtered or unexported fields
}

BoardsController is the controller that is responsible for all /v1/boards/ endpoints in the Pinterest API.

func NewBoardsController

func NewBoardsController(wc *wrecker.Wrecker) *BoardsController

NewBoardsController instantiates a new BoardsController.

func (*BoardsController) Create

func (bc *BoardsController) Create(boardName string, optionals *BoardCreateOptionals) (*models.Board, error)

Create makes a new board Endpoint: [POST] /v1/boards/

func (*BoardsController) Delete

func (bc *BoardsController) Delete(boardSpec string) error

Delete deletes an existing board Endpoint: [DELETE] /v1/boards/<board_spec:board>/

func (*BoardsController) Fetch

func (bc *BoardsController) Fetch(boardSpec string) (*models.Board, error)

Fetch loads a board from the board_spec (username/board-slug) Endpoint: [GET] /v1/boards/<board_spec:board>/

func (*BoardsController) Update

func (bc *BoardsController) Update(boardSpec string, optionals *BoardUpdateOptionals) (*models.Board, error)

Update updates an existing board Endpoint: [PATCH] /v1/boards/<board_spec:board>/

type BoardsPinsController

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

BoardsPinsController is the controller that is responsible for all /v1/boards/<board_spec:board>/pins/ endpoints in the Pinterest API.

func (*BoardsPinsController) Fetch

func (bpc *BoardsPinsController) Fetch(boardSpec string, optionals *BoardsPinsFetchOptionals) (*[]models.Pin, error)

Fetch loads a board from the board_spec (username/board-slug) Endpoint: [GET] /v1/boards/<board_spec:board>/pins/

type BoardsPinsFetchOptionals

type BoardsPinsFetchOptionals struct {
	Cursor string
}

BoardsPinsFetchOptionals is a struct that represents the optional parameters that can be passed to the Fetch endpoint

type FollowingUsersControllerFetchOptionals

type FollowingUsersControllerFetchOptionals struct {
	Cursor string
}

FollowingUsersControllerFetchOptionals is a struct that represents the optional parameters for the Fetch method

type MeBoardsController

type MeBoardsController struct {
	Suggested *MeBoardsSuggestedController
	// contains filtered or unexported fields
}

MeBoardsController is the controller that is responsible for all /v1/me/boards/ endpoints in the Pinterest API.

func (*MeBoardsController) Fetch

func (mbc *MeBoardsController) Fetch() (*[]models.Board, error)

Fetch loads the authorized users boards Endpoint: [GET] /v1/me/boards/

type MeBoardsSuggestedController

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

MeBoardsSuggestedController is the controller that is responsible for all /v1/me/boards/suggested/ endpoints in the Pinterest API.

func (*MeBoardsSuggestedController) Fetch

Fetch loads board suggestions for the logged in user Endpoint: [GET] /v1/me/boards/suggested/

type MeBoardsSuggestedFetchOptionals

type MeBoardsSuggestedFetchOptionals struct {
	Count int32
	Pin   string
}

MeBoardsSuggestedFetchOptionals is a struct that represents the optional parameters for the Fetch method

type MeController

type MeController struct {
	Boards    *MeBoardsController
	Followers *MeFollowersController
	Following *MeFollowingController
	Likes     *MeLikesController
	Pins      *MePinsController
	Search    *MeSearchController
	// contains filtered or unexported fields
}

MeController is the controller that is responsible for all /v1/me/ endpoints in the Pinterest API.

func NewMeController

func NewMeController(wc *wrecker.Wrecker) *MeController

NewMeController instantiates a new MeController

func (*MeController) Fetch

func (mc *MeController) Fetch() (*models.User, error)

Fetch loads the authorized users info Endpoint: [GET] /v1/me/

type MeFollowersController

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

MeFollowersController is the controller that is responsible for all /v1/me/followers/ endpoints in the Pinterest API.

func (*MeFollowersController) Fetch

Fetch loads the users that follow the logged in user Endpoint: [GET] /v1/me/boards/followers/

type MeFollowersFetchOptionals

type MeFollowersFetchOptionals struct {
	Cursor string
}

MeFollowersFetchOptionals is a struct that represents the optional parameters for the Fetch method

type MeFollowingBoardsController

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

MeFollowingBoardsController is the controller that is responsible for all /v1/me/following/boards/ endpoints in the Pinterest API.

func (*MeFollowingBoardsController) Create

func (mfbc *MeFollowingBoardsController) Create(boardSpec string) error

Create follows a board for the authorized user Endpoint: [POST] /v1/me/following/boards/

func (*MeFollowingBoardsController) Delete

func (mfbc *MeFollowingBoardsController) Delete(boardSpec string) error

Delete unfollows a board for the authorized user Endpoint: [DELETE] /v1/me/following/boards/

func (*MeFollowingBoardsController) Fetch

Fetch loads the boards that the authorized user follows Endpoint: [GET] /v1/me/following/boards/

type MeFollowingBoardsFetchOptionals

type MeFollowingBoardsFetchOptionals struct {
	Cursor string
}

MeFollowingBoardsFetchOptionals is a struct that represents the optional parameters for the Fetch method

type MeFollowingController

type MeFollowingController struct {
	Boards    *MeFollowingBoardsController
	Interests *MeFollowingInterestsController
	Users     *MeFollowingUsersController
	// contains filtered or unexported fields
}

MeFollowingController is the controller that is responsible for all /v1/me/following/ endpoints in the Pinterest API.

type MeFollowingInterestsController

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

MeFollowingInterestsController is the controller that is responsible for all /v1/me/following/interests/ endpoints in the Pinterest API.

func (*MeFollowingInterestsController) Fetch

Fetch loads the authorized users interests Endpoint: [GET] /v1/me/following/interests/

type MeFollowingInterestsFetchOptionals

type MeFollowingInterestsFetchOptionals struct {
	Cursor string
}

MeFollowingInterestsFetchOptionals is a struct that represents the optional parameters for the Fetch method

type MeFollowingUsersController

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

MeFollowingUsersController is the controller that is responsible for all /v1/me/following/users/ endpoints in the Pinterest API.

func (*MeFollowingUsersController) Create

func (c *MeFollowingUsersController) Create(user string) error

Create follows a user Endpoint: [POST] /v1/me/following/users/

func (*MeFollowingUsersController) Delete

func (c *MeFollowingUsersController) Delete(user string) error

Delete unfollows a user Endpoint: [DELETE] /v1/me/following/users/

func (*MeFollowingUsersController) Fetch

Fetch loads the users that the authorized user follows Endpoint: [GET] /v1/me/following/users/

type MeLikesController

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

MeLikesController is the controller that is responsible for all /v1/me/likes/ endpoints in the Pinterest API.

func (*MeLikesController) Fetch

func (mlc *MeLikesController) Fetch(optionals *MeLikesFetchOptionals) (*[]models.Pin, *models.Page, error)

Fetch loads all of the pins that the authorized user has liked Endpoint: [GET] /v1/me/likes/

type MeLikesFetchOptionals

type MeLikesFetchOptionals struct {
	Cursor string
}

MeLikesFetchOptionals is a struct that represents the optional parameters that can be passed to the Fetch endpoint

type MePinsController

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

MePinsController is the controller that is responsible for all /v1/me/pins/ endpoints in the Pinterest API.

func (*MePinsController) Fetch

func (mpc *MePinsController) Fetch(optionals *MePinsFetchOptionals) (*[]models.Pin, *models.Page, error)

Fetch loads all of the logged in user's Pins Endpoint: [GET] /v1/me/pins/

type MePinsFetchOptionals

type MePinsFetchOptionals struct {
	Cursor string
}

MePinsFetchOptionals is a struct that represents the optional parameters that can be passed to the Fetch endpoint

type MeSearchBoardsController

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

MeSearchBoardsController is the controller that is responsible for all /v1/me/search/boards/ endpoints in the Pinterest API.

func (*MeSearchBoardsController) Fetch

Fetch searches the logged in user's Boards Endpoint: [GET] /v1/me/search/boards/

type MeSearchBoardsFetchOptionals

type MeSearchBoardsFetchOptionals struct {
	Cursor string
	Limit  int
}

MeSearchBoardsFetchOptionals is a struct that represents the optional parameters that can be passed to the Fetch endpoint

type MeSearchController

type MeSearchController struct {
	Boards *MeSearchBoardsController
	Pins   *MeSearchPinsController
	// contains filtered or unexported fields
}

MeSearchController is the controller that is responsible for all /v1/me/search/ endpoints in the Pinterest API.

type MeSearchPinsController

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

MeSearchPinsController is the controller that is responsible for all /v1/me/search/pins/ endpoints in the Pinterest API.

func (*MeSearchPinsController) Fetch

func (mspc *MeSearchPinsController) Fetch(query string, optionals *MeSearchPinsFetchOptionals) (*[]models.Pin, *models.Page, error)

Fetch searches the logged in user's Pins Endpoint: [GET] /v1/me/search/pins/

type MeSearchPinsFetchOptionals

type MeSearchPinsFetchOptionals struct {
	Cursor string
	Limit  int
}

MeSearchPinsFetchOptionals is a struct that represents the optional parameters that can be passed to the Fetch endpoint

type PinCreateOptionals

type PinCreateOptionals struct {
	Link     string
	ImageUrl string
}

PinCreateOptionals is a struct that represents the optional parameters that can be passed to the Create endpoint

type PinUpdateOptionals

type PinUpdateOptionals struct {
	Board string
	Note  string
	Link  string
}

PinUpdateOptionals is a struct that represents the optional parameters that can be passed to the Update endpoint

type PinsController

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

PinsController is the controller that is responsible for all /v1/pins/ endpoints in the Pinterest API.

func NewPinsController

func NewPinsController(wc *wrecker.Wrecker) *PinsController

NewPinsController instantiates a new PinsController

func (*PinsController) Create

func (pc *PinsController) Create(boardSpec string, note string, optionals *PinCreateOptionals) (*models.Pin, error)

Create creates a new pin Endpoint: [POST] /v1/pins/

func (*PinsController) Delete

func (pc *PinsController) Delete(pinId string) error

Delete deletes an existing pin Endpoint: [DELETE] /v1/pins/<pin>/

func (*PinsController) Fetch

func (pc *PinsController) Fetch(pinId string) (*models.Pin, error)

Fetch loads a pin from the pin id Endpoint: [GET] /v1/pins/<pin>/

func (*PinsController) Update

func (pc *PinsController) Update(pinId string, optionals *PinUpdateOptionals) (*models.Pin, error)

Update updates an existing pin Endpoint: [PATCH] /v1/pins/<pin>/

type UsersController

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

UsersController is the controller that is responsible for all /v1/users/ endpoints in the Pinterest API.

func NewUsersController

func NewUsersController(wc *wrecker.Wrecker) *UsersController

NewUsersController instantiates a new UsersController.

func (*UsersController) Fetch

func (uc *UsersController) Fetch(username string) (*models.User, error)

Fetch loads a user from their username. Endpoint: [GET] /v1/users/<user>/

Jump to

Keyboard shortcuts

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