bamboozled 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d7046229bf234dad5fe76584659bfda2e73875f2ca791f19afd676dff08589f
4
- data.tar.gz: 3d8dd39447ef45cc729585e489d66ed6ce16efac7d12f199f9e0e64b37b03bef
3
+ metadata.gz: d58323a0978d5045158caa12b5f23039ef87de775ea0b1993085758b48e69a95
4
+ data.tar.gz: 4c75dff59d876dad5edd761494c72565fbe52cd4cedd3e266f01c583aff87c1b
5
5
  SHA512:
6
- metadata.gz: 793ed853e666ca47d84d9b86589c701d74aa6263b54e0ff27f192ac6ce491d8e8849185a045887250b76ad46644a6f3a450732394dcffbdd84c4d4880edbb876
7
- data.tar.gz: 8f8edb6ab2d2a75afa859286729f3b7a0dd1c8b526fd8118589db7fde942bf85e332a53dd671be8ed543ddaff0a25632040d0dcb3de4da81283fac83b335c1f0
6
+ metadata.gz: d0f6284508280fdf9f6bd72b17a30207fd686391d32f40e2cc9695c22a0f70b5f331bd11608d3d7b92c54dd4006a116f82953bccc82c0cfacb9df739301e2edc
7
+ data.tar.gz: e75404091334829c96f70e157054cfa6b66b7532ce97d8209a69d2751537c25b43a3dd3ba930ded3b1c5927d2c6edd3efe8ed9b88020ac742e06a7215fe1c3fc
@@ -8,34 +8,46 @@
8
8
 
9
9
  ### Bug Fixes
10
10
 
11
+ ## 0.3.0 (2019-08-15)
12
+
13
+ ### New Features
14
+
15
+ - New api `ApplicantTracking` allows fetching of applicant tracking data. At this time it is currently in **beta**. ([@danhealy][])
16
+
17
+ ### Changes
18
+
19
+ - Updating the versions of the following dependencies ([@cabello][])
20
+ - `"httparty", "~> 0.17"`
21
+ - `"json", "~> 2"`
22
+
11
23
  ## 0.2.0 (2019-03-01)
12
24
 
13
25
  ### New Features
14
26
 
15
- * New method `Report#custom` allows fetching a custom report of employees. ([@artfuldodger][])
16
- * Make httpparty options configurable ([@ivanovv][])
17
- * Add time tracking api interface ([@nlively][])
27
+ - New method `Report#custom` allows fetching a custom report of employees. ([@artfuldodger][])
28
+ - Make httpparty options configurable ([@ivanovv][])
29
+ - Add time tracking api interface ([@nlively][])
18
30
 
19
31
  ### Changes
20
32
 
21
- * Using github actions for linting and testing
33
+ - Using github actions for linting and testing
22
34
 
23
35
  ### Bug Fixes
24
36
 
