No commit activity in last 3 years
No release in over 3 years
Simple wrapper for the Nice Reply API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.3
>= 0
>= 0
 Project Readme

Nice Reply Client

This is a simple Ruby wrapper for the Nice Reply API.

Requirements

  • A Nice Reply Account
  • The account's private API key

Installation

Add this line to your application's Gemfile:

gem 'nice-reply-client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install nice-reply-client

Usage

At the top of the class where you will be using Nice Reply Client, make sure to include this line

  require 'nice_reply_client'

Creating an instance of Nice Reply Client

  nice_reply_client = NiceReplyClient.new(
                        api_key: [Your Nice Reply Private API Key]
                      )

You can now call any method from Nice Reply's API. You do need to provide the method name in snake_case format. Please see below for examples.

After each call, the gem will return a hash including the response code and the response body from CDNetworks.

For a complete list of API calls, please see Nice Reply's API documentation

Examples

Getting your company's average ratings score:

  nice_reply_client.get_company_average
  => {:code=>"200", :body=>"{\"companyAverage\":9}"}

Getting your company's user list

  nice_reply_client.get_user_list

Getting an agent's average rating

  nice_reply_client.get_user_average(
    username: [Username to get average rating on]
  )

Getting a agent's average rating from last month

  nice_reply_client.get_user_average_last_month(
    username: [agent's username]
  )

Setting a rating

  nice_reply_client.set_rating(
    username: [agent's username],
    score: 10,
    from: [person leaving rating],
    ticket: "A123",
    comment: "Great service!"
  )

Updating a rating

  nice_reply_client.update_rating(
    id: [id # of rating to update],
    score: 7,
    comment: "OK service"
  )

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. Run specs with
    rake
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request