Skip to content

StatusCakeDev/statuscake-rb

Repository files navigation

statuscake-rb test

NOTE: This library is in alpha and not production ready. Whilst it can be used we will not offer support until it is generally available.

The Ruby implementation of the StatusCake API client. Documentation for this library can be found here.

Prerequisites

You will need the following things properly installed on your computer:

Installation

RubyGems

Using RubyGems, add the following to Gemfile:

gem 'statuscake-rb'

And then execute:

bundle install

Or install it yourself:

gem install statuscake-rb

GitHub

Installing the latest version from GitHub:

git clone https://github.com/StatusCakeDev/statuscake-rb
cd statuscake-rb
bundle install
bundle exec rake install

Usage

Import the gem from any Ruby file, instantiate an API client and execute a request:

require 'statuscake'

client = StatusCake::ApiClient.new

# Constructing these options is a temporary fix until a client wide
# authentication mechanism has been realised.
opts = { header_params: { 'Authorization' => "Bearer #{api_token}" } }

service = StatusCake::UptimeApi.new(client)
service.list_uptime_tests(opts)

License

This project is licensed under the MIT License.