25
- * Fix Metadata API calls. Fixes [Issue #38](https://github.com/Skookum/bamboozled/issues/36) and [Issue #5](https://github.com/Skookum/bamboozled/issues/5)
37
+ - Fix Metadata API calls. Fixes [Issue #38](https://github.com/Skookum/bamboozled/issues/36) and [Issue #5](https://github.com/Skookum/bamboozled/issues/5)
26
38
 
27
39
  ## 0.1.0 (2016-06-14)
28
40
 
29
41
  ### New Features
30
42
 
31
- * New method `Employee#add` allows client to create new employees. ([@kylefdoherty][])
32
- * New method `Employee#update` allows client to update new employees. ([@kylefdoherty][])
43
+ - New method `Employee#add` allows client to create new employees. ([@kylefdoherty][])
44
+ - New method `Employee#update` allows client to update new employees. ([@kylefdoherty][])
33
45
 
34
46
  ### Changes
35
47
 
36
48
  ### Bug Fixes
37
49
 
38
- * Added missing documentation for `Employee#add`. ([@mjording][])
50
+ - Added missing documentation for `Employee#add`. ([@mjording][])
39
51
 
40
52
  [@markrickert]: https://github.com/markrickert
41
53
  [@enriikke]: https://github.com/Enriikke
@@ -46,3 +58,5 @@
46
58
  [@chrisman]: https://github.com/chrisman
47
59
  [@ivanovv]: https://github.com/ivanovv
48
60
  [@nlively]: https://github.com/nlively
61
+ [@danhealy]: https://github.com/danhealy
62
+ [@cabello]: https://github.com/cabello
data/README.md CHANGED
@@ -136,6 +136,31 @@ client.report.custom(fields, format = "JSON")
136
136
  client.report.find(report_number, format = "JSON", fd = true)
137
137
  ```
138
138
 
139
+ ### Applicant Tracking System
140
+ The ATS API is currently in **beta**. Please note that BambooHR may make breaking changes without
141
+ warning. Refer to the [documentation](https://www.bamboohr.com/api/documentation/ats.php) for
142
+ details.
143
+
144
+ ```ruby
145
+ # Get a list of job summaries
146
+ client.applicant_tracking.job_summaries
147
+
148
+ # Get a list of applications, following pagination
149
+ client.applicant_tracking.applications(page_limit: 10)
150
+
151
+ # Get the details of an application
152
+ client.applicant_tracking.application(123)
153
+
154
+ # Add comments to an application
155
+ client.applicant_tracking.add_comment(123, "Great Application!")
156
+
157
+ # Get a list of statuses for a company
158
+ client.applicant_tracking.statuses
159
+
160
+ # Change applicant's status
161
+ client.applicant_tracking.change_status(123, 3)
162
+ ```
163
+
139
164
  ### Metadata
140
165
 
141
166
  ```ruby
@@ -158,6 +183,11 @@ Please take the time to go through our [contribution guidelines](CONTRIBUTING.md
158
183
  Special thanks to all the awesome people who have helped make this gem better.
159
184
  You can see a list of them [here](https://github.com/Skookum/bamboozled/graphs/contributors).
160
185
 
186
+ #### Deploying to rubygems
187
+ 1. Update the version in the `lib/bamboozled/version.rb` file
188
+ 2. Update specs to use that version
189
+ 3. In github, add a [release](https://github.com/Skookum/bamboozled/releases) off the master branch. This will trigger the github action to deploy to rubygems
190
+
161
191
  ## License
162
192
 
163
193
  This project is licensed under the terms of the MIT license. See the
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "rspec", "~> 3.1"
26
26
  spec.add_development_dependency "webmock", "~> 1.20"
27
27
 
28
- spec.add_dependency "httparty", "~> 0.13"
29
- spec.add_dependency "json", "~> 1.8"
28
+ spec.add_dependency "httparty", "~> 0.17"
29
+ spec.add_dependency "json", "~> 2"
30
30
  end
@@ -8,6 +8,7 @@ require "bamboozled/errors"
8
8
  require "bamboozled/ext/yesno"
9
9
  require "bamboozled/api/base"
10
10
  require "bamboozled/api/field_collection"
11
+ require "bamboozled/api/applicant_tracking"
11
12
  require "bamboozled/api/employee"
12
13
  require "bamboozled/api/report"
13
14
  require "bamboozled/api/time_off"
@@ -0,0 +1,77 @@
1
+ # Implement endpoints for Bamboo HR's Applicant Tracking System
2
+ # https://www.bamboohr.com/api/documentation/ats.php
3
+ module Bamboozled
4
+ module API
5
+ class ApplicantTracking < Base
6
+ APPLICATION_STATUS_GROUPS = %w[ALL ALL_ACTIVE NEW ACTIVE INACTIVE HIRED].freeze
7
+
8
+ JOB_STATUS_GROUPS = [
9
+ "ALL", "DRAFT_AND_OPEN", "Open", "Filled", "Draft", "Deleted", "On Hold", "Canceled"
10
+ ].freeze
11
+
12
+ # Get a list of job summaries -- GET /jobs
13
+ def job_summaries(params = {}) # rubocop:disable Style/OptionHash
14
+ query = {
15
+ "statusGroups": "ALL", # JOB_STATUS_GROUPS
16
+ "sortBy": "created", # "count", "title", "lead", "created", "status"
17
+ "sortOrder": "ASC" # "ASC", "DESC"
18
+ }.merge(params)
19
+
20
+ request(:get, "applicant_tracking/jobs", query: query)
21
+ end
22
+
23
+ # Get a list of applications, following pagination -- GET /applications
24
+ def applications(params = {}) # rubocop:disable Style/OptionHash
25
+ page_limit = params.delete(:page_limit) { 1 }
26
+
27
+ applications_array = []
28
+ 1.upto page_limit do |i|
29
+ response = request_applications(params.merge(page: i))
30
+ applications_array += response["applications"]
31
+ break if response["paginationComplete"]
32
+ end
33
+ applications_array
34
+ end
35
+
36
+ # Get the details of an application -- GET /applications/:id
37
+ def application(applicant_id)
38
+ request(:get, "applicant_tracking/applications/#{applicant_id}")
39
+ end
40
+
41
+ # Add comments to an application -- POST /applications/:id/comments
42
+ def add_comment(applicant_id, comment)
43
+ details = { type: "comment", comment: comment }.to_json
44
+ options = { body: details, headers: { "Content-Type" => "application/json" } }
45
+
46
+ request(:post, "applicant_tracking/applications/#{applicant_id}/comments", options)
47
+ end
48
+
49
+ # Get a list of statuses for a company -- GET /statuses
50
+ def statuses
51
+ request(:get, "applicant_tracking/statuses")
52
+ end
53
+
54
+ # Change applicant's status -- POST /applications/:id/status
55
+ def change_status(applicant_id, status_id)
56
+ details = { status: status_id.to_i }.to_json
57
+ options = { body: details, headers: { "Content-Type" => "application/json" } }
58
+
59
+ request(:post, "applicant_tracking/applications/#{applicant_id}/status", options)
60
+ end
61
+
62
+ protected
63
+
64
+ def request_applications(params = {}) # rubocop:disable Style/OptionHash
65
+ # Also supported:
66
+ # page, jobId, applicationStatusId, applicationStatus (APPLICATION_STATUS_GROUPS),
67
+ # jobStatusGroups (JOB_STATUS_GROUPS), searchString
68
+ query = {
69
+ "sortBy": "created_date", # "first_name", "job_title", "rating", "phone", "status", "last_updated", "created_date"
70
+ "sortOrder": "ASC" # "ASC", "DESC"
71
+ }.merge(params)
72
+
73
+ request(:get, "applicant_tracking/applications", query: query)
74
+ end
75
+ end
76
+ end
77
+ end
@@ -27,5 +27,9 @@ module Bamboozled
27
27
  def time_tracking
28
28
  @time_tracking ||= Bamboozled::API::TimeTracking.new(@subdomain, @api_key, @httparty_options)
29
29
  end
30
+
31
+ def applicant_tracking
32
+ @applicant_tracking ||= Bamboozled::API::ApplicantTracking.new(@subdomain, @api_key, @httparty_options)
33
+ end
30
34
  end
31
35
  end
@@ -1,3 +1,3 @@
1
1
  module Bamboozled
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.3.0".freeze
3
3
  end
@@ -4,5 +4,5 @@ headers:
4
4
  Accept:
5
5
  - application/json
6
6
  User-Agent:
7
- - Bamboozled/0.2.0
7
+ - Bamboozled/0.3.0
8
8
 
@@ -0,0 +1,177 @@
1
+ HTTP/1.1 200 OK
2
+ content-type: application/json; charset=utf-8
3
+ date: Tue, 28 May 2019 19:25:35 UTC
4
+
5
+ [
6
+ {
7
+ "code": "NEW",
8
+ "description": null,
9
+ "enabled": true,
10
+ "id": "1",
11
+ "manageable": false,
12
+ "name": "New",
13
+ "translatedName": "New"
14
+ },
15
+ {
16
+ "code": "REVIEWED",
17
+ "description": null,
18
+ "enabled": true,
19
+ "id": "2",
20
+ "manageable": false,
21
+ "name": "Reviewed",
22
+ "translatedName": "Reviewed"
23
+ },
24
+ {
25
+ "code": "SCHEDPHONE",
26
+ "description": null,
27
+ "enabled": true,
28
+ "id": "3",
29
+ "manageable": false,
30
+ "name": "Schedule Phone Screen",
31
+ "translatedName": "Schedule Phone Screen"
32
+ },
33
+ {
34
+ "code": "PHONED",
35
+ "description": null,
36
+ "enabled": true,
37
+ "id": "4",
38
+ "manageable": false,
39
+ "name": "Phone Screened",
40
+ "translatedName": "Phone Screened"
41
+ },
42
+ {
43
+ "code": "SCHEDINT",
44
+ "description": null,
45
+ "enabled": true,
46
+ "id": "5",
47
+ "manageable": false,
48
+ "name": "Schedule Interview",
49
+ "translatedName": "Schedule Interview"
50
+ },
51
+ {
52
+ "code": "INTERVIEW",
53
+ "description": null,
54
+ "enabled": true,
55
+ "id": "6",
56
+ "manageable": false,
57
+ "name": "Interviewed",
58
+ "translatedName": "Interviewed"
59
+ },
60
+ {
61
+ "code": "ONHOLD",
62
+ "description": null,
63
+ "enabled": true,
64
+ "id": "7",
65
+ "manageable": false,
66
+ "name": "Put on Hold",
67
+ "translatedName": "Put on Hold"
68
+ },
69
+ {
70
+ "code": "REFCHECK",
71
+ "description": null,
72
+ "enabled": true,
73
+ "id": "8",
74
+ "manageable": false,
75
+ "name": "Checking References",
76
+ "translatedName": "Checking References"
77
+ },
78
+ {
79
+ "code": "OFFER",
80
+ "description": null,
81
+ "enabled": false,
82
+ "id": "9",
83
+ "manageable": false,
84
+ "name": "Made an Offer",
85
+ "translatedName": "Made an Offer"
86
+ },
87
+ {
88
+ "code": "NOFIT",
89
+ "description": null,
90
+ "enabled": true,
91
+ "id": "10",
92
+ "manageable": false,
93
+ "name": "Not a Fit",
94
+ "translatedName": "Not a Fit"
95
+ },
96
+ {
97
+ "code": "DECLINED",
98
+ "description": null,
99
+ "enabled": true,
100
+ "id": "11",
101
+ "manageable": false,
102
+ "name": "Declined Offer",
103
+ "translatedName": "Declined Offer"
104
+ },
105
+ {
106
+ "code": "NOQUAL",
107
+ "description": null,
108
+ "enabled": true,
109
+ "id": "12",
110
+ "manageable": false,
111
+ "name": "Not Qualified",
112
+ "translatedName": "Not Qualified"
113
+ },
114
+ {
115
+ "code": "OVERQUAL",
116
+ "description": null,
117
+ "enabled": true,
118
+ "id": "13",
119
+ "manageable": false,
120
+ "name": "Over Qualified",
121
+ "translatedName": "Over Qualified"
122
+ },
123
+ {
124
+ "code": "POACHED",
125
+ "description": null,
126
+ "enabled": true,
127
+ "id": "14",
128
+ "manageable": false,
129
+ "name": "Hired Elsewhere",
130
+ "translatedName": "Hired Elsewhere"
131
+ },
132
+ {
133
+ "code": "HIRED",
134
+ "description": null,
135
+ "enabled": true,
136
+ "id": "15",
137
+ "manageable": false,
138
+ "name": "Hired",
139
+ "translatedName": "Hired"
140
+ },
141
+ {
142
+ "code": "OLSENT",
143
+ "description": null,
144
+ "enabled": true,
145
+ "id": "16",
146
+ "manageable": false,
147
+ "name": "Offer Sent",
148
+ "translatedName": "Offer Sent"
149
+ },
150
+ {
151
+ "code": "OLSIGNED",
152
+ "description": null,
153
+ "enabled": true,
154
+ "id": "17",
155
+ "manageable": false,
156
+ "name": "Offer Signed",
157
+ "translatedName": "Offer Signed"
158
+ },
159
+ {
160
+ "code": "DELETED",
161
+ "description": null,
162
+ "enabled": false,
163
+ "id": "18",
164
+ "manageable": false,
165
+ "name": "Deleted",
166
+ "translatedName": "Deleted"
167
+ },
168
+ {
169
+ "code": "MOVED",
170
+ "description": null,
171
+ "enabled": false,
172
+ "id": "19",
173
+ "manageable": false,
174
+ "name": "Moved",
175
+ "translatedName": "Moved"
176
+ }
177
+ ]
@@ -0,0 +1,106 @@
1
+ HTTP/1.1 200 OK
2
+ content-type: application/json; charset=utf-8
3
+ date: Tue, 28 May 2019 19:25:35 UTC
4
+
5
+ {
6
+ "id": 33,
7
+ "appliedDate": "2019-02-05T21:03:16+00:00",
8
+ "status": {
9
+ "id": 5,
10
+ "label": "Schedule Interview",
11
+ "dateChanged": "2019-02-11T19:25:03+00:00",
12
+ "changedByUser": {
13
+ "id": 2388,
14
+ "firstName": "Ashley",
15
+ "lastName": "Adams",
16
+ "avatar": "https://d5a0f4a55e0f8389d6c9-937e97f4c2c35ce54def04e9eaa5f869.ssl.cf1.rackcdn.com/photos/5-0-3.jpg",
17
+ "jobTitle": {
18
+ "id": 18236,
19
+ "label": "HR Administrator"
20
+ }
21
+ }
22
+ },
23
+ "rating": 5,
24
+ "resumeFileId": 177,
25
+ "coverLetterFileId": null,
26
+ "movedTo": null,
27
+ "movedFrom": null,
28
+ "alsoConsideredForCount": 0,
29
+ "duplicateApplicationCount": 0,
30
+ "referredBy": null,
31
+ "desiredSalary": "₤85,000",
32
+ "commentCount": 2,
33
+ "emailCount": 3,
34
+ "eventCount": 4,
35
+ "questionsAndAnswers": [
36
+ {
37
+ "question": {
38
+ "id": 36,
39
+ "label": "References (Name, Company, and Contact Info)"
40
+ },
41
+ "answer": {
42
+ "id": 146,
43
+ "label": "Paul Clayton\r\nDirector of Digital Security\r\nSoftware Company\r\nDirectorofsecurity@efficientoffice.com\r\n+44 20 5555 0920\r\n\r\nJanet Allen\r\nSystems Administrator\r\nABC Corporation\r\nsecuritymanager@efficientoffice.com\r\n+44 20 5555 1233 "
44
+ }
45
+ },
46
+ {
47
+ "question": {
48
+ "id": 37,
49
+ "label": "How did you hear about this position?"
50
+ },
51
+ "answer": {
52
+ "id": 147,
53
+ "label": "My friend told me to apply to this position."
54
+ }
55
+ },
56
+ {
57
+ "question": {
58
+ "id": 41,
59
+ "label": "Who referred you to this position?"
60
+ },
61
+ "answer": {
62
+ "id": 148,
63
+ "label": "Ashley Adams"
64
+ }
65
+ }
66
+ ],
67
+ "applicationReferences": null,
68
+ "applicant": {
69
+ "email": "nathan@efficientoffice.com",
70
+ "phoneNumber": "+44 20 5555 2023",
71
+ "address": {
72
+ "addressLine1": "33 Bothwell St",
73
+ "addressLine2": null,
74
+ "city": null,
75
+ "state": "Glasgow City",
76
+ "zipcode": "G2 6AU",
77
+ "country": "United Kingdom"
78
+ },
79
+ "linkedinUrl": "http://www.linkedin.com",
80
+ "twitterUsername": null,
81
+ "websiteUrl": "http://www.blogger.com",
82
+ "availableStartDate": "2019-02-15",
83
+ "education": null,
84
+ "id": 95,
85
+ "firstName": "Nathan",
86
+ "lastName": "Rose",
87
+ "avatar": null
88
+ },
89
+ "job": {
90
+ "hiringLead": {
91
+ "employeeId": 12,
92
+ "firstName": "Eric",
93
+ "lastName": "Pasture",
94
+ "avatar": "https://d5a0f4a55e0f8389d6c9-937e97f4c2c35ce54def04e9eaa5f869.ssl.cf1.rackcdn.com/photos/12-0-4.jpg",
95
+ "jobTitle": {
96
+ "id": 18318,
97
+ "label": "VP of IT"
98
+ }
99
+ },
100
+ "id": 15,
101
+ "title": {
102
+ "id": null,
103
+ "label": "IT Security Engineer"
104
+ }
105
+ }
106
+ }
@@ -0,0 +1,8 @@
1
+ HTTP/1.1 200 OK
2
+ content-type: application/json; charset=utf-8
3
+ date: Tue, 28 May 2019 19:25:35 UTC
4
+
5
+ {
6
+ "type": "comment",
7
+ "id": 28
8
+ }
@@ -0,0 +1,309 @@
1
+ HTTP/1.1 200 OK
2
+ content-type: application/json; charset=utf-8
3
+ date: Tue, 28 May 2019 19:25:35 UTC
4
+
5
+ {
6
+ "paginationComplete": true,
7
+ "applications": [
8
+ {
9
+ "id": 33,
10
+ "appliedDate": "2019-02-05T21:03:16+00:00",
11
+ "status": {
12
+ "id": 5,
13
+ "label": "Schedule Interview"
14
+ },
15
+ "rating": 5,
16
+ "applicant": {
17
+ "id": 95,
18
+ "firstName": "Nathan",
19
+ "lastName": "Rose",
20
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=NR",
21
+ "email": "nathan@efficientoffice.com"
22
+ },
23
+ "job": {
24
+ "id": 15,
25
+ "title": {
26
+ "id": null,
27
+ "label": "IT Security Engineer"
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "id": 32,
33
+ "appliedDate": "2019-02-05T21:00:30+00:00",
34
+ "status": {
35
+ "id": 4,
36
+ "label": "Phone Screened"
37
+ },
38
+ "rating": null,
39
+ "applicant": {
40
+ "id": 94,
41
+ "firstName": "Jodi",
42
+ "lastName": "Edwards",
43
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=JE",
44
+ "email": "jodi@efficientoffice.com"
45
+ },
46
+ "job": {
47
+ "id": 15,
48
+ "title": {
49
+ "id": null,
50
+ "label": "IT Security Engineer"
51
+ }
52
+ }
53
+ },
54
+ {
55
+ "id": 31,
56
+ "appliedDate": "2019-02-05T20:57:10+00:00",
57
+ "status": {
58
+ "id": 2,
59
+ "label": "Reviewed"
60
+ },
61
+ "rating": 5,
62
+ "applicant": {
63
+ "id": 93,
64
+ "firstName": "Jacob",
65
+ "lastName": "Parks",
66
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=JP",
67
+ "email": "jacob@efficientoffice.com"
68
+ },
69
+ "job": {
70
+ "id": 15,
71
+ "title": {
72
+ "id": null,
73
+ "label": "IT Security Engineer"
74
+ }
75
+ }
76
+ },
77
+ {
78
+ "id": 30,
79
+ "appliedDate": "2019-02-05T20:53:05+00:00",
80
+ "status": {
81
+ "id": 2,
82
+ "label": "Reviewed"
83
+ },
84
+ "rating": 4,
85
+ "applicant": {
86
+ "id": 92,
87
+ "firstName": "Fred",
88
+ "lastName": "Hunt",
89
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=FH",
90
+ "email": "fred@efficientoffice.com"
91
+ },
92
+ "job": {
93
+ "id": 15,
94
+ "title": {
95
+ "id": null,
96
+ "label": "IT Security Engineer"
97
+ }
98
+ }
99
+ },
100
+ {
101
+ "id": 29,
102
+ "appliedDate": "2019-01-27T17:00:05+00:00",
103
+ "status": {
104
+ "id": 16,
105
+ "label": "Offer Sent"
106
+ },
107
+ "rating": 5,
108
+ "applicant": {
109
+ "id": 91,
110
+ "firstName": "Cora",
111
+ "lastName": "Parsons",
112
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=CP",
113
+ "email": "cora@efficientoffice.com"
114
+ },
115
+ "job": {
116
+ "id": 17,
117
+ "title": {
118
+ "id": null,
119
+ "label": "Account Executive"
120
+ }
121
+ }
122
+ },
123
+ {
124
+ "id": 28,
125
+ "appliedDate": "2019-01-27T16:58:25+00:00",
126
+ "status": {
127
+ "id": 1,
128
+ "label": "New"
129
+ },
130
+ "rating": null,
131
+ "applicant": {
132
+ "id": 90,
133
+ "firstName": "Craig",
134
+ "lastName": "Douglas",
135
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=CD",
136
+ "email": "craig@efficientoffice.com"
137
+ },
138
+ "job": {
139
+ "id": 17,
140
+ "title": {
141
+ "id": null,
142
+ "label": "Account Executive"
143
+ }
144
+ }
145
+ },
146
+ {
147
+ "id": 27,
148
+ "appliedDate": "2019-01-27T16:56:49+00:00",
149
+ "status": {
150
+ "id": 1,
151
+ "label": "New"
152
+ },
153
+ "rating": null,
154
+ "applicant": {
155
+ "id": 89,
156
+ "firstName": "Lloyd",
157
+ "lastName": "Cruz",
158
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=LC",
159
+ "email": "lloyd@efficientoffice.com"
160
+ },
161
+ "job": {
162
+ "id": 17,
163
+ "title": {
164
+ "id": null,
165
+ "label": "Account Executive"
166
+ }
167
+ }
168
+ },
169
+ {
170
+ "id": 26,
171
+ "appliedDate": "2019-01-27T16:55:04+00:00",
172
+ "status": {
173
+ "id": 1,
174
+ "label": "New"
175
+ },
176
+ "rating": null,
177
+ "applicant": {
178
+ "id": 88,
179
+ "firstName": "Jamie",
180
+ "lastName": "Graves",
181
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=JG",
182
+ "email": "jamie@efficientoffice.com"
183
+ },
184
+ "job": {
185
+ "id": 17,
186
+ "title": {
187
+ "id": null,
188
+ "label": "Account Executive"
189
+ }
190
+ }
191
+ },
192
+ {
193
+ "id": 25,
194
+ "appliedDate": "2019-01-27T16:49:36+00:00",
195
+ "status": {
196
+ "id": 16,
197
+ "label": "Offer Sent"
198
+ },
199
+ "rating": 4,
200
+ "applicant": {
201
+ "id": 87,
202
+ "firstName": "Katrina",
203
+ "lastName": "Cox",
204
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=KC",
205
+ "email": "katrina@efficientoffice.com"
206
+ },
207
+ "job": {
208
+ "id": 20,
209
+ "title": {
210
+ "id": null,
211
+ "label": "Software Engineer"
212
+ }
213
+ }
214
+ },
215
+ {
216
+ "id": 23,
217
+ "appliedDate": "2019-01-27T16:45:46+00:00",
218
+ "status": {
219
+ "id": 1,
220
+ "label": "New"
221
+ },
222
+ "rating": 5,
223
+ "applicant": {
224
+ "id": 85,
225
+ "firstName": "Gene",
226
+ "lastName": "Owen",
227
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=GO",
228
+ "email": "gene@efficientoffice.com"
229
+ },
230
+ "job": {
231
+ "id": 20,
232
+ "title": {
233
+ "id": null,
234
+ "label": "Software Engineer"
235
+ }
236
+ }
237
+ },
238
+ {
239
+ "id": 22,
240
+ "appliedDate": "2019-01-27T16:41:33+00:00",
241
+ "status": {
242
+ "id": 7,
243
+ "label": "Put on Hold"
244
+ },
245
+ "rating": 2,
246
+ "applicant": {
247
+ "id": 84,
248
+ "firstName": "Frank",
249
+ "lastName": "Baldwin",
250
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=FB",
251
+ "email": "frank@efficientoffice.com"
252
+ },
253
+ "job": {
254
+ "id": 20,
255
+ "title": {
256
+ "id": null,
257
+ "label": "Software Engineer"
258
+ }
259
+ }
260
+ },
261
+ {
262
+ "id": 21,
263
+ "appliedDate": "2019-01-27T16:39:10+00:00",
264
+ "status": {
265
+ "id": 8,
266
+ "label": "Checking References"
267
+ },
268
+ "rating": 5,
269
+ "applicant": {
270
+ "id": 83,
271
+ "firstName": "Janice",
272
+ "lastName": "Hall",
273
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=JH",
274
+ "email": "Janice@efficientoffice.com"
275
+ },
276
+ "job": {
277
+ "id": 20,
278
+ "title": {
279
+ "id": null,
280
+ "label": "Software Engineer"
281
+ }
282
+ }
283
+ },
284
+ {
285
+ "id": 20,
286
+ "appliedDate": "2019-01-27T16:37:35+00:00",
287
+ "status": {
288
+ "id": 3,
289
+ "label": "Schedule Phone Screen"
290
+ },
291
+ "rating": 4,
292
+ "applicant": {
293
+ "id": 82,
294
+ "firstName": "Kimberly",
295
+ "lastName": "Hughes",
296
+ "avatar": "https://resources.bamboohr.com/employees/photos/initials.php?initials=KH",
297
+ "email": "kimberly@efficientoffice.com"
298
+ },
299
+ "job": {
300
+ "id": 20,
301
+ "title": {
302
+ "id": null,
303
+ "label": "Software Engineer"
304
+ }
305
+ }
306
+ }
307
+ ],
308
+ "nextPageUrl": null
309
+ }
@@ -0,0 +1,8 @@
1
+ HTTP/1.1 200 OK
2
+ content-type: application/json; charset=utf-8
3
+ date: Tue, 28 May 2019 19:25:35 UTC
4
+
5
+ {
6
+ "type": "positionApplicantStatus",
7
+ "id": 254
8
+ }
@@ -0,0 +1,131 @@
1
+ HTTP/1.1 200 OK
2
+ content-type: application/json; charset=utf-8
3
+ date: Tue, 28 May 2019 19:25:35 UTC
4
+
5
+ [
6
+ {
7
+ "postedDate": "2019-01-27T16:21:08+00:00",
8
+ "location": {
9
+ "id": 18240,
10
+ "label": "Sydney, New South Wales",
11
+ "address": null
12
+ },
13
+ "department": {
14
+ "id": 18264,
15
+ "label": "Product"
16
+ },
17
+ "status": {
18
+ "id": 1,
19
+ "label": "Open"
20
+ },
21
+ "newApplicantsCount": 1,
22
+ "activeApplicantsCount": 5,
23
+ "totalApplicantsCount": 6,
24
+ "postingUrl": "https://x.bamboohr.com/jobs/view.php?id=20",
25
+ "id": 20,
26
+ "title": {
27
+ "id": null,
28
+ "label": "Software Engineer"
29
+ }
30
+ },
31
+ {
32
+ "postedDate": "2019-05-28T17:10:57+00:00",
33
+ "location": {
34
+ "id": 18235,
35
+ "label": "Lindon, Utah",
36
+ "address": null
37
+ },
38
+ "department": {
39
+ "id": 18234,
40
+ "label": "Human Resources"
41
+ },
42
+ "status": {
43
+ "id": 2,
44
+ "label": "Draft"
45
+ },
46
+ "newApplicantsCount": 0,
47
+ "activeApplicantsCount": 0,
48
+ "totalApplicantsCount": 0,
49
+ "postingUrl": "https://x.bamboohr.com/jobs/view.php?id=19",
50
+ "id": 19,
51
+ "title": {
52
+ "id": null,
53
+ "label": "General Application"
54
+ }
55
+ },
56
+ {
57
+ "postedDate": "2019-05-28T17:10:57+00:00",
58
+ "location": {
59
+ "id": 18235,
60
+ "label": "Lindon, Utah",
61
+ "address": null
62
+ },
63
+ "department": {
64
+ "id": 18256,
65
+ "label": "Marketing"
66
+ },
67
+ "status": {
68
+ "id": 2,
69
+ "label": "Draft"
70
+ },
71
+ "newApplicantsCount": 0,
72
+ "activeApplicantsCount": 0,
73
+ "totalApplicantsCount": 0,
74
+ "postingUrl": "https://x.bamboohr.com/jobs/view.php?id=18",
75
+ "id": 18,
76
+ "title": {
77
+ "id": null,
78
+ "label": "Videographer"
79
+ }
80
+ },
81
+ {
82
+ "postedDate": "2019-01-25T21:31:31+00:00",
83
+ "location": {
84
+ "id": 18243,
85
+ "label": "Vancouver, British Columbia",
86
+ "address": null
87
+ },
88
+ "department": {
89
+ "id": 18249,
90
+ "label": "Sales"
91
+ },
92
+ "status": {
93
+ "id": 1,
94
+ "label": "Open"
95
+ },
96
+ "newApplicantsCount": 3,
97
+ "activeApplicantsCount": 4,
98
+ "totalApplicantsCount": 4,
99
+ "postingUrl": "https://x.bamboohr.com/jobs/view.php?id=17",
100
+ "id": 17,
101
+ "title": {
102
+ "id": null,
103
+ "label": "Account Executive"
104
+ }
105
+ },
106
+ {
107
+ "postedDate": "2019-01-25T21:28:37+00:00",
108
+ "location": {
109
+ "id": 18238,
110
+ "label": "Mayfaird, London, City of",
111
+ "address": null
112
+ },
113
+ "department": {
114
+ "id": 18251,
115
+ "label": "IT"
116
+ },
117
+ "status": {
118
+ "id": 1,
119
+ "label": "Open"
120
+ },
121
+ "newApplicantsCount": 0,
122
+ "activeApplicantsCount": 4,
123
+ "totalApplicantsCount": 4,
124
+ "postingUrl": "https://x.bamboohr.com/jobs/view.php?id=15",
125
+ "id": 15,
126
+ "title": {
127
+ "id": null,
128
+ "label": "IT Security Engineer"
129
+ }
130
+ }
131
+ ]
@@ -4,5 +4,5 @@ headers:
4
4
  Accept:
5
5
  - application/json
6
6
  User-Agent:
7
- - Bamboozled/0.2.0
7
+ - Bamboozled/0.3.0
8
8
 
@@ -0,0 +1,68 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe "ApplicantTracking" do
4
+ before do
5
+ @client = Bamboozled.client(subdomain: "x", api_key: "x")
6
+ end
7
+
8
+ it "gets job summaries" do
9
+ response = File.new("spec/fixtures/job_summaries.json")
10
+ stub_request(:any, /.*api\.bamboohr\.com.*/).to_return(response)
11
+
12
+ jobs = @client.applicant_tracking.job_summaries
13
+
14
+ expect(jobs).to be_a Array
15
+ expect(jobs.count).to eq 5
16
+ end
17
+
18
+ it "gets applicant statuses" do
19
+ response = File.new("spec/fixtures/applicant_statuses.json")
20
+ stub_request(:any, /.*api\.bamboohr\.com.*/).to_return(response)
21
+
22
+ statuses = @client.applicant_tracking.statuses
23
+
24
+ expect(statuses).to be_a Array
25
+ expect(statuses.count).to eq 19
26
+ end
27
+
28
+ it "gets a list of applications" do
29
+ response = File.new("spec/fixtures/applications.json")
30
+ stub_request(:any, /.*api\.bamboohr\.com.*/).to_return(response)
31
+
32
+ applications = @client.applicant_tracking.applications(page_limit: 10)
33
+
34
+ expect(applications).to be_a Array
35
+ expect(applications.count).to eq 13
36
+ end
37
+
38
+ it "gets details of an application" do
39
+ response = File.new("spec/fixtures/application.json")
40
+ stub_request(:any, /.*api\.bamboohr\.com.*/).to_return(response)
41
+
42
+ application = @client.applicant_tracking.application(33)
43
+ required_email = "nathan@efficientoffice.com"
44
+
45
+ expect(application).to be_a Hash
46
+ expect(application["applicant"]["email"]).to eq required_email
47
+ end
48
+
49
+ it "can change the status of an application" do
50
+ response = File.new("spec/fixtures/change_applicant_status.json")
51
+ stub_request(:post, /.*api\.bamboohr\.com.*/).to_return(response)
52
+
53
+ status_change = @client.applicant_tracking.change_status(33, 3)
54
+
55
+ expect(status_change).to be_a Hash
56
+ expect(status_change["type"]).to eq "positionApplicantStatus"
57
+ end
58
+
59
+ it "can add a comment to an application" do
60
+ response = File.new("spec/fixtures/application_comment.json")
61
+ stub_request(:post, /.*api\.bamboohr\.com.*/).to_return(response)
62
+
63
+ comment = @client.applicant_tracking.add_comment(33, "Test comment")
64
+
65
+ expect(comment).to be_a Hash
66
+ expect(comment["type"]).to eq "comment"
67
+ end
68
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bamboozled
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rickert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-02 00:00:00.000000000 Z
11
+ date: 2019-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.13'
75
+ version: '0.17'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.13'
82
+ version: '0.17'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: json
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.8'
89
+ version: '2'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.8'
96
+ version: '2'
97
97
  description: Bamboozled wraps the BambooHR API without the use of Rails dependencies.
98
98
  email:
99
99
  - mjar81@gmail.com
@@ -121,6 +121,7 @@ files:
121
121
  - bamboozled.gemspec
122
122
  - examples/employees_over_time.rb
123
123
  - lib/bamboozled.rb
124
+ - lib/bamboozled/api/applicant_tracking.rb
124
125
  - lib/bamboozled/api/base.rb
125
126
  - lib/bamboozled/api/employee.rb
126
127
  - lib/bamboozled/api/field_collection.rb
@@ -136,14 +137,19 @@ files:
136
137
  - logos/bamboozled_logo_green.png
137
138
  - logos/skookum_mark_black.png
138
139
  - logos/skookum_mark_black.svg
139
- - relnotes/v0.1.0.md
140
140
  - spec/fixtures/add_employee_details.json
141
141
  - spec/fixtures/add_employee_response.json
142
142
  - spec/fixtures/add_employee_xml.yml
143
143
  - spec/fixtures/all_employees.json
144
+ - spec/fixtures/applicant_statuses.json
145
+ - spec/fixtures/application.json
146
+ - spec/fixtures/application_comment.json
147
+ - spec/fixtures/applications.json
148
+ - spec/fixtures/change_applicant_status.json
144
149
  - spec/fixtures/custom_report.json
145
150
  - spec/fixtures/employee_emails.json
146
151
  - spec/fixtures/job_info.xml
152
+ - spec/fixtures/job_summaries.json
147
153
  - spec/fixtures/last_changed.json
148
154
  - spec/fixtures/meta_fields.json
149
155
  - spec/fixtures/meta_lists.json
@@ -162,6 +168,7 @@ files:
162
168
  - spec/fixtures/update_employee_details.json
163
169
  - spec/fixtures/update_employee_response.json
164
170
  - spec/fixtures/update_employee_xml.yml
171
+ - spec/lib/bamboozled/api/applicant_tracking_spec.rb
165
172
  - spec/lib/bamboozled/api/base_spec.rb
166
173
  - spec/lib/bamboozled/api/employee_spec.rb
167
174
  - spec/lib/bamboozled/api/field_collection_spec.rb
@@ -199,9 +206,15 @@ test_files:
199
206
  - spec/fixtures/add_employee_response.json
200
207
  - spec/fixtures/add_employee_xml.yml
201
208
  - spec/fixtures/all_employees.json
209
+ - spec/fixtures/applicant_statuses.json
210
+ - spec/fixtures/application.json
211
+ - spec/fixtures/application_comment.json
212
+ - spec/fixtures/applications.json
213
+ - spec/fixtures/change_applicant_status.json
202
214
  - spec/fixtures/custom_report.json
203
215
  - spec/fixtures/employee_emails.json
204
216
  - spec/fixtures/job_info.xml
217
+ - spec/fixtures/job_summaries.json
205
218
  - spec/fixtures/last_changed.json
206
219
  - spec/fixtures/meta_fields.json
207
220
  - spec/fixtures/meta_lists.json
@@ -220,6 +233,7 @@ test_files:
220
233
  - spec/fixtures/update_employee_details.json
221
234
  - spec/fixtures/update_employee_response.json
222
235
  - spec/fixtures/update_employee_xml.yml
236
+ - spec/lib/bamboozled/api/applicant_tracking_spec.rb
223
237
  - spec/lib/bamboozled/api/base_spec.rb
224
238
  - spec/lib/bamboozled/api/employee_spec.rb
225
239
  - spec/lib/bamboozled/api/field_collection_spec.rb
@@ -1,13 +0,0 @@
1
- ### New Features
2
-
3
- * New method `Employee#add` allows client to create new employees. ([@kylefdoherty][])
4
- * New method `Employee#update` allows client to update new employees. ([@kylefdoherty][])
5
-
6
- ### Changes
7
-
8
- ### Bug Fixes
9
-
10
- * Added missing documentation for `Employee#add`. ([@mjording][])
11
-
12
- [@kylefdoherty]: https://github.com/kylefdoherty
13
- [@mjording]: https://github.com/mjording