@dytsou/github-readme-stats 1.0.2 → 1.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.
- package/API.md +525 -0
- package/LICENSE +12 -13
- package/openapi.yaml +923 -0
- package/package.json +9 -7
- package/readme.md +13 -1
package/openapi.yaml
ADDED
|
@@ -0,0 +1,923 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: GitHub Readme Stats API
|
|
4
|
+
description: |
|
|
5
|
+
Dynamically generated GitHub stats cards for your README.
|
|
6
|
+
|
|
7
|
+
This API provides endpoints to generate SVG cards displaying GitHub statistics,
|
|
8
|
+
top languages, repository information, Gists, and WakaTime statistics.
|
|
9
|
+
|
|
10
|
+
All card endpoints return SVG images that can be embedded in README files.
|
|
11
|
+
version: 1.0.2
|
|
12
|
+
contact:
|
|
13
|
+
name: GitHub Readme Stats
|
|
14
|
+
url: https://github.com/dytsou/github-readme-stats
|
|
15
|
+
license:
|
|
16
|
+
name: MIT
|
|
17
|
+
url: https://github.com/dytsou/github-readme-stats/blob/main/LICENSE
|
|
18
|
+
|
|
19
|
+
servers:
|
|
20
|
+
- url: https://your-instance.workers.dev
|
|
21
|
+
description: Cloudflare Workers instance
|
|
22
|
+
- url: https://your-instance.vercel.app
|
|
23
|
+
description: Vercel instance
|
|
24
|
+
|
|
25
|
+
tags:
|
|
26
|
+
- name: Cards
|
|
27
|
+
description: SVG card generation endpoints
|
|
28
|
+
- name: Status
|
|
29
|
+
description: Service status and health check endpoints
|
|
30
|
+
|
|
31
|
+
paths:
|
|
32
|
+
/api:
|
|
33
|
+
get:
|
|
34
|
+
tags:
|
|
35
|
+
- Cards
|
|
36
|
+
summary: Generate GitHub Stats Card
|
|
37
|
+
description: |
|
|
38
|
+
Generate a GitHub statistics card showing stars, commits, pull requests, and more.
|
|
39
|
+
Returns an SVG image that can be embedded in README files.
|
|
40
|
+
operationId: getStatsCard
|
|
41
|
+
parameters:
|
|
42
|
+
- name: username
|
|
43
|
+
in: query
|
|
44
|
+
required: true
|
|
45
|
+
description: GitHub username
|
|
46
|
+
schema:
|
|
47
|
+
type: string
|
|
48
|
+
example: NAME
|
|
49
|
+
- $ref: "#/components/parameters/Theme"
|
|
50
|
+
- $ref: "#/components/parameters/BgColor"
|
|
51
|
+
- $ref: "#/components/parameters/TitleColor"
|
|
52
|
+
- $ref: "#/components/parameters/TextColor"
|
|
53
|
+
- $ref: "#/components/parameters/BorderColor"
|
|
54
|
+
- $ref: "#/components/parameters/HideBorder"
|
|
55
|
+
- $ref: "#/components/parameters/BorderRadius"
|
|
56
|
+
- $ref: "#/components/parameters/CacheSeconds"
|
|
57
|
+
- $ref: "#/components/parameters/Locale"
|
|
58
|
+
- name: hide
|
|
59
|
+
in: query
|
|
60
|
+
required: false
|
|
61
|
+
description: Comma-separated list of stats to hide
|
|
62
|
+
schema:
|
|
63
|
+
type: string
|
|
64
|
+
enum:
|
|
65
|
+
[
|
|
66
|
+
stars,
|
|
67
|
+
commits,
|
|
68
|
+
prs,
|
|
69
|
+
contribs,
|
|
70
|
+
issues,
|
|
71
|
+
reviews,
|
|
72
|
+
discussions_started,
|
|
73
|
+
discussions_answered,
|
|
74
|
+
]
|
|
75
|
+
example: contribs,prs
|
|
76
|
+
- name: show
|
|
77
|
+
in: query
|
|
78
|
+
required: false
|
|
79
|
+
description: Comma-separated list of additional stats to show
|
|
80
|
+
schema:
|
|
81
|
+
type: string
|
|
82
|
+
enum:
|
|
83
|
+
[
|
|
84
|
+
reviews,
|
|
85
|
+
discussions_started,
|
|
86
|
+
discussions_answered,
|
|
87
|
+
prs_merged,
|
|
88
|
+
prs_merged_percentage,
|
|
89
|
+
]
|
|
90
|
+
example: reviews
|
|
91
|
+
- name: hide_title
|
|
92
|
+
in: query
|
|
93
|
+
required: false
|
|
94
|
+
description: Hide card title
|
|
95
|
+
schema:
|
|
96
|
+
type: boolean
|
|
97
|
+
default: false
|
|
98
|
+
- name: hide_rank
|
|
99
|
+
in: query
|
|
100
|
+
required: false
|
|
101
|
+
description: Hide rank badge
|
|
102
|
+
schema:
|
|
103
|
+
type: boolean
|
|
104
|
+
default: false
|
|
105
|
+
- name: rank_icon
|
|
106
|
+
in: query
|
|
107
|
+
required: false
|
|
108
|
+
description: Rank icon style
|
|
109
|
+
schema:
|
|
110
|
+
type: string
|
|
111
|
+
enum: [default, github, percentile]
|
|
112
|
+
default: default
|
|
113
|
+
- name: show_icons
|
|
114
|
+
in: query
|
|
115
|
+
required: false
|
|
116
|
+
description: Display icons
|
|
117
|
+
schema:
|
|
118
|
+
type: boolean
|
|
119
|
+
default: false
|
|
120
|
+
- name: card_width
|
|
121
|
+
in: query
|
|
122
|
+
required: false
|
|
123
|
+
description: Card width in pixels
|
|
124
|
+
schema:
|
|
125
|
+
type: integer
|
|
126
|
+
default: 500
|
|
127
|
+
- name: include_all_commits
|
|
128
|
+
in: query
|
|
129
|
+
required: false
|
|
130
|
+
description: Count all commits (not just current year)
|
|
131
|
+
schema:
|
|
132
|
+
type: boolean
|
|
133
|
+
default: false
|
|
134
|
+
- name: commits_year
|
|
135
|
+
in: query
|
|
136
|
+
required: false
|
|
137
|
+
description: Filter commits by year
|
|
138
|
+
schema:
|
|
139
|
+
type: integer
|
|
140
|
+
example: 2024
|
|
141
|
+
- name: exclude_repo
|
|
142
|
+
in: query
|
|
143
|
+
required: false
|
|
144
|
+
description: Comma-separated list of repositories to exclude
|
|
145
|
+
schema:
|
|
146
|
+
type: string
|
|
147
|
+
example: repo1,repo2
|
|
148
|
+
- name: custom_title
|
|
149
|
+
in: query
|
|
150
|
+
required: false
|
|
151
|
+
description: Custom card title
|
|
152
|
+
schema:
|
|
153
|
+
type: string
|
|
154
|
+
example: My GitHub Stats
|
|
155
|
+
- name: number_format
|
|
156
|
+
in: query
|
|
157
|
+
required: false
|
|
158
|
+
description: Number format
|
|
159
|
+
schema:
|
|
160
|
+
type: string
|
|
161
|
+
enum: [short, long]
|
|
162
|
+
default: short
|
|
163
|
+
- name: number_precision
|
|
164
|
+
in: query
|
|
165
|
+
required: false
|
|
166
|
+
description: Number precision
|
|
167
|
+
schema:
|
|
168
|
+
type: integer
|
|
169
|
+
- name: line_height
|
|
170
|
+
in: query
|
|
171
|
+
required: false
|
|
172
|
+
description: Line height
|
|
173
|
+
schema:
|
|
174
|
+
type: number
|
|
175
|
+
- name: ring_color
|
|
176
|
+
in: query
|
|
177
|
+
required: false
|
|
178
|
+
description: Ring color (hex, without #)
|
|
179
|
+
schema:
|
|
180
|
+
type: string
|
|
181
|
+
pattern: "^[0-9A-Fa-f]{6}$"
|
|
182
|
+
example: ffffff
|
|
183
|
+
- name: icon_color
|
|
184
|
+
in: query
|
|
185
|
+
required: false
|
|
186
|
+
description: Icon color (hex, without #)
|
|
187
|
+
schema:
|
|
188
|
+
type: string
|
|
189
|
+
pattern: "^[0-9A-Fa-f]{6}$"
|
|
190
|
+
example: ffffff
|
|
191
|
+
- name: text_bold
|
|
192
|
+
in: query
|
|
193
|
+
required: false
|
|
194
|
+
description: Make text bold
|
|
195
|
+
schema:
|
|
196
|
+
type: boolean
|
|
197
|
+
default: false
|
|
198
|
+
- name: disable_animations
|
|
199
|
+
in: query
|
|
200
|
+
required: false
|
|
201
|
+
description: Disable animations
|
|
202
|
+
schema:
|
|
203
|
+
type: boolean
|
|
204
|
+
default: false
|
|
205
|
+
responses:
|
|
206
|
+
"200":
|
|
207
|
+
description: SVG image of the stats card
|
|
208
|
+
content:
|
|
209
|
+
image/svg+xml:
|
|
210
|
+
schema:
|
|
211
|
+
type: string
|
|
212
|
+
format: binary
|
|
213
|
+
"400":
|
|
214
|
+
$ref: "#/components/responses/BadRequest"
|
|
215
|
+
"404":
|
|
216
|
+
$ref: "#/components/responses/NotFound"
|
|
217
|
+
"500":
|
|
218
|
+
$ref: "#/components/responses/InternalServerError"
|
|
219
|
+
|
|
220
|
+
/api/top-langs:
|
|
221
|
+
get:
|
|
222
|
+
tags:
|
|
223
|
+
- Cards
|
|
224
|
+
summary: Generate Top Languages Card
|
|
225
|
+
description: |
|
|
226
|
+
Display the most frequently used programming languages.
|
|
227
|
+
Returns an SVG image that can be embedded in README files.
|
|
228
|
+
operationId: getTopLanguagesCard
|
|
229
|
+
parameters:
|
|
230
|
+
- name: username
|
|
231
|
+
in: query
|
|
232
|
+
required: true
|
|
233
|
+
description: GitHub username
|
|
234
|
+
schema:
|
|
235
|
+
type: string
|
|
236
|
+
example: NAME
|
|
237
|
+
- $ref: "#/components/parameters/Theme"
|
|
238
|
+
- $ref: "#/components/parameters/BgColor"
|
|
239
|
+
- $ref: "#/components/parameters/TitleColor"
|
|
240
|
+
- $ref: "#/components/parameters/TextColor"
|
|
241
|
+
- $ref: "#/components/parameters/BorderColor"
|
|
242
|
+
- $ref: "#/components/parameters/HideBorder"
|
|
243
|
+
- $ref: "#/components/parameters/BorderRadius"
|
|
244
|
+
- $ref: "#/components/parameters/CacheSeconds"
|
|
245
|
+
- $ref: "#/components/parameters/Locale"
|
|
246
|
+
- name: layout
|
|
247
|
+
in: query
|
|
248
|
+
required: false
|
|
249
|
+
description: Layout style
|
|
250
|
+
schema:
|
|
251
|
+
type: string
|
|
252
|
+
enum: [normal, compact, donut, donut-vertical, pie]
|
|
253
|
+
default: normal
|
|
254
|
+
- name: langs_count
|
|
255
|
+
in: query
|
|
256
|
+
required: false
|
|
257
|
+
description: Number of languages to show (1-20)
|
|
258
|
+
schema:
|
|
259
|
+
type: integer
|
|
260
|
+
minimum: 1
|
|
261
|
+
maximum: 20
|
|
262
|
+
default: 5
|
|
263
|
+
- name: hide
|
|
264
|
+
in: query
|
|
265
|
+
required: false
|
|
266
|
+
description: Comma-separated list of languages to hide
|
|
267
|
+
schema:
|
|
268
|
+
type: string
|
|
269
|
+
example: javascript,html
|
|
270
|
+
- name: exclude_repo
|
|
271
|
+
in: query
|
|
272
|
+
required: false
|
|
273
|
+
description: Comma-separated list of repositories to exclude
|
|
274
|
+
schema:
|
|
275
|
+
type: string
|
|
276
|
+
example: repo1,repo2
|
|
277
|
+
- name: size_weight
|
|
278
|
+
in: query
|
|
279
|
+
required: false
|
|
280
|
+
description: Weight for byte count in ranking
|
|
281
|
+
schema:
|
|
282
|
+
type: number
|
|
283
|
+
default: 1
|
|
284
|
+
- name: count_weight
|
|
285
|
+
in: query
|
|
286
|
+
required: false
|
|
287
|
+
description: Weight for repo count in ranking
|
|
288
|
+
schema:
|
|
289
|
+
type: number
|
|
290
|
+
default: 0
|
|
291
|
+
- name: stats_format
|
|
292
|
+
in: query
|
|
293
|
+
required: false
|
|
294
|
+
description: Display format
|
|
295
|
+
schema:
|
|
296
|
+
type: string
|
|
297
|
+
enum: [percentages, bytes]
|
|
298
|
+
default: percentages
|
|
299
|
+
- name: hide_progress
|
|
300
|
+
in: query
|
|
301
|
+
required: false
|
|
302
|
+
description: Hide progress bars
|
|
303
|
+
schema:
|
|
304
|
+
type: boolean
|
|
305
|
+
default: false
|
|
306
|
+
- name: hide_title
|
|
307
|
+
in: query
|
|
308
|
+
required: false
|
|
309
|
+
description: Hide card title
|
|
310
|
+
schema:
|
|
311
|
+
type: boolean
|
|
312
|
+
default: false
|
|
313
|
+
- name: card_width
|
|
314
|
+
in: query
|
|
315
|
+
required: false
|
|
316
|
+
description: Card width in pixels
|
|
317
|
+
schema:
|
|
318
|
+
type: integer
|
|
319
|
+
default: 500
|
|
320
|
+
- name: custom_title
|
|
321
|
+
in: query
|
|
322
|
+
required: false
|
|
323
|
+
description: Custom card title
|
|
324
|
+
schema:
|
|
325
|
+
type: string
|
|
326
|
+
- name: disable_animations
|
|
327
|
+
in: query
|
|
328
|
+
required: false
|
|
329
|
+
description: Disable animations
|
|
330
|
+
schema:
|
|
331
|
+
type: boolean
|
|
332
|
+
default: false
|
|
333
|
+
responses:
|
|
334
|
+
"200":
|
|
335
|
+
description: SVG image of the top languages card
|
|
336
|
+
content:
|
|
337
|
+
image/svg+xml:
|
|
338
|
+
schema:
|
|
339
|
+
type: string
|
|
340
|
+
format: binary
|
|
341
|
+
"400":
|
|
342
|
+
$ref: "#/components/responses/BadRequest"
|
|
343
|
+
"404":
|
|
344
|
+
$ref: "#/components/responses/NotFound"
|
|
345
|
+
"500":
|
|
346
|
+
$ref: "#/components/responses/InternalServerError"
|
|
347
|
+
|
|
348
|
+
/api/pin:
|
|
349
|
+
get:
|
|
350
|
+
tags:
|
|
351
|
+
- Cards
|
|
352
|
+
summary: Generate Repository Card
|
|
353
|
+
description: |
|
|
354
|
+
Pin additional repositories beyond GitHub's 6-repo limit.
|
|
355
|
+
Returns an SVG image that can be embedded in README files.
|
|
356
|
+
operationId: getRepositoryCard
|
|
357
|
+
parameters:
|
|
358
|
+
- name: username
|
|
359
|
+
in: query
|
|
360
|
+
required: true
|
|
361
|
+
description: GitHub username
|
|
362
|
+
schema:
|
|
363
|
+
type: string
|
|
364
|
+
example: NAME
|
|
365
|
+
- name: repo
|
|
366
|
+
in: query
|
|
367
|
+
required: true
|
|
368
|
+
description: Repository name
|
|
369
|
+
schema:
|
|
370
|
+
type: string
|
|
371
|
+
example: github-readme-stats
|
|
372
|
+
- $ref: "#/components/parameters/Theme"
|
|
373
|
+
- $ref: "#/components/parameters/BgColor"
|
|
374
|
+
- $ref: "#/components/parameters/TitleColor"
|
|
375
|
+
- $ref: "#/components/parameters/TextColor"
|
|
376
|
+
- $ref: "#/components/parameters/BorderColor"
|
|
377
|
+
- $ref: "#/components/parameters/HideBorder"
|
|
378
|
+
- $ref: "#/components/parameters/BorderRadius"
|
|
379
|
+
- $ref: "#/components/parameters/CacheSeconds"
|
|
380
|
+
- $ref: "#/components/parameters/Locale"
|
|
381
|
+
- name: show_owner
|
|
382
|
+
in: query
|
|
383
|
+
required: false
|
|
384
|
+
description: Show repository owner
|
|
385
|
+
schema:
|
|
386
|
+
type: boolean
|
|
387
|
+
default: false
|
|
388
|
+
- name: description_lines_count
|
|
389
|
+
in: query
|
|
390
|
+
required: false
|
|
391
|
+
description: Number of description lines (1-3)
|
|
392
|
+
schema:
|
|
393
|
+
type: integer
|
|
394
|
+
minimum: 1
|
|
395
|
+
maximum: 3
|
|
396
|
+
- name: icon_color
|
|
397
|
+
in: query
|
|
398
|
+
required: false
|
|
399
|
+
description: Icon color (hex, without #)
|
|
400
|
+
schema:
|
|
401
|
+
type: string
|
|
402
|
+
pattern: "^[0-9A-Fa-f]{6}$"
|
|
403
|
+
example: ffffff
|
|
404
|
+
responses:
|
|
405
|
+
"200":
|
|
406
|
+
description: SVG image of the repository card
|
|
407
|
+
content:
|
|
408
|
+
image/svg+xml:
|
|
409
|
+
schema:
|
|
410
|
+
type: string
|
|
411
|
+
format: binary
|
|
412
|
+
"400":
|
|
413
|
+
$ref: "#/components/responses/BadRequest"
|
|
414
|
+
"404":
|
|
415
|
+
$ref: "#/components/responses/NotFound"
|
|
416
|
+
"500":
|
|
417
|
+
$ref: "#/components/responses/InternalServerError"
|
|
418
|
+
|
|
419
|
+
/api/gist:
|
|
420
|
+
get:
|
|
421
|
+
tags:
|
|
422
|
+
- Cards
|
|
423
|
+
summary: Generate Gist Card
|
|
424
|
+
description: |
|
|
425
|
+
Display GitHub Gists in your README.
|
|
426
|
+
Returns an SVG image that can be embedded in README files.
|
|
427
|
+
operationId: getGistCard
|
|
428
|
+
parameters:
|
|
429
|
+
- name: id
|
|
430
|
+
in: query
|
|
431
|
+
required: true
|
|
432
|
+
description: Gist ID
|
|
433
|
+
schema:
|
|
434
|
+
type: string
|
|
435
|
+
example: bbfce31e0217a3689c8d961a356cb10d
|
|
436
|
+
- $ref: "#/components/parameters/Theme"
|
|
437
|
+
- $ref: "#/components/parameters/BgColor"
|
|
438
|
+
- $ref: "#/components/parameters/TitleColor"
|
|
439
|
+
- $ref: "#/components/parameters/TextColor"
|
|
440
|
+
- $ref: "#/components/parameters/BorderColor"
|
|
441
|
+
- $ref: "#/components/parameters/HideBorder"
|
|
442
|
+
- $ref: "#/components/parameters/BorderRadius"
|
|
443
|
+
- $ref: "#/components/parameters/CacheSeconds"
|
|
444
|
+
- $ref: "#/components/parameters/Locale"
|
|
445
|
+
- name: show_owner
|
|
446
|
+
in: query
|
|
447
|
+
required: false
|
|
448
|
+
description: Show gist owner
|
|
449
|
+
schema:
|
|
450
|
+
type: boolean
|
|
451
|
+
default: false
|
|
452
|
+
- name: icon_color
|
|
453
|
+
in: query
|
|
454
|
+
required: false
|
|
455
|
+
description: Icon color (hex, without #)
|
|
456
|
+
schema:
|
|
457
|
+
type: string
|
|
458
|
+
pattern: "^[0-9A-Fa-f]{6}$"
|
|
459
|
+
example: ffffff
|
|
460
|
+
responses:
|
|
461
|
+
"200":
|
|
462
|
+
description: SVG image of the gist card
|
|
463
|
+
content:
|
|
464
|
+
image/svg+xml:
|
|
465
|
+
schema:
|
|
466
|
+
type: string
|
|
467
|
+
format: binary
|
|
468
|
+
"400":
|
|
469
|
+
$ref: "#/components/responses/BadRequest"
|
|
470
|
+
"404":
|
|
471
|
+
$ref: "#/components/responses/NotFound"
|
|
472
|
+
"500":
|
|
473
|
+
$ref: "#/components/responses/InternalServerError"
|
|
474
|
+
|
|
475
|
+
/api/wakatime:
|
|
476
|
+
get:
|
|
477
|
+
tags:
|
|
478
|
+
- Cards
|
|
479
|
+
summary: Generate WakaTime Card
|
|
480
|
+
description: |
|
|
481
|
+
Display your WakaTime coding statistics.
|
|
482
|
+
|
|
483
|
+
**Warning:** Your WakaTime profile must be public. Enable both
|
|
484
|
+
"Display code time publicly" and "Display languages, editors, os, categories publicly"
|
|
485
|
+
in your WakaTime settings.
|
|
486
|
+
|
|
487
|
+
Returns an SVG image that can be embedded in README files.
|
|
488
|
+
operationId: getWakaTimeCard
|
|
489
|
+
parameters:
|
|
490
|
+
- name: username
|
|
491
|
+
in: query
|
|
492
|
+
required: true
|
|
493
|
+
description: WakaTime username
|
|
494
|
+
schema:
|
|
495
|
+
type: string
|
|
496
|
+
example: NAME
|
|
497
|
+
- $ref: "#/components/parameters/Theme"
|
|
498
|
+
- $ref: "#/components/parameters/BgColor"
|
|
499
|
+
- $ref: "#/components/parameters/TitleColor"
|
|
500
|
+
- $ref: "#/components/parameters/TextColor"
|
|
501
|
+
- $ref: "#/components/parameters/BorderColor"
|
|
502
|
+
- $ref: "#/components/parameters/HideBorder"
|
|
503
|
+
- $ref: "#/components/parameters/BorderRadius"
|
|
504
|
+
- $ref: "#/components/parameters/CacheSeconds"
|
|
505
|
+
- $ref: "#/components/parameters/Locale"
|
|
506
|
+
- name: layout
|
|
507
|
+
in: query
|
|
508
|
+
required: false
|
|
509
|
+
description: Layout style
|
|
510
|
+
schema:
|
|
511
|
+
type: string
|
|
512
|
+
enum: [default, compact]
|
|
513
|
+
default: default
|
|
514
|
+
- name: langs_count
|
|
515
|
+
in: query
|
|
516
|
+
required: false
|
|
517
|
+
description: Limit number of languages
|
|
518
|
+
schema:
|
|
519
|
+
type: integer
|
|
520
|
+
- name: hide_progress
|
|
521
|
+
in: query
|
|
522
|
+
required: false
|
|
523
|
+
description: Hide progress bars
|
|
524
|
+
schema:
|
|
525
|
+
type: boolean
|
|
526
|
+
default: false
|
|
527
|
+
- name: display_format
|
|
528
|
+
in: query
|
|
529
|
+
required: false
|
|
530
|
+
description: Display format
|
|
531
|
+
schema:
|
|
532
|
+
type: string
|
|
533
|
+
enum: [time, percent]
|
|
534
|
+
default: time
|
|
535
|
+
- name: api_domain
|
|
536
|
+
in: query
|
|
537
|
+
required: false
|
|
538
|
+
description: Custom API domain
|
|
539
|
+
schema:
|
|
540
|
+
type: string
|
|
541
|
+
default: wakatime.com
|
|
542
|
+
- name: hide_title
|
|
543
|
+
in: query
|
|
544
|
+
required: false
|
|
545
|
+
description: Hide card title
|
|
546
|
+
schema:
|
|
547
|
+
type: boolean
|
|
548
|
+
default: false
|
|
549
|
+
- name: card_width
|
|
550
|
+
in: query
|
|
551
|
+
required: false
|
|
552
|
+
description: Card width in pixels
|
|
553
|
+
schema:
|
|
554
|
+
type: integer
|
|
555
|
+
default: 500
|
|
556
|
+
- name: custom_title
|
|
557
|
+
in: query
|
|
558
|
+
required: false
|
|
559
|
+
description: Custom card title
|
|
560
|
+
schema:
|
|
561
|
+
type: string
|
|
562
|
+
- name: hide
|
|
563
|
+
in: query
|
|
564
|
+
required: false
|
|
565
|
+
description: Comma-separated list of languages to hide
|
|
566
|
+
schema:
|
|
567
|
+
type: string
|
|
568
|
+
example: javascript,html
|
|
569
|
+
- name: line_height
|
|
570
|
+
in: query
|
|
571
|
+
required: false
|
|
572
|
+
description: Line height
|
|
573
|
+
schema:
|
|
574
|
+
type: number
|
|
575
|
+
- name: icon_color
|
|
576
|
+
in: query
|
|
577
|
+
required: false
|
|
578
|
+
description: Icon color (hex, without #)
|
|
579
|
+
schema:
|
|
580
|
+
type: string
|
|
581
|
+
pattern: "^[0-9A-Fa-f]{6}$"
|
|
582
|
+
example: ffffff
|
|
583
|
+
- name: disable_animations
|
|
584
|
+
in: query
|
|
585
|
+
required: false
|
|
586
|
+
description: Disable animations
|
|
587
|
+
schema:
|
|
588
|
+
type: boolean
|
|
589
|
+
default: false
|
|
590
|
+
responses:
|
|
591
|
+
"200":
|
|
592
|
+
description: SVG image of the WakaTime card
|
|
593
|
+
content:
|
|
594
|
+
image/svg+xml:
|
|
595
|
+
schema:
|
|
596
|
+
type: string
|
|
597
|
+
format: binary
|
|
598
|
+
"400":
|
|
599
|
+
$ref: "#/components/responses/BadRequest"
|
|
600
|
+
"404":
|
|
601
|
+
$ref: "#/components/responses/NotFound"
|
|
602
|
+
"500":
|
|
603
|
+
$ref: "#/components/responses/InternalServerError"
|
|
604
|
+
|
|
605
|
+
/api/status/up:
|
|
606
|
+
get:
|
|
607
|
+
tags:
|
|
608
|
+
- Status
|
|
609
|
+
summary: Check Service Uptime
|
|
610
|
+
description: |
|
|
611
|
+
Check if the Personal Access Tokens (PATs) are still functional.
|
|
612
|
+
|
|
613
|
+
**Rate Limit:** 1 request per 5 minutes
|
|
614
|
+
operationId: getServiceUptime
|
|
615
|
+
parameters:
|
|
616
|
+
- name: type
|
|
617
|
+
in: query
|
|
618
|
+
required: false
|
|
619
|
+
description: Response type
|
|
620
|
+
schema:
|
|
621
|
+
type: string
|
|
622
|
+
enum: [boolean, json, shields]
|
|
623
|
+
default: boolean
|
|
624
|
+
responses:
|
|
625
|
+
"200":
|
|
626
|
+
description: Service uptime status
|
|
627
|
+
content:
|
|
628
|
+
application/json:
|
|
629
|
+
schema:
|
|
630
|
+
oneOf:
|
|
631
|
+
- type: boolean
|
|
632
|
+
description: When type=boolean
|
|
633
|
+
- type: object
|
|
634
|
+
description: When type=json
|
|
635
|
+
properties:
|
|
636
|
+
up:
|
|
637
|
+
type: boolean
|
|
638
|
+
- $ref: "#/components/schemas/ShieldsResponse"
|
|
639
|
+
"429":
|
|
640
|
+
description: Rate limit exceeded
|
|
641
|
+
"500":
|
|
642
|
+
$ref: "#/components/responses/InternalServerError"
|
|
643
|
+
|
|
644
|
+
/api/status/pat-info:
|
|
645
|
+
get:
|
|
646
|
+
tags:
|
|
647
|
+
- Status
|
|
648
|
+
summary: Get PAT Information
|
|
649
|
+
description: |
|
|
650
|
+
Get detailed information about Personal Access Tokens status.
|
|
651
|
+
|
|
652
|
+
**Rate Limit:** 1 request per 5 minutes
|
|
653
|
+
operationId: getPATInfo
|
|
654
|
+
responses:
|
|
655
|
+
"200":
|
|
656
|
+
description: PAT information
|
|
657
|
+
content:
|
|
658
|
+
application/json:
|
|
659
|
+
schema:
|
|
660
|
+
$ref: "#/components/schemas/PATInfo"
|
|
661
|
+
"429":
|
|
662
|
+
description: Rate limit exceeded
|
|
663
|
+
"500":
|
|
664
|
+
$ref: "#/components/responses/InternalServerError"
|
|
665
|
+
|
|
666
|
+
components:
|
|
667
|
+
parameters:
|
|
668
|
+
Theme:
|
|
669
|
+
name: theme
|
|
670
|
+
in: query
|
|
671
|
+
required: false
|
|
672
|
+
description: Theme name
|
|
673
|
+
schema:
|
|
674
|
+
type: string
|
|
675
|
+
default: default
|
|
676
|
+
example: dark
|
|
677
|
+
BgColor:
|
|
678
|
+
name: bg_color
|
|
679
|
+
in: query
|
|
680
|
+
required: false
|
|
681
|
+
description: Background color (hex, without #)
|
|
682
|
+
schema:
|
|
683
|
+
type: string
|
|
684
|
+
pattern: "^[0-9A-Fa-f]{6}$"
|
|
685
|
+
example: 1a1b27
|
|
686
|
+
TitleColor:
|
|
687
|
+
name: title_color
|
|
688
|
+
in: query
|
|
689
|
+
required: false
|
|
690
|
+
description: Title color (hex, without #)
|
|
691
|
+
schema:
|
|
692
|
+
type: string
|
|
693
|
+
pattern: "^[0-9A-Fa-f]{6}$"
|
|
694
|
+
example: fff
|
|
695
|
+
TextColor:
|
|
696
|
+
name: text_color
|
|
697
|
+
in: query
|
|
698
|
+
required: false
|
|
699
|
+
description: Text color (hex, without #)
|
|
700
|
+
schema:
|
|
701
|
+
type: string
|
|
702
|
+
pattern: "^[0-9A-Fa-f]{6}$"
|
|
703
|
+
example: 9f9f9f
|
|
704
|
+
BorderColor:
|
|
705
|
+
name: border_color
|
|
706
|
+
in: query
|
|
707
|
+
required: false
|
|
708
|
+
description: Border color (hex, without #)
|
|
709
|
+
schema:
|
|
710
|
+
type: string
|
|
711
|
+
pattern: "^[0-9A-Fa-f]{6}$"
|
|
712
|
+
example: e4e2e2
|
|
713
|
+
HideBorder:
|
|
714
|
+
name: hide_border
|
|
715
|
+
in: query
|
|
716
|
+
required: false
|
|
717
|
+
description: Hide card border
|
|
718
|
+
schema:
|
|
719
|
+
type: boolean
|
|
720
|
+
default: false
|
|
721
|
+
BorderRadius:
|
|
722
|
+
name: border_radius
|
|
723
|
+
in: query
|
|
724
|
+
required: false
|
|
725
|
+
description: Border radius (0-50)
|
|
726
|
+
schema:
|
|
727
|
+
type: number
|
|
728
|
+
minimum: 0
|
|
729
|
+
maximum: 50
|
|
730
|
+
default: 4.5
|
|
731
|
+
CacheSeconds:
|
|
732
|
+
name: cache_seconds
|
|
733
|
+
in: query
|
|
734
|
+
required: false
|
|
735
|
+
description: Cache duration in seconds
|
|
736
|
+
schema:
|
|
737
|
+
type: integer
|
|
738
|
+
minimum: 43200
|
|
739
|
+
maximum: 864000
|
|
740
|
+
Locale:
|
|
741
|
+
name: locale
|
|
742
|
+
in: query
|
|
743
|
+
required: false
|
|
744
|
+
description: Language locale code
|
|
745
|
+
schema:
|
|
746
|
+
type: string
|
|
747
|
+
enum:
|
|
748
|
+
- ar
|
|
749
|
+
- az
|
|
750
|
+
- bn
|
|
751
|
+
- bg
|
|
752
|
+
- my
|
|
753
|
+
- ca
|
|
754
|
+
- cn
|
|
755
|
+
- zh-tw
|
|
756
|
+
- cs
|
|
757
|
+
- nl
|
|
758
|
+
- en
|
|
759
|
+
- fil
|
|
760
|
+
- fi
|
|
761
|
+
- fr
|
|
762
|
+
- de
|
|
763
|
+
- el
|
|
764
|
+
- he
|
|
765
|
+
- hi
|
|
766
|
+
- hu
|
|
767
|
+
- id
|
|
768
|
+
- it
|
|
769
|
+
- ja
|
|
770
|
+
- kr
|
|
771
|
+
- ml
|
|
772
|
+
- np
|
|
773
|
+
- no
|
|
774
|
+
- fa
|
|
775
|
+
- pl
|
|
776
|
+
- pt-br
|
|
777
|
+
- pt-pt
|
|
778
|
+
- ro
|
|
779
|
+
- ru
|
|
780
|
+
- sa
|
|
781
|
+
- sr
|
|
782
|
+
- sr-latn
|
|
783
|
+
- sk
|
|
784
|
+
- es
|
|
785
|
+
- sw
|
|
786
|
+
- se
|
|
787
|
+
- ta
|
|
788
|
+
- th
|
|
789
|
+
- tr
|
|
790
|
+
- uk-ua
|
|
791
|
+
- ur
|
|
792
|
+
- uz
|
|
793
|
+
- vi
|
|
794
|
+
default: en
|
|
795
|
+
|
|
796
|
+
schemas:
|
|
797
|
+
ShieldsResponse:
|
|
798
|
+
type: object
|
|
799
|
+
description: Shields.io compatible JSON response
|
|
800
|
+
properties:
|
|
801
|
+
schemaVersion:
|
|
802
|
+
type: integer
|
|
803
|
+
example: 1
|
|
804
|
+
label:
|
|
805
|
+
type: string
|
|
806
|
+
example: Public Instance
|
|
807
|
+
message:
|
|
808
|
+
type: string
|
|
809
|
+
enum: [up, down]
|
|
810
|
+
example: up
|
|
811
|
+
color:
|
|
812
|
+
type: string
|
|
813
|
+
enum: [brightgreen, red]
|
|
814
|
+
example: brightgreen
|
|
815
|
+
isError:
|
|
816
|
+
type: boolean
|
|
817
|
+
example: true
|
|
818
|
+
|
|
819
|
+
PATInfo:
|
|
820
|
+
type: object
|
|
821
|
+
description: Personal Access Token information
|
|
822
|
+
properties:
|
|
823
|
+
validPATs:
|
|
824
|
+
type: array
|
|
825
|
+
items:
|
|
826
|
+
type: string
|
|
827
|
+
description: List of valid PATs
|
|
828
|
+
example: [PAT_1, PAT_2]
|
|
829
|
+
expiredPATs:
|
|
830
|
+
type: array
|
|
831
|
+
items:
|
|
832
|
+
type: string
|
|
833
|
+
description: List of expired PATs
|
|
834
|
+
example: [PAT_3]
|
|
835
|
+
exhaustedPATs:
|
|
836
|
+
type: array
|
|
837
|
+
items:
|
|
838
|
+
type: string
|
|
839
|
+
description: List of rate-limited PATs
|
|
840
|
+
example: [PAT_4]
|
|
841
|
+
suspendedPATs:
|
|
842
|
+
type: array
|
|
843
|
+
items:
|
|
844
|
+
type: string
|
|
845
|
+
description: List of suspended PATs
|
|
846
|
+
example: []
|
|
847
|
+
errorPATs:
|
|
848
|
+
type: array
|
|
849
|
+
items:
|
|
850
|
+
type: string
|
|
851
|
+
description: List of PATs with errors
|
|
852
|
+
example: []
|
|
853
|
+
details:
|
|
854
|
+
type: object
|
|
855
|
+
additionalProperties:
|
|
856
|
+
$ref: "#/components/schemas/PATDetails"
|
|
857
|
+
description: Detailed status of each PAT
|
|
858
|
+
|
|
859
|
+
PATDetails:
|
|
860
|
+
type: object
|
|
861
|
+
description: Detailed status of a Personal Access Token
|
|
862
|
+
properties:
|
|
863
|
+
status:
|
|
864
|
+
type: string
|
|
865
|
+
enum: [valid, expired, exhausted, suspended, error]
|
|
866
|
+
description: PAT status
|
|
867
|
+
remaining:
|
|
868
|
+
type: integer
|
|
869
|
+
description: Remaining API calls (only for valid/exhausted PATs)
|
|
870
|
+
example: 4999
|
|
871
|
+
resetIn:
|
|
872
|
+
type: string
|
|
873
|
+
description: Time until rate limit reset (only for exhausted PATs)
|
|
874
|
+
example: 45 minutes
|
|
875
|
+
error:
|
|
876
|
+
type: object
|
|
877
|
+
description: Error details (only for error PATs)
|
|
878
|
+
properties:
|
|
879
|
+
type:
|
|
880
|
+
type: string
|
|
881
|
+
example: BAD_CREDENTIALS
|
|
882
|
+
message:
|
|
883
|
+
type: string
|
|
884
|
+
example: Bad credentials
|
|
885
|
+
|
|
886
|
+
Error:
|
|
887
|
+
type: object
|
|
888
|
+
description: Error response
|
|
889
|
+
properties:
|
|
890
|
+
message:
|
|
891
|
+
type: string
|
|
892
|
+
example: User not found
|
|
893
|
+
secondaryMessage:
|
|
894
|
+
type: string
|
|
895
|
+
example: Please check the username and try again
|
|
896
|
+
|
|
897
|
+
responses:
|
|
898
|
+
BadRequest:
|
|
899
|
+
description: Bad request - invalid parameters
|
|
900
|
+
content:
|
|
901
|
+
image/svg+xml:
|
|
902
|
+
schema:
|
|
903
|
+
type: string
|
|
904
|
+
format: binary
|
|
905
|
+
example: "<svg>...</svg>"
|
|
906
|
+
|
|
907
|
+
NotFound:
|
|
908
|
+
description: Resource not found (user, repo, gist, etc.)
|
|
909
|
+
content:
|
|
910
|
+
image/svg+xml:
|
|
911
|
+
schema:
|
|
912
|
+
type: string
|
|
913
|
+
format: binary
|
|
914
|
+
example: "<svg>...</svg>"
|
|
915
|
+
|
|
916
|
+
InternalServerError:
|
|
917
|
+
description: Internal server error
|
|
918
|
+
content:
|
|
919
|
+
image/svg+xml:
|
|
920
|
+
schema:
|
|
921
|
+
type: string
|
|
922
|
+
format: binary
|
|
923
|
+
example: "<svg>...</svg>"
|