0.0
No commit activity in last 3 years
No release in over 3 years
Ruby gem for StatusCake API - supports basic functions on tests
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 0.10
~> 2.6
~> 2.0
~> 3.12
~> 3.0
~> 3.5
~> 0.8
~> 2.9
~> 1.18

Runtime

~> 0.13
 Project Readme

status_cake¶ ↑

StatusCake gem for Ruby. See the StatusCake API documentation at kb.statuscake.com/api

Usage¶ ↑

@sc = StatusCake.new(:username => 'username', :api_key => 'apikey')

Updating and Inserting Tests¶ ↑

response = @sc.update_test({
  'WebsiteName'  => 'google.com',
  'WebsiteURL'   => 'https://google.com',
  'CheckRate'    => '300',
  'ContactGroup' => '10395',
  'TestType'     => 'HTTP',
  'Paused'       => 1
})

Retrieving Tests¶ ↑

Please be aware that although filtering is supported on any criteria via the gem, only the CUID and Status are supported by the API and therefore filtering is done on the resultset. If you have a large number of tests, you will probably want to group by CUID.

@sc.tests('CUID' => '10395', 'WebsiteURL' => 'https://mysite.example.com')

Pausing/Unpausing Tests¶ ↑

t = @sc.tests('WebsiteName' => 'example.com')
@sc.pause_test(t)
@sc.unpause_test(t)

Retrieving Contact Groups¶ ↑

@sc.contact_groups('GroupName' => 'Production')

Updating and Insert Contact Groups¶ ↑

response = @sc.update_contact_group({
  'ContactID' => 12345,
  'GroupName' => 'Test Group',
  'Email' => 'updated@invalid.com'
})

Logging¶ ↑

Override the debug_output, see Net::HTTP#set_debug_output for options.

class StatusCake
  debug_output $stdout
end

License¶ ↑

Apache 2.0 License. See LICENSE.txt for further details.