Repository is archived
No commit activity in last 3 years
No release in over 3 years
This gem provides fundamental access to Social Plus's Web API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
~> 3.1
>= 0

Runtime

 Project Readme

SocialPlus::WebApi

Travis Status License Gem

This gem provides fundamental access to Social Plus's Web API.

Installation

Add this line to your application's Gemfile:

gem 'social_plus-web_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install social_plus-web_api

Usage

Instantiate an instance of {SocialPlus::WebApi::Client} with a valid API key.

client = SocialPlus::WebApi::Client.new(API_KEY)

API access via GET method

begin
  result = client.execute(:api_name, arguments_as_hash)
rescue SocialPlus::WebApi::ApiError => e
  # handle exceptions
end

API access via POST method

begin
  result = client.execute(:api_name, arguments_as_hash, via: :post)
rescue SocialPlus::WebApi::ApiError => e
  # handle exceptions
end