Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
  lib
  Gemfile
  Gemfile.lock
  README.md
  namara.gemspec
Size: Mime:
  README.md

Namara Ruby Client

The Namara Ruby Client provides easy access to the Namara EE rpc services is written in ruby language.

Installation

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'

Versions and upgrading

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.

Setup

To start using namara ruby client, add this line to your code.

require "namara"

Accessing the namara rpc services

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)

Documentation

See the Namara Ruby Client docs for method calls