onboardiq 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/onboardiq.rb +47 -0
  3. metadata +60 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 23d8b0f25ebd701d22947457932c1c697d0bc3b2
4
+ data.tar.gz: cb6f7354357bb86ce78ce582681e07c61f03a0b3
5
+ SHA512:
6
+ metadata.gz: 8bbdf71516d4d160907112ad728816a7edec36928e791bc2e3687dfafdbe306b8a48d0a2decae27b437d47582182539ee5fe8cf080dfc5013a8cbfd946242f38
7
+ data.tar.gz: b7b9c0651a018eb88b583e5ed0ec706127ab1fe7a7b61cce629bff3ed782964fdf24797a662fbb06fbcb63e02c936af5079dc41d575bfe25fa3e5070089d783b
@@ -0,0 +1,47 @@
1
+ require 'httparty'
2
+
3
+ class OnboardIQ
4
+ include HTTParty
5
+ base_uri 'https://www.onboardiq.com/api'
6
+
7
+ DEFAULT_API_VERSION = 'v1'
8
+
9
+ attr_accessor :token, :version
10
+
11
+ def initialize(hash)
12
+ @token = hash[:token]
13
+ @version = DEFAULT_API_VERSION
14
+ self.class.default_params api_token: @token
15
+ end
16
+
17
+ def list_applicants
18
+ response = self.class.get("/#{@version}/applicants")
19
+ JSON.parse(response.body)
20
+
21
+ rescue
22
+ nil
23
+ end
24
+
25
+ def create_applicant(attrs)
26
+ response = self.class.post("/#{@version}/applicants", body: attrs)
27
+ JSON.parse(response.body)
28
+ rescue
29
+ nil
30
+ end
31
+
32
+ def update_applicant(applicant_key, attrs)
33
+ response = self.class.put("/#{@version}/applicants/#{applicant_key}", body: attrs)
34
+ JSON.parse(response.body)
35
+ rescue
36
+ nil
37
+ end
38
+
39
+ def get_applicant(applicant_key)
40
+ response = self.class.get("/#{@version}/applicants/#{applicant_key}")
41
+ JSON.parse(response.body)
42
+ rescue
43
+ nil
44
+ end
45
+
46
+
47
+ end
metadata ADDED
@@ -0,0 +1,60 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: onboardiq
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jeff Wells, Keith Ryu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httparty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: This is a simple way to use OnboardIQ's API with a Ruby on Rails app.
28
+ email:
29
+ - jeff@jeffrwells.com, keith@onboardiq.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - lib/onboardiq.rb
35
+ homepage: http://github.com/kibaekr/onboardiq
36
+ licenses:
37
+ - MIT
38
+ metadata: {}
39
+ post_install_message:
40
+ rdoc_options: []
41
+ require_paths:
42
+ - lib
43
+ - spec
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ requirements: []
55
+ rubyforge_project:
56
+ rubygems_version: 2.2.2
57
+ signing_key:
58
+ specification_version: 4
59
+ summary: A ruby wrapper for OnboardIQ's API.
60
+ test_files: []