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 profile.

Argonuts.api_key = 'api-key'

Argonuts.notification = {
  url: "https://yoursite.co/api/argonuts/webhook"
}

Argonuts.storage = {
  url: "https://yoursite.co/api/argonuts/upload",
}

Creating a job

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(job.id)

Released under the MIT license.