pinch-api 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -39
  3. data/lib/pinch/configuration.rb +2 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3847478d602a0b7ba7d315279b6501e46dbf05fc
4
- data.tar.gz: 7fa3b4f0e62309c6cd2dd48179c609f1ab9058db
3
+ metadata.gz: f3a56ab8e7b4a92cff65468ddc3e83273bf451b0
4
+ data.tar.gz: c3ee564b18ae9b5f8739520e02772c1d40044df4
5
5
  SHA512:
6
- metadata.gz: 6025eea1563e0011bd82289a803965b43ec8f56de85d7dcb62b73722d6c2bf6f922ad361cccfa5a84407e3e7ffb78099b284d271eec84c355c5c86b45954f7c2
7
- data.tar.gz: c3ea6842853b29a0bfe2a79920233a6bfc108a9f208dd6c9708b72775cad4df8c7421eaace36272a0f7ead67e614ba3911d9a8e881321b1b97cfe94465275723
6
+ metadata.gz: 1f20f99d667ce97943f713d3339a041b6c9d036ba5660812e65943c0e6bd161326797bb6307c0abb4ede58f13a5ca7cdf53b3466f4abdd8bb767a38748f7ea25
7
+ data.tar.gz: fbcd8238d7550ab1ea64da15b021e58334a8e6ec05d0c53012b7b83b84b0547ea450a7a10f1b628bd5ad8dd8f7bf32d94acc899d6fbc1c248f06b1c30b95df1e
data/README.md CHANGED
@@ -1,48 +1,32 @@
1
1
  Pinch
2
2
  =================
3
- This API SDK was automatically generated by APIMATIC v2.0
4
3
 
5
- How To Configure:
6
- =================
7
- The generated code might need to be configured with your API credentials. To do that,
8
- open the file "configuration.rb" and edit it's contents.
9
-
10
- Alternatively, you can modify the Configuration parameters at run-time through the following
11
- ```
12
- Pinch::Configuration.your_paramater=YOUR_VALUE
13
- ```
4
+ ## Installation
14
5
 
15
- How To Build:
16
- =============
17
- The generated code uses a Ruby gem namely 'unirest'. The reference to this gem is
18
- already added in the gemspec. Therefore, you will need internet access to resolve
19
- this dependency.
6
+ To install this gem, simply type :
7
+ `gem install pinch`
20
8
 
21
- How To Use:
22
- ===========
23
- The generated code can be used to build gem, which can then be distributed online.
24
- Otherwise, you can include the generated code in your project to use directly.
9
+ You can also add it to a gemfile :
10
+ `gem 'pinch'`
25
11
 
26
- Use the following steps to build a gem and use locally
12
+ Finally, if you wish to use the head version, you can specify the github master branch :
13
+ `gem pinch, github: 'Inchdev/pinch-ruby'`
27
14
 
28
- 1. Run the build command
29
- ```
30
- gem build pinch.gemspec
31
- ```
32
-
33
- 2. Run the install command
34
- ```
35
- gem install ./pinch-1.0.gem
36
- ```
37
-
38
- 3. In your Gemfile add this line
39
- ```
40
- gem 'pinch', '~> 1.0'
41
- ```
15
+ ## Configuration
16
+ There is 2 different ways of authenticating yourself, either from an initializer file :
17
+ ```ruby
18
+ # config/initializers/pinch.rb
19
+ require 'pinch'
20
+ Pinch::Configuration.x_api_token = 'MY_API_KEY'
21
+ # or the recommended way
22
+ Pinch::Configuration.x_api_token = ENV['PINCH_API_KEY']
23
+ ```
42
24
 
43
- 4. Now create an instance and use the instance methods, like following.
25
+ Or directly before you want to perform a query :
26
+ ```ruby
27
+ require 'pinch'
28
+ pinch = Pinch::PinchClient.new(x_api_token: "MY_API_KEY", x_api_email: "myemail@example.com")
29
+ ```
44
30
 
45
- ```
46
- ctl = Pinch::WebhookTypeController.new params
47
- ctl.list params
48
- ```
31
+ ## Usage
32
+ For further documentation, please refer to [the documentation website](http://doc-company.inchbase.com/?ruby)
@@ -6,10 +6,10 @@ module Pinch
6
6
  @base_uri = 'https://api-company.inchbase.com/api/v1'
7
7
 
8
8
  # Your api key
9
- @x_api_token = TODO: Replace
9
+ @x_api_token = nil
10
10
 
11
11
  # Your registered email
12
- @x_api_email = TODO: Replace
12
+ @x_api_email = nil
13
13
 
14
14
  # create the getters and setters
15
15
  class << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinch-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Inchdev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-13 00:00:00.000000000 Z
12
+ date: 2016-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: unirest