mindmatch 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ac9c33dde9438d311e3424b5bab3425b084fecf
4
- data.tar.gz: c6e807138f6803d23a189da87ae84a9288c5b50d
3
+ metadata.gz: 0e392da27fe12801821e52e5c38e557e009f2422
4
+ data.tar.gz: 8f969573c319d9754870bd73080dad4d0aa6e036
5
5
  SHA512:
6
- metadata.gz: 1a2e149567da672108f8f43f4b6f47ea60c0521ce6ea000aff067660aa24eef12e2a349ae9d0a005d98c283355b64c4d671a091e56be00a550776bb1bdf941a8
7
- data.tar.gz: cc931f4409ae91b665d74029dfb6e75d730e12e4cceb2011f00914e851603425e8d7881c34d0dc9bc9bf0d64e8a8de22c6344e3cc39f0f9a667aa32df65d693f
6
+ metadata.gz: 1aa6e0ca21d9c99500bdf5c67419aaaa095065473a76a1861d81ecd6e536a3eb0e1f420a7e29df9ec08899eccaf565971d12ad1bf8be9311d8fda193ad7ef5d4
7
+ data.tar.gz: aeca7c427ac3c0374e52f887714a37b857e4b052a02ddaab260f2854de62cfa0c64a005cd5fbde9f7be1d1172afbfa5d6a1c36c6ad50aaffbb1f06d596c928b6
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module MindMatch
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mindmatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - MindMatch