buffer_api v0.1.0 BufferAPI
Link to this section Summary
Functions
Returns a single social media update.
Returns an array of updates that are currenlty in the buffer for an individual profile.
Returns a social media profile by it's ID
Returns an array of social media profiles connected to the authorized user's account
Returns details of the posting schedules associated with a social media profile.
Returns an array of updates that have been sent from an individual profile.
Create a new status update for one or more profiles
Returns the authorized user
Link to this section Functions
create_update(text, profile_ids, media_props \\ %{}, client)
Returns a single social media update.
Params
- profile_ids required [array] An array of Buffer profile id's that the status update should be sent to. Invalid profile_id's will be silently ignored
- text optional string The status update text
- attachment optional boolean In the absence of the media parameter, attachment controls whether a link the in
text
should automatically populate themedia
parameter. Defaults totrue
TODO Add optional buffering params
Examples
iex> BufferApi.create_update("000000000000000000000000", "1111111111111", %BufferApi.Client{...})
%BufferAPI.Update{
id: "000000000000000000000000",
...
}
get_pending_updates(profile_id, client)
Returns an array of updates that are currenlty in the buffer for an individual profile.
Examples
iex> BufferApi.get_pending_updates("000000000000000000000000", %BufferApi.Client{...})
[
%BufferAPI.Update{
id: "000000000000000000000000",
...
},
...
]
get_profile(id, client)
Returns a social media profile by it's ID
Examples
iex> BufferApi.get_profile(id, %BufferApi.Client{...}) %BufferAPI.Profile{
...
}
get_profile!(id, client)
get_profiles(client)
Returns an array of social media profiles connected to the authorized user's account
Examples
iex> BufferApi.get_profiles(%BufferApi.Client{...}) [
%BufferAPI.Profile{
...
}
]
get_profiles!(client)
get_schedules(profile_id, client)
Returns details of the posting schedules associated with a social media profile.
Examples
iex> BufferApi.get_schedules(profile_id, %BufferApi.Client{...}) [
%BufferAPI.Schedule{
days: ["fri", "sat", "sun"],
times: ["12:00", "17:00"]
}
]
get_sent_updates(profile_id, client)
Returns an array of updates that have been sent from an individual profile.
Examples
iex> BufferApi.get_sent_updates("000000000000000000000000", %BufferApi.Client{...})
[
%BufferAPI.Update{
id: "000000000000000000000000",
...
},
...
]
get_update(id, client)
Create a new status update for one or more profiles
Examples
iex> BufferApi.get_update("000000000000000000000000", %BufferApi.Client{...})
%BufferAPI.Update{
id: "000000000000000000000000",
...
}
get_update!(id, client)
get_user(client)
Returns the authorized user
Examples
iex> BufferApi.get_user(%BufferApi.Client{...}) %BufferAPI.User{
...
}