Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 1.47 KB

README.md

File metadata and controls

73 lines (50 loc) · 1.47 KB

TestingBot Client Api

Client gem to easily interact with the TestingBot Api https://testingbot.com/support/api

How to install?

You can install the api testingbot ruby-gem by running on your commandline.

 $ git clone git@github.com:camilamaia/api.git
 $ cd api
 $ gem build api.gemspec
 $ gem install api-0.1.0.gem

Set up

After you installed the gem you need to run a one part setup. Type api in your commandline and fill in the API key and API secret you obtained on testingbot.com

 $ api

Usage

Configurations

 $ require 'api'
 $ Api.config
 $ Api.config = { :client_key => "bogus", :client_secret => "0000" }
 $ Api.reset_config!

User

 $ require 'api'
 $ Api::User.get_info
 $ Api::User.update_info({ "first_name" => new_name })

Tests

 $ require 'api'
 $ Api::Tests.get_all
 $ Api::Tests.get_single_test(123423423423423) # where 123423423423423 is the test id
 $ Api::Tests.delete_test(123423423423423) # where 123423423423423 is the test id

TestLab tests

 $ require 'api'
 $ Api::TestlabTests.get_all
 $ Api::TestlabTests.get_single_test(123423423423423)  # where 123423423423423 is the test id
 $ Api::TestlabTests.delete_test(123423423423423) # where 123423423423423 is the test id

Test this gem

The tests for this gem are located in the spec folder, you can run them with this Rake task:

  rake spec

More information

Get more information on testingbot.com