Reactio
Reactio API Client for ruby
Installation
Add this line to your application's Gemfile:
gem 'reactio'
And then execute:
$ bundle
Or install it yourself as:
$ gem install reactio
Usage
include Reactio
require 'reactio'
include Reactio
reactio.create_incident('An Incident')
And run:
$ REACTIO_API_KEY='YOUR_API_KEY' REACTIO_ORGANIZATION='YOUR_ORGANIZATION' bundle exec ruby create_incident.rb
Or instantiate Reactio::Service
require 'reactio'
reactio = Reactio::Service.new(
api_key: 'YOUR_API_KEY',
organization: 'YOUR_ORGANIZATION'
)
reactio.create_incident('An Incident')
Reactio incidents
require 'reactio'
include Reactio
reactio.create_incident(
'サイト閲覧不可',
status: 'open',
detection: 'internal',
cause: 'over-capacity',
cause_supplement: 'Webサーバがアクセス過多でダウン',
point: 'application',
scale: 'point',
pend_text: 'Webサーバの再起動を行う',
topics: %w(原因調査 復旧作業),
notification_text: '至急対応をお願いします',
notification_call: false
)
require 'reactio'
include Reactio
reactio.notify_incident(
123,
notification_text: '至急対応をお願いします',
notification_call: true
)
require 'reactio'
include Reactio
list = reactio.list_incidents(
from: Time.now - (60 * 60 * 24 * 7),
to: Time.now,
status: 'pend',
page: 1,
per_page: 50
)
p list.first
require 'reactio'
include Reactio
p reactio.describe_incident(123)
Contributing
- Fork it ( https://github.com/[my-github-username]/reactio/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request