1 | |
2 | |
3 | * Submit your application! |
4 | * This endpoint will let you apply to a job at ReadMe programatically, without having to go through our UI! |
5 | */ |
6 | export async function main(auth: RT.Readme, body: Body) { |
7 | const url = new URL(`https://api.readme.com/v2/apply`) |
8 |
|
9 | const response = await fetch(url, { |
10 | method: 'POST', |
11 | headers: { |
12 | 'Content-Type': 'application/json', |
13 | Authorization: 'Bearer ' + auth.apiKey |
14 | }, |
15 | body: JSON.stringify(body) |
16 | }) |
17 | if (!response.ok) { |
18 | const text = await response.text() |
19 | throw new Error(`${response.status} ${text}`) |
20 | } |
21 | return await response.json() |
22 | } |
23 |
|
24 | |
25 | |
26 | * This file was automatically generated by json-schema-to-typescript. |
27 | * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, |
28 | * and run json-schema-to-typescript to regenerate this file. |
29 | */ |
30 |
|
31 | export interface Body { |
32 | |
33 | * Your full name |
34 | */ |
35 | name: string |
36 | |
37 | * A valid email we can reach you at. |
38 | */ |
39 | email?: string |
40 | |
41 | * The job you're looking to apply for (https://readme.com/careers). |
42 | */ |
43 | job: string |
44 | |
45 | * Learn more at https://lgbtlifecenter.org/pronouns/ |
46 | */ |
47 | pronouns?: string |
48 | |
49 | * What have you been up to the past few years? |
50 | */ |
51 | linkedin?: string |
52 | |
53 | * Or Bitbucket, GitLab or anywhere else your code is hosted! |
54 | */ |
55 | github?: string |
56 | |
57 | * What should we know about you? |
58 | */ |
59 | coverLetter?: string |
60 | |
61 | * If you set this to true, we will not actually apply you to the job. |
62 | */ |
63 | dont_really_apply?: boolean |
64 | } |
65 |
|