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

Link to this function

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 the media parameter. Defaults to true

TODO Add optional buffering params

Examples

iex> BufferApi.create_update("000000000000000000000000", "1111111111111", %BufferApi.Client{...})
%BufferAPI.Update{
  id: "000000000000000000000000",
  ...
}
Link to this function

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",
    ...
  },
  ...
]
Link to this function

get_profile(id, client)

Returns a social media profile by it's ID

Examples

iex> BufferApi.get_profile(id, %BufferApi.Client{...}) %BufferAPI.Profile{

...

}

Link to this function

get_profile!(id, client)

Link to this function

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{
  ...
}

]

Link to this function

get_profiles!(client)

Link to this function

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"]
}

]

Link to this function

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",
    ...
  },
  ...
]
Link to this function

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",
  ...
}
Link to this function

get_update!(id, client)

Link to this function

get_user(client)

Returns the authorized user

Examples

iex> BufferApi.get_user(%BufferApi.Client{...}) %BufferAPI.User{

...

}

Link to this function

get_user!(client)