Project

pinch-api

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A simple gem to easily connect to the Inch Housing Intervention Interface
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.2.1
~> 1.1.2
 Project Readme

Pinch

Installation

To install this gem, simply type : gem install pinch

You can also add it to a gemfile : gem 'pinch'

Finally, if you wish to use the head version, you can specify the github master branch : gem pinch, github: 'Inchdev/pinch-ruby'

Configuration

There is 2 different ways of authenticating yourself, either from an initializer file :

# config/initializers/pinch.rb
require 'pinch'
Pinch::Configuration.x_api_token = 'MY_API_KEY'
# or the recommended way
Pinch::Configuration.x_api_token = ENV['PINCH_API_KEY']

Or directly before you want to perform a query :

require 'pinch'
pinch = Pinch::PinchClient.new(x_api_token: "MY_API_KEY", x_api_email: "myemail@example.com")

Usage

For further documentation, please refer to the documentation website