@sharpapi/sharpapi-node-skills-database 1.0.1 → 1.0.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.
package/README.md
CHANGED
|
@@ -1,351 +1,155 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Skills Database API for Node.js
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 🎯 Access comprehensive skills database — powered by SharpAPI.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
**SharpAPI.com Node.js Skills Database SDK** enables developers to integrate access to a comprehensive database of professional skills into their Node.js applications. This SDK simplifies interaction with the SharpAPI Skills Database service, providing a seamless way to search, validate, and categorize professional skills.
|
|
10
|
-
|
|
11
|
-
See more at [SharpAPI.com Website »](https://sharpapi.com/)
|
|
12
|
-
|
|
13
|
-
[](https://www.npmjs.com/package/@sharpapi/sharpapi-node-skills-database)
|
|
7
|
+
[](https://www.npmjs.com/package/@sharpapi/sharpapi-node-skills-database)
|
|
14
8
|
[](https://github.com/sharpapi/sharpapi-node-client/blob/master/LICENSE.md)
|
|
15
9
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- Node.js >= 16.x
|
|
19
|
-
|
|
20
|
-
## Installation
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm i @sharpapi/sharpapi-node-skills-database
|
|
24
|
-
```
|
|
10
|
+
**SharpAPI Skills Database** provides access to a comprehensive database of professional skills with detailed information. Perfect for HR tech, recruitment platforms, and career development applications.
|
|
25
11
|
|
|
26
12
|
---
|
|
27
13
|
|
|
28
|
-
## Table of Contents
|
|
14
|
+
## 📋 Table of Contents
|
|
29
15
|
|
|
30
|
-
1. [
|
|
31
|
-
2. [
|
|
16
|
+
1. [Requirements](#requirements)
|
|
17
|
+
2. [Installation](#installation)
|
|
32
18
|
3. [Usage](#usage)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
4. [API Documentation](#api-documentation)
|
|
20
|
+
5. [Examples](#examples)
|
|
21
|
+
6. [Use Cases](#use-cases)
|
|
22
|
+
7. [API Endpoint](#api-endpoint)
|
|
23
|
+
8. [Related Packages](#related-packages)
|
|
24
|
+
9. [License](#license)
|
|
38
25
|
|
|
39
26
|
---
|
|
40
27
|
|
|
41
|
-
##
|
|
28
|
+
## Requirements
|
|
42
29
|
|
|
43
|
-
|
|
30
|
+
- Node.js >= 16.x
|
|
31
|
+
- npm or yarn
|
|
44
32
|
|
|
45
|
-
|
|
46
|
-
- **npm** (Node Package Manager)
|
|
33
|
+
---
|
|
47
34
|
|
|
48
|
-
|
|
35
|
+
## Installation
|
|
49
36
|
|
|
50
|
-
|
|
37
|
+
### Step 1. Install the package via npm:
|
|
51
38
|
|
|
52
39
|
```bash
|
|
53
40
|
npm install @sharpapi/sharpapi-node-skills-database
|
|
54
41
|
```
|
|
55
42
|
|
|
56
|
-
###
|
|
43
|
+
### Step 2. Get your API key
|
|
57
44
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
yarn add @sharpapi/sharpapi-node-skills-database
|
|
62
|
-
```
|
|
45
|
+
Visit [SharpAPI.com](https://sharpapi.com/) to get your API key.
|
|
63
46
|
|
|
64
47
|
---
|
|
65
48
|
|
|
66
|
-
##
|
|
67
|
-
|
|
68
|
-
### Setting Up Environment Variables
|
|
69
|
-
|
|
70
|
-
To protect your credentials, it's recommended to use a `.env` file to store your SharpAPI API key. Follow these steps:
|
|
71
|
-
|
|
72
|
-
1. **Create a `.env` File**
|
|
73
|
-
|
|
74
|
-
In the root directory of your project, create a file named `.env`:
|
|
75
|
-
|
|
76
|
-
```plaintext
|
|
77
|
-
SHARP_API_KEY=your_actual_api_key_here
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
2. **Install `dotenv` Package**
|
|
81
|
-
|
|
82
|
-
To load environment variables from the `.env` file, install the `dotenv` package:
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
npm install dotenv
|
|
86
|
-
```
|
|
49
|
+
## Usage
|
|
87
50
|
|
|
88
|
-
|
|
51
|
+
```javascript
|
|
52
|
+
const { SharpApiSkillsDatabaseService } = require('@sharpapi/sharpapi-node-skills-database');
|
|
89
53
|
|
|
90
|
-
|
|
54
|
+
const apiKey = process.env.SHARP_API_KEY; // Store your API key in environment variables
|
|
55
|
+
const service = new SharpApiSkillsDatabaseService(apiKey);
|
|
91
56
|
|
|
92
|
-
|
|
93
|
-
require('dotenv').config();
|
|
94
|
-
```
|
|
57
|
+
const text = 'Your content here...';
|
|
95
58
|
|
|
96
|
-
|
|
59
|
+
async function processText() {
|
|
60
|
+
try {
|
|
61
|
+
// Submit processing job
|
|
62
|
+
const statusUrl = await service.processContent(text);
|
|
63
|
+
console.log('Job submitted. Status URL:', statusUrl);
|
|
97
64
|
|
|
98
|
-
|
|
65
|
+
// Fetch results (polls automatically until complete)
|
|
66
|
+
const result = await service.fetchResults(statusUrl);
|
|
67
|
+
console.log('Result:', result.getResultJson());
|
|
68
|
+
} catch (error) {
|
|
69
|
+
console.error('Error:', error.message);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
99
72
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
.env
|
|
103
|
-
```
|
|
73
|
+
processText();
|
|
74
|
+
```
|
|
104
75
|
|
|
105
76
|
---
|
|
106
77
|
|
|
107
|
-
##
|
|
108
|
-
|
|
109
|
-
### Initialization
|
|
78
|
+
## API Documentation
|
|
110
79
|
|
|
111
|
-
|
|
80
|
+
### Methods
|
|
112
81
|
|
|
113
|
-
|
|
114
|
-
// Load environment variables
|
|
115
|
-
require('dotenv').config();
|
|
82
|
+
This utility provides synchronous data access. Refer to the [Postman Documentation](https://documenter.getpostman.com/view/31106842/2s9Ye8faUp) for query parameters and response format.
|
|
116
83
|
|
|
117
|
-
|
|
118
|
-
const { SharpApiSkillsDatabaseService } = require('@sharpapi/sharpapi-node-skills-database');
|
|
84
|
+
### Response Format
|
|
119
85
|
|
|
120
|
-
|
|
121
|
-
const apiKey = process.env.SHARP_API_KEY;
|
|
122
|
-
const skillsService = new SharpApiSkillsDatabaseService(apiKey);
|
|
123
|
-
```
|
|
86
|
+
Returns JSON data immediately (synchronous operation).
|
|
124
87
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
The `SharpApiSkillsDatabaseService` class provides various methods to interact with the Skills Database API:
|
|
128
|
-
|
|
129
|
-
#### getSkillById(skillId)
|
|
130
|
-
|
|
131
|
-
- **Description:** Get information about a specific skill by ID.
|
|
132
|
-
- **Parameters:**
|
|
133
|
-
- `skillId` (string): The ID of the skill.
|
|
134
|
-
- **Returns:** A Promise that resolves to the skill information.
|
|
135
|
-
- **Usage:**
|
|
136
|
-
```javascript
|
|
137
|
-
const skillInfo = await skillsService.getSkillById('skill123');
|
|
138
|
-
console.log(skillInfo);
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
#### searchSkills(query, options)
|
|
142
|
-
|
|
143
|
-
- **Description:** Search for skills by name or keyword.
|
|
144
|
-
- **Parameters:**
|
|
145
|
-
- `query` (string): The search query.
|
|
146
|
-
- `options` (object, optional): Additional options for search.
|
|
147
|
-
- `limit` (number, optional): Maximum number of results to return (default: 20).
|
|
148
|
-
- `offset` (number, optional): Number of results to skip (default: 0).
|
|
149
|
-
- `category` (string, optional): Filter by skill category.
|
|
150
|
-
- `type` (string, optional): Filter by skill type.
|
|
151
|
-
- **Returns:** A Promise that resolves to the search results.
|
|
152
|
-
- **Usage:**
|
|
153
|
-
```javascript
|
|
154
|
-
const searchResults = await skillsService.searchSkills('javascript', {
|
|
155
|
-
limit: 10,
|
|
156
|
-
category: 'programming'
|
|
157
|
-
});
|
|
158
|
-
console.log(searchResults);
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
#### getSkillCategories()
|
|
162
|
-
|
|
163
|
-
- **Description:** Get all skill categories.
|
|
164
|
-
- **Returns:** A Promise that resolves to a list of skill categories.
|
|
165
|
-
- **Usage:**
|
|
166
|
-
```javascript
|
|
167
|
-
const categories = await skillsService.getSkillCategories();
|
|
168
|
-
console.log(categories);
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
#### getSkillTypes()
|
|
172
|
-
|
|
173
|
-
- **Description:** Get all skill types.
|
|
174
|
-
- **Returns:** A Promise that resolves to a list of skill types.
|
|
175
|
-
- **Usage:**
|
|
176
|
-
```javascript
|
|
177
|
-
const types = await skillsService.getSkillTypes();
|
|
178
|
-
console.log(types);
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
#### getRelatedSkills(skillId, options)
|
|
182
|
-
|
|
183
|
-
- **Description:** Get related skills for a specific skill.
|
|
184
|
-
- **Parameters:**
|
|
185
|
-
- `skillId` (string): The ID of the skill.
|
|
186
|
-
- `options` (object, optional): Additional options.
|
|
187
|
-
- `limit` (number, optional): Maximum number of related skills to return (default: 10).
|
|
188
|
-
- **Returns:** A Promise that resolves to related skills.
|
|
189
|
-
- **Usage:**
|
|
190
|
-
```javascript
|
|
191
|
-
const relatedSkills = await skillsService.getRelatedSkills('skill123', {
|
|
192
|
-
limit: 5
|
|
193
|
-
});
|
|
194
|
-
console.log(relatedSkills);
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
#### getSkillsByCategory(categoryId, options)
|
|
198
|
-
|
|
199
|
-
- **Description:** Get skills by category.
|
|
200
|
-
- **Parameters:**
|
|
201
|
-
- `categoryId` (string): The ID of the category.
|
|
202
|
-
- `options` (object, optional): Additional options.
|
|
203
|
-
- `limit` (number, optional): Maximum number of skills to return (default: 20).
|
|
204
|
-
- `offset` (number, optional): Number of skills to skip (default: 0).
|
|
205
|
-
- **Returns:** A Promise that resolves to skills in the category.
|
|
206
|
-
- **Usage:**
|
|
207
|
-
```javascript
|
|
208
|
-
const skillsInCategory = await skillsService.getSkillsByCategory('category123', {
|
|
209
|
-
limit: 15,
|
|
210
|
-
offset: 10
|
|
211
|
-
});
|
|
212
|
-
console.log(skillsInCategory);
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
#### getSkillsByType(typeId, options)
|
|
216
|
-
|
|
217
|
-
- **Description:** Get skills by type.
|
|
218
|
-
- **Parameters:**
|
|
219
|
-
- `typeId` (string): The ID of the type.
|
|
220
|
-
- `options` (object, optional): Additional options.
|
|
221
|
-
- `limit` (number, optional): Maximum number of skills to return (default: 20).
|
|
222
|
-
- `offset` (number, optional): Number of skills to skip (default: 0).
|
|
223
|
-
- **Returns:** A Promise that resolves to skills of the type.
|
|
224
|
-
- **Usage:**
|
|
225
|
-
```javascript
|
|
226
|
-
const skillsOfType = await skillsService.getSkillsByType('type123', {
|
|
227
|
-
limit: 15,
|
|
228
|
-
offset: 10
|
|
229
|
-
});
|
|
230
|
-
console.log(skillsOfType);
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
#### validateSkill(skillName)
|
|
234
|
-
|
|
235
|
-
- **Description:** Validate if a skill exists in the database.
|
|
236
|
-
- **Parameters:**
|
|
237
|
-
- `skillName` (string): The name of the skill to validate.
|
|
238
|
-
- **Returns:** A Promise that resolves to the validation result.
|
|
239
|
-
- **Usage:**
|
|
240
|
-
```javascript
|
|
241
|
-
const validationResult = await skillsService.validateSkill('JavaScript');
|
|
242
|
-
console.log(validationResult);
|
|
243
|
-
```
|
|
88
|
+
---
|
|
244
89
|
|
|
245
90
|
## Examples
|
|
246
91
|
|
|
247
|
-
###
|
|
92
|
+
### Basic Example
|
|
248
93
|
|
|
249
94
|
```javascript
|
|
250
|
-
require('dotenv').config();
|
|
251
95
|
const { SharpApiSkillsDatabaseService } = require('@sharpapi/sharpapi-node-skills-database');
|
|
252
96
|
|
|
253
|
-
|
|
254
|
-
const apiKey = process.env.SHARP_API_KEY;
|
|
255
|
-
const skillsService = new SharpApiSkillsDatabaseService(apiKey);
|
|
97
|
+
const service = new SharpApiSkillsDatabaseService(process.env.SHARP_API_KEY);
|
|
256
98
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
limit: 10,
|
|
261
|
-
category: 'technical'
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
console.log('Search Results:', searchResults);
|
|
265
|
-
|
|
266
|
-
// Get skill categories
|
|
267
|
-
const categories = await skillsService.getSkillCategories();
|
|
268
|
-
console.log('Skill Categories:', categories);
|
|
269
|
-
} catch (error) {
|
|
270
|
-
console.error('Error:', error.message);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
99
|
+
// Customize polling behavior if needed
|
|
100
|
+
service.setApiJobStatusPollingInterval(10); // Poll every 10 seconds
|
|
101
|
+
service.setApiJobStatusPollingWait(180); // Wait up to 3 minutes
|
|
273
102
|
|
|
274
|
-
|
|
103
|
+
// Use the service
|
|
104
|
+
// ... (implementation depends on specific service)
|
|
275
105
|
```
|
|
276
106
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
```javascript
|
|
280
|
-
require('dotenv').config();
|
|
281
|
-
const { SharpApiSkillsDatabaseService } = require('@sharpapi/sharpapi-node-skills-database');
|
|
282
|
-
|
|
283
|
-
async function validateAndRelatedSkillsExample() {
|
|
284
|
-
const apiKey = process.env.SHARP_API_KEY;
|
|
285
|
-
const skillsService = new SharpApiSkillsDatabaseService(apiKey);
|
|
286
|
-
|
|
287
|
-
try {
|
|
288
|
-
// Validate a skill
|
|
289
|
-
const skillName = 'JavaScript';
|
|
290
|
-
const validationResult = await skillsService.validateSkill(skillName);
|
|
291
|
-
console.log(`Validation Result for ${skillName}:`, validationResult);
|
|
292
|
-
|
|
293
|
-
if (validationResult.valid && validationResult.skill_id) {
|
|
294
|
-
// Get related skills
|
|
295
|
-
const relatedSkills = await skillsService.getRelatedSkills(validationResult.skill_id, {
|
|
296
|
-
limit: 5
|
|
297
|
-
});
|
|
298
|
-
console.log(`Related Skills for ${skillName}:`, relatedSkills);
|
|
299
|
-
}
|
|
300
|
-
} catch (error) {
|
|
301
|
-
console.error('Error:', error.message);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
validateAndRelatedSkillsExample();
|
|
306
|
-
```
|
|
107
|
+
For more examples, visit the [Product Page](https://sharpapi.com/en/catalog/utility/skills-database-api).
|
|
307
108
|
|
|
308
109
|
---
|
|
309
110
|
|
|
310
|
-
##
|
|
111
|
+
## Use Cases
|
|
311
112
|
|
|
312
|
-
|
|
113
|
+
- **Skills Assessment**: Enable standardized skills testing and evaluation
|
|
114
|
+
- **Resume Building**: Help candidates select relevant skills
|
|
115
|
+
- **Job Matching**: Match candidate skills to job requirements
|
|
116
|
+
- **Training Programs**: Identify skill gaps and training needs
|
|
117
|
+
- **Talent Development**: Track employee skill progression
|
|
118
|
+
- **Recruitment Filters**: Enable precise skills-based candidate filtering
|
|
313
119
|
|
|
314
120
|
---
|
|
315
121
|
|
|
316
|
-
##
|
|
122
|
+
## API Endpoint
|
|
123
|
+
|
|
124
|
+
**GET** `/utilities/skills_list`
|
|
317
125
|
|
|
318
|
-
|
|
126
|
+
For detailed API specifications, refer to:
|
|
127
|
+
- [Postman Documentation](https://documenter.getpostman.com/view/31106842/2s9Ye8faUp)
|
|
128
|
+
- [Product Page](https://sharpapi.com/en/catalog/utility/skills-database-api)
|
|
319
129
|
|
|
320
130
|
---
|
|
321
131
|
|
|
322
|
-
##
|
|
132
|
+
## Related Packages
|
|
323
133
|
|
|
324
|
-
|
|
134
|
+
- [@sharpapi/sharpapi-node-related-skills](https://www.npmjs.com/package/@sharpapi/sharpapi-node-related-skills)
|
|
135
|
+
- [@sharpapi/sharpapi-node-job-positions-database](https://www.npmjs.com/package/@sharpapi/sharpapi-node-job-positions-database)
|
|
136
|
+
- [@sharpapi/sharpapi-node-parse-resume](https://www.npmjs.com/package/@sharpapi/sharpapi-node-parse-resume)
|
|
137
|
+
- [@sharpapi/sharpapi-node-client](https://www.npmjs.com/package/@sharpapi/sharpapi-node-client) - Full SharpAPI SDK
|
|
325
138
|
|
|
326
139
|
---
|
|
327
140
|
|
|
328
141
|
## License
|
|
329
142
|
|
|
330
|
-
This project is licensed under the
|
|
143
|
+
This project is licensed under the MIT License. See the [LICENSE.md](LICENSE.md) file for details.
|
|
331
144
|
|
|
332
145
|
---
|
|
333
146
|
|
|
334
147
|
## Support
|
|
335
148
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
## Social Media
|
|
341
|
-
|
|
342
|
-
🚀 For the latest news, tutorials, and case studies, don't forget to follow us on:
|
|
343
|
-
- [SharpAPI X (formerly Twitter)](https://x.com/SharpAPI)
|
|
344
|
-
- [SharpAPI YouTube](https://www.youtube.com/@SharpAPI)
|
|
345
|
-
- [SharpAPI Vimeo](https://vimeo.com/SharpAPI)
|
|
346
|
-
- [SharpAPI LinkedIn](https://www.linkedin.com/products/a2z-web-ltd-sharpapicom-automate-with-aipowered-api/)
|
|
347
|
-
- [SharpAPI Facebook](https://www.facebook.com/profile.php?id=61554115896974)
|
|
149
|
+
- **Documentation**: [SharpAPI.com Documentation](https://sharpapi.com/documentation)
|
|
150
|
+
- **Issues**: [GitHub Issues](https://github.com/sharpapi/sharpapi-node-client/issues)
|
|
151
|
+
- **Email**: contact@sharpapi.com
|
|
348
152
|
|
|
349
153
|
---
|
|
350
154
|
|
|
351
|
-
**
|
|
155
|
+
**Powered by [SharpAPI](https://sharpapi.com/) - AI-Powered API Workflow Automation**
|
package/package.json
CHANGED
package/src/CLAUDE.md
ADDED
|
@@ -2,6 +2,9 @@ const { SharpApiCoreService } = require('@sharpapi/sharpapi-node-core');
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Service for accessing Skills Database API using SharpAPI.com
|
|
5
|
+
*
|
|
6
|
+
* Provides access to a comprehensive database of professional skills with detailed information.
|
|
7
|
+
* All endpoints are synchronous and return immediate responses.
|
|
5
8
|
*/
|
|
6
9
|
class SharpApiSkillsDatabaseService extends SharpApiCoreService {
|
|
7
10
|
/**
|
|
@@ -10,131 +13,44 @@ class SharpApiSkillsDatabaseService extends SharpApiCoreService {
|
|
|
10
13
|
* @param {string} [apiBaseUrl='https://sharpapi.com/api/v1'] - API base URL
|
|
11
14
|
*/
|
|
12
15
|
constructor(apiKey, apiBaseUrl = 'https://sharpapi.com/api/v1') {
|
|
13
|
-
super(apiKey, apiBaseUrl, '@sharpapi/sharpapi-node-skills-database/1.0.
|
|
16
|
+
super(apiKey, apiBaseUrl, '@sharpapi/sharpapi-node-skills-database/1.0.2');
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
/**
|
|
17
|
-
* Get list of all available skills
|
|
20
|
+
* Get list of all available skills (synchronous endpoint)
|
|
18
21
|
*
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
async getSkillsList() {
|
|
22
|
-
const response = await this.makeRequest('GET', '/utilities/skills_list');
|
|
23
|
-
return response.data;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Get detailed information about a specific skill by UUID
|
|
28
|
-
*
|
|
29
|
-
* @param {string} uuid - The UUID of the skill
|
|
30
|
-
* @returns {Promise<object>} - Skill information
|
|
31
|
-
*/
|
|
32
|
-
async getSkillDetails(uuid) {
|
|
33
|
-
const response = await this.makeRequest('GET', `/utilities/skills_details/${uuid}`);
|
|
34
|
-
return response.data;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Get information about a specific skill by ID (alias for getSkillDetails)
|
|
22
|
+
* Retrieves a paginated list of skills with optional filtering.
|
|
39
23
|
*
|
|
40
|
-
* @param {
|
|
41
|
-
* @
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Search for skills by name or keyword
|
|
24
|
+
* @param {object} [options={}] - Query options
|
|
25
|
+
* @param {number} [options.per_page] - Items per page (default 10, min 0, max 100)
|
|
26
|
+
* @param {boolean} [options.include_related] - Include related skills with their weights
|
|
27
|
+
* @param {string} [options.name] - Filter by skill name
|
|
28
|
+
* @returns {Promise<object>} - Paginated list of skills with data, links, and meta
|
|
49
29
|
*
|
|
50
|
-
* @
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* @param {string} [options.category] - Filter by skill category
|
|
55
|
-
* @param {string} [options.type] - Filter by skill type
|
|
56
|
-
* @returns {Promise<object>} - Search results
|
|
30
|
+
* @example
|
|
31
|
+
* const skills = await service.getSkillsList({ per_page: 50, name: 'JavaScript' });
|
|
32
|
+
* console.log('Total skills:', skills.meta.total);
|
|
33
|
+
* skills.data.forEach(skill => console.log(skill.name));
|
|
57
34
|
*/
|
|
58
|
-
async
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
return response.data;
|
|
35
|
+
async getSkillsList(options = {}) {
|
|
36
|
+
const response = await this.makeRequest('GET', '/utilities/skills_list', options);
|
|
37
|
+
return response;
|
|
62
38
|
}
|
|
63
39
|
|
|
64
40
|
/**
|
|
65
|
-
* Get
|
|
41
|
+
* Get detailed information about a specific skill by UUID (synchronous endpoint)
|
|
66
42
|
*
|
|
67
|
-
* @
|
|
68
|
-
|
|
69
|
-
async getSkillCategories() {
|
|
70
|
-
const response = await this.makeRequest('GET', '/utility/skills/categories');
|
|
71
|
-
return response.data;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Get all skill types
|
|
76
|
-
*
|
|
77
|
-
* @returns {Promise<object>} - List of skill types
|
|
78
|
-
*/
|
|
79
|
-
async getSkillTypes() {
|
|
80
|
-
const response = await this.makeRequest('GET', '/utility/skills/types');
|
|
81
|
-
return response.data;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Get related skills for a specific skill
|
|
86
|
-
*
|
|
87
|
-
* @param {string} skillId - The ID of the skill
|
|
88
|
-
* @param {object} [options] - Additional options
|
|
89
|
-
* @param {number} [options.limit=10] - Maximum number of related skills to return
|
|
90
|
-
* @returns {Promise<object>} - Related skills
|
|
91
|
-
*/
|
|
92
|
-
async getRelatedSkills(skillId, options = {}) {
|
|
93
|
-
const data = { ...options };
|
|
94
|
-
const response = await this.makeRequest('GET', `/utility/skills/${skillId}/related`, data);
|
|
95
|
-
return response.data;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Get skills by category
|
|
100
|
-
*
|
|
101
|
-
* @param {string} categoryId - The ID of the category
|
|
102
|
-
* @param {object} [options] - Additional options
|
|
103
|
-
* @param {number} [options.limit=20] - Maximum number of skills to return
|
|
104
|
-
* @param {number} [options.offset=0] - Number of skills to skip
|
|
105
|
-
* @returns {Promise<object>} - Skills in the category
|
|
106
|
-
*/
|
|
107
|
-
async getSkillsByCategory(categoryId, options = {}) {
|
|
108
|
-
const data = { ...options };
|
|
109
|
-
const response = await this.makeRequest('GET', `/utility/skills/category/${categoryId}`, data);
|
|
110
|
-
return response.data;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Get skills by type
|
|
115
|
-
*
|
|
116
|
-
* @param {string} typeId - The ID of the type
|
|
117
|
-
* @param {object} [options] - Additional options
|
|
118
|
-
* @param {number} [options.limit=20] - Maximum number of skills to return
|
|
119
|
-
* @param {number} [options.offset=0] - Number of skills to skip
|
|
120
|
-
* @returns {Promise<object>} - Skills of the type
|
|
121
|
-
*/
|
|
122
|
-
async getSkillsByType(typeId, options = {}) {
|
|
123
|
-
const data = { ...options };
|
|
124
|
-
const response = await this.makeRequest('GET', `/utility/skills/type/${typeId}`, data);
|
|
125
|
-
return response.data;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Validate if a skill exists in the database
|
|
43
|
+
* @param {string} uuid - The UUID of the skill
|
|
44
|
+
* @returns {Promise<object>} - Detailed skill information including name, description, related skills, etc.
|
|
130
45
|
*
|
|
131
|
-
* @
|
|
132
|
-
*
|
|
46
|
+
* @example
|
|
47
|
+
* const skill = await service.getSkillDetails('1ef266de-5a6c-67d6-86a1-06bb2780ed98');
|
|
48
|
+
* console.log('Skill:', skill.name);
|
|
49
|
+
* console.log('Description:', skill.description);
|
|
133
50
|
*/
|
|
134
|
-
async
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
return response.data;
|
|
51
|
+
async getSkillDetails(uuid) {
|
|
52
|
+
const response = await this.makeRequest('GET', `/utilities/skills_details/${uuid}`);
|
|
53
|
+
return response;
|
|
138
54
|
}
|
|
139
55
|
}
|
|
140
56
|
|