-
Notifications
You must be signed in to change notification settings - Fork 10
/
swagger.yaml
193 lines (192 loc) · 5.22 KB
/
swagger.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
swagger: '2.0'
info:
title: GuessIt 2 API
description: Extract as much information as possible from a video filename, filepath or release name.
version: 2.1.0
host: api.guessit.io
schemes:
- https
basePath: /
produces:
- application/json
consumes:
- application/json
paths:
/:
get:
description: Compute a Match Object from a filename, filepath or release name.
parameters:
- name: filename
in: query
description: The filename, filepath or release name to process.
required: true
type: string
- name: options
in: query
description: Options to pass.
type: string
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Match'
'400':
description: Bad Request
schema:
$ref: '#/definitions/ParametersError'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/UnexpectedError'
post:
description: Compute a Match Object from given filename, filepath or release name.
parameters:
- in: body
name: body
required: true
schema:
$ref: '#/definitions/GuessItRequest'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Match'
'400':
description: Bad Request
schema:
$ref: '#/definitions/ParametersError'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/UnexpectedError'
/list/:
get:
description: Compute a list of Match Objects from a list of filename, filepath or release name. Output list has the same order as input list.
parameters:
- name: filename
in: query
description: The list of filename or release name
required: true
type: array
items:
type: string
- name: options
in: query
description: Options to pass
type: string
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Match'
'400':
description: Bad Request
schema:
$ref: '#/definitions/ParametersError'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/UnexpectedError'
post:
description: Compute a list of Match Objects from a list of filename, filepath or release name. Output list has the same order as input list.
parameters:
- in: body
name: body
description: Object containing list of filename and options
required: true
schema:
$ref: '#/definitions/GuessItListRequest'
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Match'
'400':
description: Bad Request
schema:
$ref: '#/definitions/ParametersError'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/UnexpectedError'
/version/:
get:
description: Retrieve version information
responses:
'200':
description: OK
schema:
$ref: '#/definitions/GuessItVersion'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/UnexpectedError'
definitions:
UnexpectedError:
type: object
required:
- message
properties:
message:
type: string
ParametersError:
type: object
required:
- message
properties:
message:
type: object
properties:
filename:
type: string
description: Error message related to filename parameter
options:
type: string
description: Error message related to options parameter
GuessItRequest:
type: object
description: Object containing the filename, filepath or release name, and GuessIt options.
required:
- filename
properties:
filename:
type: string
description: The filename or release name
options:
type: object
description: Options to pass, as an object
GuessItListRequest:
type: object
description: Object containing a list of filename, filepath or release name, and GuessIt options.
required:
- filename
properties:
filename:
type: array
items:
type: string
description: The list of filename, filepath or release name
options:
type: object
description: Options to pass, as an object
Match:
type: object
title: Match Object
description: The same GuessIt Match Object as the one returned with --json option on the CLI.
GuessItVersion:
type: object
title: Version
required:
- guessit
- rest
properties:
guessit:
type: string
description: Version of GuessIt.
rest:
type: string
description: Version of the GuessIt REST API.