https://github.com/camilamaia/testing-bot-client-api
Client gem to easily interact with TestingBot Api
https://github.com/camilamaia/testing-bot-client-api
api gem interview-test ruby
Last synced: about 1 year ago
JSON representation
Client gem to easily interact with TestingBot Api
- Host: GitHub
- URL: https://github.com/camilamaia/testing-bot-client-api
- Owner: camilamaia
- Created: 2017-04-19T13:56:47.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2023-07-04T12:29:51.000Z (almost 3 years ago)
- Last Synced: 2024-10-19T02:29:24.451Z (over 1 year ago)
- Topics: api, gem, interview-test, ruby
- Language: Ruby
- Homepage: https://testingbot.com/support/api
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
``` bash
$ 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
``` bash
$ api
```
## Usage
### Configurations
``` ruby
$ require 'api'
$ Api.config
$ Api.config = { :client_key => "bogus", :client_secret => "0000" }
$ Api.reset_config!
```
### User
``` ruby
$ require 'api'
$ Api::User.get_info
$ Api::User.update_info({ "first_name" => new_name })
```
### Tests
``` ruby
$ 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
``` ruby
$ 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:
``` bash
rake spec
```
## More information
Get more information on testingbot.com