forked from sonu27/api-sonurai-com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
121 lines (121 loc) · 2.73 KB
/
Copy pathopenapi.yaml
File metadata and controls
121 lines (121 loc) · 2.73 KB
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
openapi: 3.0.3
info:
title: Bing Wallpapers API
version: 0.1.0
servers:
- url: https://api.sonurai.com
paths:
/wallpapers:
get:
operationId: GetWallpapers
summary: Get wallpapers
parameters:
- in: query
name: startAfterDate
schema:
$ref: '#/components/schemas/Date'
- in: query
name: startAfterID
schema:
$ref: '#/components/schemas/ID'
- in: query
name: prev
schema:
type: string
enum: [1]
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/WallpaperList'
'404':
description: Not Found
/wallpapers/tags/{tag}:
get:
operationId: GetTaggedWallpapers
summary: Get tagged wallpapers
parameters:
- in: path
name: tag
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/WallpaperList'
'404':
description: Not Found
/wallpapers/{id}:
get:
operationId: GetWallpaper
summary: Get wallpaper
parameters:
- in: path
name: id
required: true
schema:
$ref: '#/components/schemas/ID'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/WallpaperWithTags'
'404':
description: Not Found
components:
schemas:
ID:
type: string
Date:
type: integer
minimum: 19700101
maximum: 30000101
Wallpaper:
type: object
properties:
id:
$ref: '#/components/schemas/ID'
title:
type: string
copyright:
type: string
date:
$ref: '#/components/schemas/Date'
filename:
type: string
market:
type: string
WallpaperWithTags:
allOf:
- $ref: '#/components/schemas/Wallpaper'
- type: object
properties:
tag:
type: object
additionalProperties:
type: number
format: double
Links:
type: object
properties:
prev:
type: string
next:
type: string
WallpaperList:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Wallpaper'
links:
$ref: '#/components/schemas/Links'