wolf_core 1.0.84 → 1.0.85
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4bf1687b51adb4d505140463475ebd50b00c54c5e809fbf4bb3981866847a265
|
|
4
|
+
data.tar.gz: 35b32d6b4ade624eb07ced2b86db567fea77bdb502ebc110822f1874c9c49da5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94841588033bbb2962822c4c7b11c0c5fb10930b30bd3947d208bba73f283d63e0be4a46a4d6b8d6aa5fae70b551670b92c5d2c9faa259cfea6b15f30e473210
|
|
7
|
+
data.tar.gz: 778338dabcdfa8447f5f2ac1d4f1af45d0c264d5755adad61a8c7cb679c7c555da014fb1ea03c9fa811450c487c2df2c5883119fd5f1bbdac3cab652d830642b
|
|
@@ -12,7 +12,8 @@ module WolfCore
|
|
|
12
12
|
wolf_platform_url: wolf_platform_url,
|
|
13
13
|
query: query
|
|
14
14
|
)
|
|
15
|
-
|
|
15
|
+
error_data ||= {}
|
|
16
|
+
validate_http_response(response: response, message: error_message, error_data: error_data.merge(query: query))
|
|
16
17
|
response.body.dig("data", "table", "custom_responses")
|
|
17
18
|
end
|
|
18
19
|
|
|
@@ -34,7 +35,8 @@ module WolfCore
|
|
|
34
35
|
wolf_platform_url: wolf_platform_url,
|
|
35
36
|
query: query
|
|
36
37
|
)
|
|
37
|
-
|
|
38
|
+
error_data ||= {}
|
|
39
|
+
validate_http_response(response: response, message: error_message, error_data: error_data.merge(custom_value_id: custom_value_id))
|
|
38
40
|
response.body.dig("data", "table", "custom_responses")
|
|
39
41
|
end
|
|
40
42
|
|
|
@@ -57,7 +59,8 @@ module WolfCore
|
|
|
57
59
|
custom_requirement_id: custom_requirement_id,
|
|
58
60
|
query: query
|
|
59
61
|
)
|
|
60
|
-
|
|
62
|
+
error_data ||= {}
|
|
63
|
+
validate_http_response(response: response, message: error_message, error_data: error_data.merge(custom_value: custom_value))
|
|
61
64
|
response
|
|
62
65
|
end
|
|
63
66
|
|
|
@@ -82,7 +85,8 @@ module WolfCore
|
|
|
82
85
|
custom_value_id: custom_value_id,
|
|
83
86
|
query: query
|
|
84
87
|
)
|
|
85
|
-
|
|
88
|
+
error_data ||= {}
|
|
89
|
+
validate_http_response(response: response, message: error_message, error_data: error_data.merge(custom_value_id: custom_value_id, custom_value: custom_value))
|
|
86
90
|
response
|
|
87
91
|
end
|
|
88
92
|
|
|
@@ -104,7 +108,8 @@ module WolfCore
|
|
|
104
108
|
wolf_platform_url: wolf_platform_url,
|
|
105
109
|
query: query
|
|
106
110
|
)
|
|
107
|
-
|
|
111
|
+
error_data ||= {}
|
|
112
|
+
validate_http_response(response: response, message: error_message, error_data: error_data.merge(query: query))
|
|
108
113
|
custom_values = response.body.dig("data", "table", "custom_responses")
|
|
109
114
|
|
|
110
115
|
response = if custom_values&.any?
|
|
@@ -3,33 +3,69 @@ module WolfCore
|
|
|
3
3
|
module JobseekerApiOperations
|
|
4
4
|
include WolfCore::HttpOperations
|
|
5
5
|
|
|
6
|
-
def
|
|
7
|
-
|
|
6
|
+
def fetch_jobseeker_by_user_id!(wolf_token:, tenant:, wolf_platform_url:, user_id:)
|
|
7
|
+
jobseekers = fetch_jobseekers!(
|
|
8
|
+
wolf_token: wolf_token,
|
|
9
|
+
tenant: tenant,
|
|
10
|
+
wolf_platform_url: wolf_platform_url,
|
|
11
|
+
query: { user_id: user_id }
|
|
12
|
+
)
|
|
13
|
+
jobseekers.first
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def fetch_jobseekers!(wolf_token:, tenant:, wolf_platform_url:, error_message:, query: nil, error_data: nil)
|
|
17
|
+
response = fetch_jobseekers(
|
|
18
|
+
wolf_token: wolf_token,
|
|
19
|
+
tenant: tenant,
|
|
20
|
+
wolf_platform_url: wolf_platform_url,
|
|
21
|
+
query: query
|
|
22
|
+
)
|
|
23
|
+
error_data ||= {}
|
|
24
|
+
validate_http_response(response: response, message: error_message, error_data: error_data.merge(query: query))
|
|
25
|
+
response.body.dig("data", "table", "jobseeker")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def fetch_jobseekers(wolf_token:, tenant:, wolf_platform_url:, query: nil)
|
|
29
|
+
query ||= {}
|
|
30
|
+
parsed_http_get(
|
|
8
31
|
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
|
9
|
-
url: "#{wolf_platform_url}/api/v2/jobseekers
|
|
10
|
-
query:
|
|
11
|
-
error_message: error_message
|
|
32
|
+
url: "#{wolf_platform_url}/api/v2/jobseekers",
|
|
33
|
+
query: query.merge(tenant: tenant)
|
|
12
34
|
)
|
|
13
|
-
response_body = response.body
|
|
14
|
-
response_body.dig("data", "table", "jobseeker")
|
|
15
35
|
end
|
|
16
36
|
|
|
17
|
-
def fetch_jobseeker(wolf_token:, jobseeker_id:, tenant:, wolf_platform_url:)
|
|
37
|
+
def fetch_jobseeker!(wolf_token:, jobseeker_id:, tenant:, wolf_platform_url:, error_message:, query: nil, error_data: nil)
|
|
38
|
+
response = fetch_jobseeker(
|
|
39
|
+
wolf_token: wolf_token,
|
|
40
|
+
jobseeker_id: jobseeker_id,
|
|
41
|
+
tenant: tenant,
|
|
42
|
+
wolf_platform_url: wolf_platform_url,
|
|
43
|
+
query: query
|
|
44
|
+
)
|
|
45
|
+
error_data ||= {}
|
|
46
|
+
validate_http_response(response: response, message: error_message, error_data: error_data.merge(jobseeker_id: jobseeker_id, query: query))
|
|
47
|
+
response.body.dig("data", "table", "jobseeker")
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def fetch_jobseeker(wolf_token:, jobseeker_id:, tenant:, wolf_platform_url:, query: nil)
|
|
51
|
+
query ||= {}
|
|
18
52
|
parsed_http_get(
|
|
19
53
|
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
|
20
54
|
url: "#{wolf_platform_url}/api/v2/jobseekers/#{jobseeker_id}",
|
|
21
|
-
query:
|
|
55
|
+
query: query.merge(tenant: tenant)
|
|
22
56
|
)
|
|
23
57
|
end
|
|
24
58
|
|
|
25
|
-
def create_jobseeker!(wolf_token:, jobseeker:, tenant:, wolf_platform_url:, error_message:)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
error_message: error_message
|
|
59
|
+
def create_jobseeker!(wolf_token:, jobseeker:, tenant:, wolf_platform_url:, error_message:, error_data: nil)
|
|
60
|
+
response = create_jobseeker(
|
|
61
|
+
wolf_token: wolf_token,
|
|
62
|
+
jobseeker: jobseeker,
|
|
63
|
+
tenant: tenant,
|
|
64
|
+
wolf_platform_url: wolf_platform_url
|
|
32
65
|
)
|
|
66
|
+
error_data ||= {}
|
|
67
|
+
validate_http_response(response: response, message: error_message, error_data: error_data.merge(jobseeker: jobseeker))
|
|
68
|
+
response
|
|
33
69
|
end
|
|
34
70
|
|
|
35
71
|
def create_jobseeker(wolf_token:, jobseeker:, tenant:, wolf_platform_url:)
|
|
@@ -41,14 +77,17 @@ module WolfCore
|
|
|
41
77
|
)
|
|
42
78
|
end
|
|
43
79
|
|
|
44
|
-
def update_jobseeker!(wolf_token:, jobseeker:, tenant:, wolf_platform_url:, error_message:, jobseeker_id:)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
80
|
+
def update_jobseeker!(wolf_token:, jobseeker:, tenant:, wolf_platform_url:, error_message:, jobseeker_id:, error_data: nil)
|
|
81
|
+
response = update_jobseeker(
|
|
82
|
+
wolf_token: wolf_token,
|
|
83
|
+
jobseeker: jobseeker,
|
|
84
|
+
tenant: tenant,
|
|
85
|
+
wolf_platform_url: wolf_platform_url,
|
|
86
|
+
jobseeker_id: jobseeker_id
|
|
51
87
|
)
|
|
88
|
+
error_data ||= {}
|
|
89
|
+
validate_http_response(response: response, message: error_message, error_data: error_data.merge(jobseeker_id: jobseeker_id, jobseeker: jobseeker))
|
|
90
|
+
response
|
|
52
91
|
end
|
|
53
92
|
|
|
54
93
|
def update_jobseeker(wolf_token:, jobseeker:, tenant:, wolf_platform_url:, jobseeker_id:)
|
data/lib/wolf_core/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wolf_core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.85
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Javier Roncallo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-02-
|
|
11
|
+
date: 2025-02-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|