Gem Version

Circuit Client

circuit_client is a minimal client for the Circuit REST API.

It is not a full-featured API client and current only supports:

  • only client_credentials authentication
  • list and create conversations
  • create new messages

API Documentation

Available at rubydoc.info.

Usage

Basic usage

```ruby require ‘circuit_client’

client = CircuitClient::Client.new do |c| c.client_id = ‘' c.client_secret = '' end

client.create_message(‘', 'Hello World!') ```

Command line interface

The send-circuit command shipped with circuit_client has the following options:

``` Usage: send-circuit [OPTIONS] –help | -h display this help text –config | -c path to configuration file (default: /etc/send-circuit.yaml) --trace print http debug information

List conversations: –list | -l list conversations of user

Send message: –subject | -s Set subject for message

–conversation | -c Id of the conversation to send a message to or --new | -n creates a new conversation --topic | -t topic of the new conversation --participant | -p adds a participant to the conversation

The command will read the message body from stdin. ```