Project

sitejabber

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

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

 Project Readme

Sitejabber

This is a basic integration to Sitejabber's API.

Installation

Add this line to your application's Gemfile:

gem 'sitejabber'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sitejabber

Configuration

There are a few settings that have to be set globally:

# In Rails, you could put this in config/initializers/sitejabber.rb
Sitejabber.redis = ConnectionPool.new { Redis.new( url: REDIS_URL ) }

# Required
Sitejabber.api_key = MY_API_KEY
Sitejabber.api_email = MY_API_EMAIL
Sitejabber.api_password = MY_API_PASSWORD

# Optional
Sitejabber.default_domain = MY_DEFAULT_DOMAIN # ex: github.com

Note Important Note: This gem requires Redis to work. It uses a Redis server to store access tokens.

Usage

Reviews

If you set your domain globally, you can do:

Sitejabber::Review.new.create(
  first_name: 'John',
  last_name: 'Doe',
  email: 'foo@bar.com',
  title: 'This is awesome!!!',
  rating: '5',
  content: 'Fell in love first week of owning.',
  order_id: 'ABC123'  
)

# Check Sitejabber API docs for required and optional parameters.

You can also specify your domain by review, for example:

Sitejabber::Review.new("github.com").create(
  first_name: 'John',
  last_name: 'Doe',
  email: 'foo@bar.com',
  title: 'This is awesome!!!',
  rating: '5',
  content: 'Fell in love first week of owning.',
  order_id: 'ABC123'  
)

# Check Sitejabber API docs for required and optional parameters.

TODO: add more examples

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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/goldbely/sitejabber-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Sitejabber project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.