chili_player v0.1.0 ChiliPlayer
Basic Elixir lib to access chiligum videos web player.
Link to this section Summary
Functions
To delete a video simply call the delete function passing the video id and also a token of a valid account
To update the video it is necessary to inform the video id and a Map options with the information such as name, postback_url, preserve_original_file, activated, watermark_image_url, watermark_link, watermark_position, wartermark_start, watermark_duration and in the headers parameter a valid token
Send a POST request with options map with data to upload videos in Chiligum Player Api. Its mandatory send headers with a valid token information
Returns a especific video belonging to the owner of the informed token passing the video_id parameter
Returns a collection of videos belonging to the owner of the informed token
Link to this section Functions
To delete a video simply call the delete function passing the video id and also a token of a valid account
Example
iex> ChiliPlayer.delete(1234, [token: "my_awesome_token"])
{200, %{msg: "deleted"}}
To update the video it is necessary to inform the video id and a Map options with the information such as name, postback_url, preserve_original_file, activated, watermark_image_url, watermark_link, watermark_position, wartermark_start, watermark_duration and in the headers parameter a valid token
Example
iex> ChiliPlayer.update(1234, %{name: "new name video, preserve_original_file: false"}, [token: "my_owesome_token"])
{200,
%{
activated: true,
created_at: "2018-10-15T17:58:23.608-03:00",
data: "https://s3.amazonaws.com/my_owesome_video.mp4",
id: 1234,
player_url: "https://player.chiligumvideos.com/awesome_player",
postback_url: nil,
preserve_original_file: false,
teaser_id: nil,
wartermark_start: nil,
watermark_duration: nil,
watermark_image_url: nil,
watermark_link: nil,
watermark_position: nil
}}
Send a POST request with options map with data to upload videos in Chiligum Player Api. Its mandatory send headers with a valid token information.
Example
iex> ChiliPlayer.upload(%{data: "https://s3.amazonaws.com/my_owesome_video.mp4", name: "My Owesome Video", preserve_original_file: false}, [token: "my_awesome_token"])
{200,
%{
activated: true,
created_at: "2018-10-16T14:59:41.287-03:00",
data: "https://s3.amazonaws.com/my_owesome_video.mp4",
id: 1234,
player_url: "https://player.chiligumvideos.com/awesome_player",
postback_url: nil,
preserve_original_file: false,
teaser_id: nil,
wartermark_start: nil,
watermark_duration: nil,
watermark_image_url: nil,
watermark_link: nil,
watermark_position: nil
}}
Returns a especific video belonging to the owner of the informed token passing the video_id parameter
Example
iex> ChiliPlayer.video(1234, [token: 'my_awesome_token'])
{200,
%{
activated: true,
created_at: "2018-10-15T17:41:08.874-03:00",
data: "https://s3.amazonaws.com/awesome_video_url.mp4",
id: 1234,
player_url: "https://player.chiligumvideos.com/awesome_player_url",
postback_url: nil,
preserve_original_file: true,
teaser_id: nil,
wartermark_start: nil,
watermark_duration: nil,
watermark_image_url: nil,
watermark_link: nil,
watermark_position: nil
}}
Returns a collection of videos belonging to the owner of the informed token
Example
iex> ChiliPlayer.videos([token: 'my_awesome_token'])
{200,
[
%{
activated: true,
created_at: "2018-10-16T14:38:42.236-03:00",
data: "https://s3.amazonaws.com/awesome_video_url.mp4",
id: 1234,
player_url: "https://player.chiligumvideos.com/awesome_player_url",
postback_url: nil,
preserve_original_file: true,
teaser_id: nil,
wartermark_start: nil,
watermark_duration: nil,
watermark_image_url: nil,
watermark_link: nil,
watermark_position: nil
},
%{
activated: true,
created_at: "2018-10-15T19:37:11.418-03:00",
data: "https://s3.amazonaws.com/awesome_video_url.mp4",
id: 5678,
player_url: "https://player.chiligumvideos.com/awesome_player_url",
postback_url: nil,
preserve_original_file: true,
teaser_id: nil,
wartermark_start: "",
watermark_duration: "",
watermark_image_url: "",
watermark_link: "",
watermark_position: "center"
}
]}