Cloudsight API v0.4.0 CloudsightElixir
Core functions for interfacing with the API
Additional References: https://cloudsight.readme.io/reference
Link to this section Summary
Functions
Repost an image if it expired in the queue without returning a response
Retrieve the result of an image token
Retrieve the result of a video token
Send an image file or url to the Cloudsight API for identification
Send a video file or url to the Cloudsight API for identification
Poll for an image response until the timeout is reached - defaults to 20 seconds
Poll for an video response until the timeout is reached - defaults to 20 seconds
Link to this section Functions
Repost an image if it expired in the queue without returning a response
Examples
client = CloudsightElixir.Client.new("sample_api_key")
CloudsightElixir.repost("my_token", client)
Retrieve the result of an image token
Examples
client = CloudsightElixir.Client.new("sample_api_key")
CloudsightElixir.retrieve_image("my_token", client)
Retrieve the result of a video token
Examples
client = CloudsightElixir.Client.new("sample_api_key")
CloudsightElixir.retrieve_video("my_token", client)
Send an image file or url to the Cloudsight API for identification
Examples
client = CloudsightElixir.Client.new(“sample_api_key”) CloudsightElixir.send_image(%{locale: “en”, remote_image_url: “https://dropbox.com/my_video.mp4”}, client)
client = CloudsightElixir.Client.new(“sample_api_key”) CloudsightElixir.send_image(%{locale: “en”, image: “./my_image.jpg”}, client)
Send a video file or url to the Cloudsight API for identification
Examples
client = CloudsightElixir.Client.new(“sample_api_key”) CloudsightElixir.send_video(%{locale: “en”, remote_video_url: “https://dropbox.com/my_video.mp4”}, client)
client = CloudsightElixir.Client.new(“sample_api_key”) CloudsightElixir.send_video(%{locale: “en”, video: “./my_video.mp4”}, client)
Poll for an image response until the timeout is reached - defaults to 20 seconds
Examples
client = CloudsightElixir.Client.new("sample_api_key")
CloudsightElixir.wait_for_image("my_token", client, %{ttl: 10_000}) # wait 10 seconds
Poll for an video response until the timeout is reached - defaults to 20 seconds
Examples
client = CloudsightElixir.Client.new("sample_api_key")
CloudsightElixir.wait_for_video("my_token", client, %{ttl: 10_000}) # wait 10 seconds