bobhr 0.5.8 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bob/api/employees.rb +5 -0
- data/lib/bob/models/employee.rb +8 -0
- data/lib/bob/parsers/employee_parser.rb +6 -0
- data/lib/bob/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffda2d8bd0f7e6ea7a53b1a8f92fe6c247fa3702737960c2f84a9bd2e2f28942
|
4
|
+
data.tar.gz: ad09a4e4594864444610990d6d78c0c4581770f189c31f34220afa3da514ee2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6f747a56836825f25805490d6f83050c1b9dd86ad983231719791a05206cb069686ede379cca34e7f6acd6a0b8723e5c176a1b0715c3b0ace57b41e6a5abd29
|
7
|
+
data.tar.gz: ea9aba347455c16c27a74d174046b1899253b856457b87026b9353dda13d63ee4b78cb4b9b8852df184fa29a650fcb6bc2edbcc045889e410c5598db08033e5a
|
data/lib/bob/api/employees.rb
CHANGED
@@ -20,6 +20,11 @@ module Bob
|
|
20
20
|
EmployeeParser.new(response).managers
|
21
21
|
end
|
22
22
|
|
23
|
+
def self.starts_on(date = Date.current.to_s, params = { includeHumanReadable: true })
|
24
|
+
response = get('people', params)
|
25
|
+
EmployeeParser.new(response).starters_on(date)
|
26
|
+
end
|
27
|
+
|
23
28
|
def self.find(employee_id_or_email, params: { includeHumanReadable: true })
|
24
29
|
response = get("people/#{employee_id_or_email}", params)
|
25
30
|
EmployeeParser.new(response).employee
|
data/lib/bob/models/employee.rb
CHANGED
@@ -34,6 +34,10 @@ module Models
|
|
34
34
|
address.site_city || address.city
|
35
35
|
end
|
36
36
|
|
37
|
+
def country
|
38
|
+
address.country || address.site_country
|
39
|
+
end
|
40
|
+
|
37
41
|
def role_level
|
38
42
|
human_readable.work.custom_columns.column_1629151373898
|
39
43
|
end
|
@@ -77,5 +81,9 @@ module Models
|
|
77
81
|
def personal_email
|
78
82
|
home.private_email
|
79
83
|
end
|
84
|
+
|
85
|
+
def linkedin_profile
|
86
|
+
human_readable.about.social_data&.linkedin
|
87
|
+
end
|
80
88
|
end
|
81
89
|
end
|
@@ -14,4 +14,10 @@ class EmployeeParser < BaseParser
|
|
14
14
|
.select { |employee| employee['work']['isManager'] }
|
15
15
|
.map { |attributes| Models::Employee.new(attributes) }
|
16
16
|
end
|
17
|
+
|
18
|
+
def starters_on(date)
|
19
|
+
json_response['employees']
|
20
|
+
.select { |employee| employee['work']['startDate'] == date }
|
21
|
+
.map { |attributes| Models::Employee.new(attributes) }
|
22
|
+
end
|
17
23
|
end
|
data/lib/bob/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bobhr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lien Van Den Steen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
|
-
rubygems_version: 3.
|
129
|
+
rubygems_version: 3.2.31
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Ruby gem for Bob API
|