0.0
No commit activity in last 3 years
No release in over 3 years
Rightnow API Ruby wrapper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 2.6
~> 1.8

Runtime

>= 0.8.0
>= 0.5.0
>= 1.0.0
 Project Readme

Rightnow

Build Status

Ruby wrapper for the Oracle Rightnow Social API v2

Installation

Add this line to your application's Gemfile:

gem 'rightnow-client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rightnow-client

Usage

Instanciate a new client with your community url, API keys and API default user:

client = Rightnow::Client.new "http://community.company.com", :api_key => "YOUR_PUBLIC_KEY", :secret_key => "YOUR_PRIVATE_KEY", :user => "api@dimelo.com"

The user specified here is a user of the community (usually a superadmin) which must have the permissions for all the actions you want to do with the client.

Then you can query the search API with:

res = client.search term: 'white', limit: 50

Get more details for one or more post:

client.post_get res.first
client.post_get ["fa8e6cc713", "fa8e6cb714"]

Fetch all comments for a post:

client.comment_list res.first
client.comment_list "fa8e6cc713"

Add a comment:

client.comment_add res.first, "Hello", as: 'user@email.com'
client.comment_add "fa8e6cc713", "Hello", as: 'user@email.com'

Edit a comment:

client.comment_update res.first, "Hello 2", as: 'user@email.com'
client.comment_update "fa8e6cc713", "Hello 2", as: 'user@email.com'

Delete a comment:

client.comment_delete 777, as: 'author@email.com'

Get more details for one or more users:

client.user_get res.first.created_by.hash
client.user_get ["fa8e6cc713", "fa8e6cb714"]

Or any other generic request:

client.request 'UserList', :as => 'admin@domain.com'

Debug

Instanciate the client with a :debug => true option to get debug info:

client = Rightnow::Client.new "http://community.company.com", ..., :debug => true

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request