Argonuts Ruby Library
The Argonuts Ruby library provides access to the Argonuts API.
Documentation
See the full documentation.
Installation
You can install it via rubygems:
gem install argonuts-ruby
Bundler
In Gemfile:
gem 'argonuts-ruby'
And then, type in your terminal:
bundle install
Usage
The library needs you to set your API key which can be found in your dashboard.
Argonuts.api_key = 'api-key'
Argonuts.notification = {
type: "http",
url: "https://yoursite.co/api/argonuts/webhook"
}
Argonuts.storage = {
url: "https://yoursite.co/api/argonuts/upload",
}
Creating a job
Argonuts::Job.create(
input: { url: "https://yoursite.co/path/file.mp4" },
outputs: {
"jpg:300x": { path: "/image.jpg" },
"mp4:1080p": { path: "/1080p.mp4" },
"httpstream": {
hls: { path: "hls/" }
}
}
)
Getting information about a job
Argonuts::Job.retrieve("OolQXaiU86NFki")
Retrieving metadata
Argonuts::Metadata.retrieve("OolQXaiU86NFki")
Per-request configuration
cli = Argonuts::Client.new(api_key: "api-key-prod")
Argonuts::Job.create(job, client: cli)
Released under the MIT license.