Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultBaseURL = "https://api.bufferapp.com" DefaultAuthURL = DefaultBaseURL + "/oauth2/auth" DefaultTokenURL = DefaultBaseURL + "/oauth2/token" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts *ClientConfig) (*Client, error)
func (*Client) Profiles ¶
func (c *Client) Profiles() *ProfilesService
func (*Client) User ¶
func (c *Client) User() *UserService
type ClientConfig ¶
type Daytime ¶
Daytime is a time during a day. The date does not matter, only the hours and minutes.
func (Daytime) MarshalJSON ¶
func (*Daytime) UnmarshalJSON ¶
type Profile ¶
type Profile struct {
UnderscoreID string `json:"_id"`
Avatar string `json:"avatar"`
AvatarHTTPS string `json:"avatar_https"`
CanSeeContentLibrary bool `json:"can_see_content_library"`
Counts struct {
DailySuggestions int `json:"daily_suggestions"`
Drafts int `json:"drafts"`
Reminders int `json:"reminders"`
Sent int `json:"sent"`
Pending int `json:"pending"`
} `json:"counts"`
CreatedAt UnixTime `json:"created_at"`
Default bool `json:"default"`
Disabled bool `json:"disabled"`
Disconnected bool `json:"disconnected"`
FormattedService string `json:"formatted_service"`
FormattedUsername string `json:"formatted_username"`
ID string `json:"id"`
IsOnBusinessV2 bool `json:"is_on_business_v2"`
Locked bool `json:"locked"`
Paused bool `json:"paused"`
PausedSchedules []Schedule `json:"paused_schedules"`
Preferences struct {
} `json:"preferences"`
Schedules []Schedule `json:"schedules"`
Service string `json:"service"`
ServiceID string `json:"service_id"`
ServiceType string `json:"service_type"`
ServiceUsername string `json:"service_username"`
Shortener struct {
Domain string `json:"domain"`
} `json:"shortener"`
Statistics *Statistics `json:"statistics"`
Timezone Timezone `json:"timezone"`
TimezoneCity string `json:"timezone_city"`
UserID string `json:"user_id"`
UtmTracking string `json:"utm_tracking"`
Verb string `json:"verb"`
UnspecifiedCoverPhoto interface{} `json:"cover_photo"`
UnspecifiedDisabledFeatures []interface{} `json:"disabled_features"`
UnspecifiedReportsLogo interface{} `json:"reports_logo"`
}
type ProfilesService ¶
type ProfilesService struct {
// contains filtered or unexported fields
}
func (*ProfilesService) Deauthorize ¶
func (us *ProfilesService) Deauthorize(ctx context.Context) (bool, error)
type Statistics ¶
type Statistics struct {
Followers int `json:"followers"`
}
type Timezone ¶
Timezone is a timezone in the world.
func (Timezone) MarshalJSON ¶
func (*Timezone) UnmarshalJSON ¶
type UnixTime ¶
UnixTime is a time.Time that marshals and unmarshals to Unix time.
func (UnixTime) MarshalJSON ¶
func (*UnixTime) UnmarshalJSON ¶
type User ¶
type User struct {
UnderscoreID string `json:"_id"`
ActivityAt UnixTime `json:"activity_at"`
CreatedAt UnixTime `json:"created_at"`
ID string `json:"id"`
Name string `json:"name"`
Plan string `json:"plan"`
Timezone Timezone `json:"timezone"`
TwentyfourHourTime bool `json:"twentyfour_hour_time"`
WeekStartsMonday bool `json:"week_starts_monday"`
UnspecifiedPabloPreferences []interface{} `json:"pablo_preferences"`
UnspecifiedProfileGroups []interface{} `json:"profile_groups"`
}
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) Deauthorize ¶
func (us *UserService) Deauthorize(ctx context.Context) (bool, error)
Click to show internal directories.
Click to hide internal directories.