Cloudsight API v0.1.1 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 a token
Send an image or url to the Cloudsight API for identification
Poll for a 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)
Link to this function
retrieve(token, client)
retrieve(binary, Client.t) :: {atom, [{:key, binary}]}
retrieve(binary, Client.t) :: {atom, [{:key, binary}] | atom}
Retrieve the result of a token
Examples
client = CloudsightElixir.Client.new("sample_api_key")
CloudsightElixir.retrieve("my_token", client)
Send an image or url to the Cloudsight API for identification
Examples
client = CloudsightElixir.Client.new("sample_api_key")
CloudsightElixir.send(%{locale: "en", remote_image_url: "https://dropbox.com/my_image.png"}, client)
Link to this function
wait_for(token, client)
Poll for a response until the timeout is reached - defaults to 20 seconds
Examples
client = CloudsightElixir.Client.new("sample_api_key")
CloudsightElixir.wait_for("my_token", client, %{ttl: 10_000}) # wait 10 seconds
Link to this function
wait_for(token, client, options)