Ruby bindings for Speedyrails API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
test
.gitignore
.rubocop.yml
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
speedyrails.gemspec

README.md

Speedyrails

Official gem for the Speedyrails API (v0)

Installation

Add this line to your application's Gemfile:

gem 'speedyrails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install speedyrails

Usage

Client

Create an instance of the client to interact with the API

require 'speedyrails'

token = 'f805b608af8f915b74b0a2e8d14a'
client = Speedyrails.new(api_token: token)

Certificates

Get all certificates for an organization

client.certificates.all
# => [#<Speedyrails::Certificate @id='id'>, #<Speedyrails::Certificate @id='id'>]

Get all certificates matching a specific label

client.certificates.all(label: 'label')
# => [#<Speedyrails::Certificate @id='id'>]

Get a single certificate by id

client.certificates.find(id: 'id')
# => #<Speedyrails::Certificate @id='id'>

Create a new certificate

certificate = Speedyrails::Certificate.new(
  label: 'example',
  domains: ['example.com', 'www.example.com']
)
client.certificates.create(certificate)
# => #<Speedyrails::Certificate @id='id'>