0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
An unofficial Ruby wrapper for Client Success's REST API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
>= 0
>= 12.3.3
~> 3.0
= 0.77.0
>= 0

Runtime

 Project Readme

Ruby Wrapper for the ClientSuccess Open API

Installation

Add this line to your application's Gemfile:

gem "client_success"

And then execute:

$ bundle

Usage

In order to make requests against the ClientSuccess Open API you'll first need to use your existing credentials (username and password) to create an Access Token:

response = ClientSuccess::AccessToken::Create(
  username: "test@example.com",
  password: "Password123"
)

puts response["access_token"]
=> "979e3ce5-5f57-486a-af03-d328f50bd356"

If the supplied credentials could not be authenticated a ClientSuccess::AccessToken::InvalidCredentials exception will be raised. Note that Access Tokens are valid for 12 hours, after which a new one must be created.

Once you have successfully created an Access Token you can initialise a connection object and make authenticated requests:

cs = ClientSuccess::Connection.authorised(
  response["access_token"]
)

# get a list of all clients
clients = ClientSuccess::Client.list_all(connection: cs)

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Publishing

This repository is set up to auto publish to https://rubygems.org/gems/client_success on merge into master.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ignitionapp/client_success.