buffer

package
v0.0.0-...-5d55774 Latest Latest
Warning

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

Go to latest
Published: May 17, 2017 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// URL is the base URL of the Buffer.com API
	URL = "https://api.bufferapp.com/1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	AccessToken string
	URL         string
}

Client is the Buffer.com API client

func NewClient

func NewClient(accessToken string) *Client

NewClient creates a new Buffer.com API client

func (*Client) GetPendingUpdates

func (c *Client) GetPendingUpdates(profileID string) (Updates, error)

func (*Client) GetProfile

func (c *Client) GetProfile(profileID string) (Profile, error)

func (*Client) Push

func (c *Client) Push(text string, profileIDs []string) (Updates, error)

Push creates a new status update for one or more profiles

type Profile

type Profile struct {
	ID                string
	Service           string
	FormattedUsername string `json:"formatted_username"`
}

Profile represents a Buffer.com profile

type Update

type Update struct {
	ID             string
	Text           string
	Day            string
	ProfileService string `json:"profile_service"`
	TextFormatted  string `json:"text_formatted"`
}

Update represents a Buffer.com update

type Updates

type Updates []Update

Updates represents a set of Buffer.com updates

Jump to

Keyboard shortcuts

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