Elixir client library for FilePreviews.io. Generate image previews and metadata from almost any kind of file.
{:filepreviews, "~> 1.0.0"}
{:ok, filepreviews} = FilePreviews.new("API_KEY", "API_SECRET")
# status is either :ok or :error
# response is a Map converted from the JSON response from FilePreviews.
{status, response} = FilePreviews.generate("http://example.com/file.pdf")
Check out the endpoint docs for all available options.
params = %{metadata: ["exif"], pages: "1"}
{status, response} = FilePreviews.generate("http://example.com/file.pdf", params)
{status, response} = FilePreviews.retrieve("42764e04-9094-467c-96b3-49d31ff4423d")