-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_docs.yaml
619 lines (601 loc) · 17.5 KB
/
api_docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
openapi: 3.0.3
info:
title: Job Search Helper API
version: 1.0.0
description: >-
This is an API based on the OpenAPI 3.0 specification for the tasks of job search assistance. This API was
implemented for a course project with Telegram bot.
_Authors: Tatyana Vakhrusheva, Valeria Khasaeva. HSE SPb 2023_
servers:
- url: https://d5dd8h3anuqsgucmove7.apigw.yandexcloud.net
tags:
- name: vacancies
description: Operations to search for vacancies
- name: materials
description: >-
Operations to retrieve materials for personal development in a
professional domain and preparation for job interview
- name: users
description: Operations on users and users' management
- name: salaries
description: >-
Operations on users and users' management. The data was retrived from Habr
(https://habr.com/ru/specials/748058/) and appeared to be relevant at the
moment of June, 2023.
paths:
/vacancies/vacancy:
get:
tags:
- vacancies
summary: Get an array of 10 vacancies with specified parameters
x-yc-apigateway-integration:
type: http
url: >-
http://api.adzuna.com/v1/api/jobs/{country}/search/1?app_id=b4117560&app_key=f20227e2880e7c7fb2557121a08361f4&results_per_page=10&what={vacancy}&salary_min={salary_min}
timeouts:
connect: 0.5
read: 5
operationId: findVacancies
parameters:
- name: country
in: query
description: ISO-code of a target country
schema:
type: string
example: gb
enum:
- at
- au
- be
- br
- ca
- ch
- de
- es
- fr
- gb
- in
- it
- mx
- nl
- nz
- pl
- sg
- us
- za
required: true
- name: vacancy
in: query
description: title of a desired vacancy or job
schema:
type: string
example: qa
required: true
- name: full_time
in: query
description: whether desired job is full-time
schema:
type: boolean
example: true
required: true
- name: salary_min
description: minimum salary per year in $
in: query
schema:
type: integer
example: 0
required: true
- name: remote
in: query
description: whether desired job is of a remote mode
schema:
type: boolean
example: false
required: true
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/Vacancy'
type: array
description: Vacancy
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
/materials/{vacancy}/{fileId}:
get:
tags:
- materials
summary: Get materials for a specific vacancy
x-yc-apigateway-integration:
type: object_storage
bucket: test-bucket-for-uxers
object: '{vacancy}/{fileId}.pdf'
service_account_id: ajelumsapia4ucukorhv
operationId: getMaterialsByVacancy
parameters:
- description: Vacancy title
explode: false
in: path
name: vacancy
required: true
schema:
type: string
enum:
- python-developer
- data-analyst
- data-scientist
- frontend-developer
- java-developer
- ml-engineer
style: simple
- description: Random id of a book to return
explode: false
in: path
name: fileId
required: true
schema:
type: integer
enum:
- 1
- 2
- 3
style: simple
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: Deleted user
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
/materials/interview:
get:
tags:
- materials
summary: Get advice for an interview preparation
operationId: getAdviceForInterview
x-yc-apigateway-integration:
type: dummy
content:
'*': >-
Before the interview:
Practice more! Try to answer honestly and analyze your answers from
the interviewer's point of view: what would you like the interviewer
to know about you? Which answers seem less appropriate to you and
how would you like to improve them?
Take the time to research the company. You can look at the company's
website, social media, and news articles.
Think about how your talents could be useful in your new role.
Think through your expectations for the new role and prepare
questions for the interviewer.
Set everything up in advance: make sure your Internet connection is
stable, check your camera and microphone, and find a suitable place
where no one will distract you.
Don't be late!
During the interview:
Listen carefully to each question. Don't be afraid to pause to
collect your thoughts before answering.
If you're not sure what you're being asked, don't be afraid to ask
the interviewer for clarification.
Highlight your skills and achievements.
Be honest and sincere.
Don't speak badly about your former boss, the team, or the company
as a whole. Focus on what you have learned from difficult situations
and how you have grown.
After the interview:
Thank the interviewer for their time.
You can ask the interviewer for feedback and/or contacts if you want
to ask additional questions.
Ask your interviewer about next steps.
http_code: 200
http_headers:
Content-Type: text/plain
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: successful response with interview advice
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
/materials/courses/{vacancyTitle}:
get:
tags:
- materials
summary: >-
Get a link to a recommended course for a specific career direction or
vacancy
operationId: getCourseRecommendation
parameters:
- description: Title of a vacancy or career direction
explode: false
in: path
name: vacancyTitle
required: true
schema:
type: string
enum:
- Frontend Developer
- Python Developer
- Java Developer
- C++ Developer
- C# Developer
- Data Scientist
- Data Analyst
- ML Engineer
- Android Developer
- iOS Developer
style: simple
x-yc-apigateway-integration:
type: cloud_functions
function_id: d4eevocjekkuju9ggprk
http_code: 200
http_headers:
Content-Type: text/plain
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Course'
description: successful response with a link to course
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
/users:
get:
tags:
- users
summary: Get an array of all users in DB
x-yc-apigateway-integration:
type: cloud_ydb
action: Scan
database: /ru-central1/b1gmufohhpgspqup9f39/etnuj750mp68d0jsv757
table_name: job_bot_users
operationId: getUsers
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/User'
type: array
description: Users
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
/users/new_user:
post:
tags:
- users
summary: Create a new user
x-yc-apigateway-integration:
type: cloud_ydb
action: PutItem
database: /ru-central1/b1gmufohhpgspqup9f39/etnuj750mp68d0jsv757
table_name: job_bot_users
operationId: createUser
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: User to create
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: Created or updated sser
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
/users/{userId}:
get:
tags:
- users
summary: Get user by id
x-yc-apigateway-integration:
type: cloud_ydb
action: GetItem
database: /ru-central1/b1gmufohhpgspqup9f39/etnuj750mp68d0jsv757
table_name: job_bot_users
key: '{"id": {userId}}'
operationId: getUserById
parameters:
- description: Identifier of user
explode: false
in: path
name: userId
required: true
schema:
type: integer
style: simple
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: User
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
put:
tags:
- users
summary: Update user by id
x-yc-apigateway-integration:
type: cloud_ydb
action: UpdateItem
database: /ru-central1/b1gmufohhpgspqup9f39/etnuj750mp68d0jsv757
table_name: job_bot_users
key: '{"id": {userId}}'
operationId: updateUserById
parameters:
- description: Identifier of user
explode: false
in: path
name: userId
required: true
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: User or attributes to update
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: Updated user
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
delete:
tags:
- users
summary: Delete user by id
x-yc-apigateway-integration:
type: cloud_ydb
action: DeleteItem
database: /ru-central1/b1gmufohhpgspqup9f39/etnuj750mp68d0jsv757
table_name: job_bot_users
key: '{"id": {userId}}'
operationId: deleteUserById
parameters:
- description: Identifier of user
explode: false
in: path
name: userId
required: true
schema:
type: integer
style: simple
responses:
'200':
content:
text/plain:
schema:
type: string
example: User {userId} was deleted
description: Successful delete-operation
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
/salaries/cities:
get:
tags:
- salaries
summary: Get top-10 Russian cities with biggest median salaries in IT-sphere
x-yc-apigateway-integration:
type: cloud_ydb
action: Scan
database: /ru-central1/b1gmufohhpgspqup9f39/etnuj750mp68d0jsv757
table_name: salary_cities
operationId: getSalariesByCities
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/SalaryCity'
type: array
description: Salary
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
/salaries/cities/{city}:
get:
tags:
- salaries
summary: Get salary in the city by its name
x-yc-apigateway-integration:
type: cloud_ydb
action: GetItem
database: /ru-central1/b1gmufohhpgspqup9f39/etnuj750mp68d0jsv757
table_name: salary_cities
key: '{"city": "{city}"}'
operationId: getSalaryInCity
parameters:
- description: Name of city (written in Latin)
explode: false
in: path
name: city
required: true
schema:
type: string
style: simple
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SalaryCity'
description: SalaryCity
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
/salaries/companies:
get:
tags:
- salaries
summary: Get top-10 companies with biggest median salaries in IT-sphere in Russia
x-yc-apigateway-integration:
type: cloud_ydb
action: Scan
database: /ru-central1/b1gmufohhpgspqup9f39/etnuj750mp68d0jsv757
table_name: salary_companies
operationId: getSalariesByCompanies
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/SalaryCompany'
type: array
description: Salary
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: error
components:
schemas:
User:
properties:
location:
type: string
search_stage:
type: string
permanent:
type: string
vacancy:
type: string
id:
type: integer
min_salary:
type: integer
required:
- id
type: object
SalaryCity:
properties:
city:
type: integer
city_id:
type: string
salary:
type: integer
type: object
SalaryCompany:
properties:
company_id:
type: integer
company_name:
type: string
salary:
type: integer
type: object
Course:
properties:
link:
type: string
type: object
Vacancy:
properties:
longitude:
type: integer
salary_min:
type: integer
__CLASS__:
type: string
created:
type: string
company:
type: object
latitude:
type: integer
salary_max:
type: integer
redirect_url:
type: string
category:
type: object
description:
type: string
id:
type: string
location:
type: object
salary_is_predicted:
type: string
adref:
type: string
title:
type: string
required:
- message
type: object
Error:
properties:
message:
type: string
example: 'there is no item with key {"id": 0}'
required:
- message
type: object
x-yc-apigateway:
service_account_id: ajelumsapia4ucukorhv