mindmatch 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mind_match/client.rb +10 -3
- data/lib/mind_match/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e392da27fe12801821e52e5c38e557e009f2422
|
4
|
+
data.tar.gz: 8f969573c319d9754870bd73080dad4d0aa6e036
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1aa6e0ca21d9c99500bdf5c67419aaaa095065473a76a1861d81ecd6e536a3eb0e1f420a7e29df9ec08899eccaf565971d12ad1bf8be9311d8fda193ad7ef5d4
|
7
|
+
data.tar.gz: aeca7c427ac3c0374e52f887714a37b857e4b052a02ddaab260f2854de62cfa0c64a005cd5fbde9f7be1d1172afbfa5d6a1c36c6ad50aaffbb1f06d596c928b6
|
data/lib/mind_match/client.rb
CHANGED
@@ -8,6 +8,9 @@ module MindMatch
|
|
8
8
|
class RequestEntityTooLarge < StandardError; end
|
9
9
|
|
10
10
|
class Client
|
11
|
+
EXP_ENTRY_FIELDS = %w{position description custom_company technologies start_year end_year}.freeze
|
12
|
+
EDU_ENTRY_FIELDS = %{school_name discipline start_year end_year}.freeze
|
13
|
+
|
11
14
|
DEFAULT_ENDPOINT = 'https://api.mindmatch.ai'.freeze
|
12
15
|
PATH = '/graphql'.freeze
|
13
16
|
|
@@ -136,7 +139,7 @@ module MindMatch
|
|
136
139
|
def positionql(position)
|
137
140
|
position = stringify(position)
|
138
141
|
{
|
139
|
-
refId: position['id'],
|
142
|
+
refId: position['id'] || position['refId'],
|
140
143
|
name: position['name'],
|
141
144
|
description: position['description'],
|
142
145
|
technologies: position['technologies'] || []
|
@@ -157,12 +160,16 @@ module MindMatch
|
|
157
160
|
def talentql(tal)
|
158
161
|
tal = stringify(tal)
|
159
162
|
{
|
160
|
-
refId: tal['id'],
|
163
|
+
refId: tal['id'] || tal['refId'],
|
161
164
|
name: tal['name'],
|
165
|
+
location: tal['location'],
|
166
|
+
summary: tal['summary'],
|
162
167
|
email: tal['email'],
|
163
168
|
profileUrls: tal['profileUrls'] || [],
|
164
169
|
resumeUrl: tal['resumeUrl'],
|
165
|
-
skills: tal['skills'] || []
|
170
|
+
skills: tal['skills'] || [],
|
171
|
+
experienceEntries: tal.fetch('experienceEntries', []).map{|e| e.select{|k, _v| EXP_ENTRY_FIELDS.include?(k) } },
|
172
|
+
educationEntries: tal.fetch('educationEntries', []).map{|e| e.select{|k, _v| EDU_ENTRY_FIELDS.include?(k) } }
|
166
173
|
}
|
167
174
|
end
|
168
175
|
|
data/lib/mind_match/version.rb
CHANGED