Repository URL to install this package:
|
Version:
2.1.3 ▾
|
| lib |
| Gemfile |
| Gemfile.lock |
| README.md |
| namara.gemspec |
The Namara Ruby Client provides easy access to the Namara EE rpc services is written in ruby language.
Add the namara gem to a Gemfile. The ref: should be pointing to the latest commit
gem 'namara', git: 'https://github.com/thinkdata-works/namara-ruby.git', branch: 'develop'
Note If you are running Ruby >= 2.6 please ensure that you are using namara-ruby >= 2.1 due to a critical change in the google-protobuf gem that was introduced around 3.7 that changed the way that the necessary files were included. If you are running Ruby < 2.6 you should be able to use namara-ruby >= 2.1 without issue.
To start using namara ruby client, add this line to your code.
require "namara"
Get access to response objects by initializing a Namara client. It takes the domain of the namara api (e.g. ee-dev.namara.io) and the protocol (defaults to https)
namara = Namara.new(domain: "ee-dev.namara.io")
Then, choose an auth strategy. Token auth:
namara.with_token_auth!(token)
Cookie auth (provide the entire cookies array to forward)
namara.with_cookie_auth!(cookies)
APIKey auth :
namara.with_api_key!(api_key)