Skip to content

Commit edb10d1

Browse files
authored
Add image endpoints (#408) (Only Python, Java, Rust)
* Add image endpoints * Add missing fields * Fix typo
1 parent bf2d65b commit edb10d1

File tree

4 files changed

+124
-0
lines changed

4 files changed

+124
-0
lines changed

openapi/components/codeSamples/files.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,25 @@
7979
source: >-
8080
curl -X GET "https://api.vrchat.cloud/api/1/analysis/{fileId}/{versionId}/standard" \
8181
-b "auth={authCookie}"
82+
/icon:
83+
post:
84+
- lang: cURL
85+
source: >-
86+
curl -X POST "https://api.vrchat.cloud/api/1/icon" \
87+
-b "auth={authCookie}" \
88+
-F "file=@/path/to/image.png"
89+
/gallery:
90+
post:
91+
- lang: cURL
92+
source: >-
93+
curl -X POST "https://api.vrchat.cloud/api/1/gallery" \
94+
-b "auth={authCookie}" \
95+
-F "file=@/path/to/image.png"
96+
/file/image:
97+
post:
98+
- lang: cURL
99+
source: >-
100+
curl -X POST "https://api.vrchat.cloud/api/1/file/image" \
101+
-b "auth={authCookie}" \
102+
-F "file=@/path/to/image.png" \
103+
-F "tag=icon"

openapi/components/paths.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@
108108
$ref: "./paths/files.yaml#/paths/~1analysis~1{fileId}~1{versionId}~1security"
109109
"/analysis/{fileId}/{versionId}/standard":
110110
$ref: "./paths/files.yaml#/paths/~1analysis~1{fileId}~1{versionId}~1standard"
111+
"/file/image":
112+
$ref: "./paths/files.yaml#/paths/~1file~1image"
113+
"/icon":
114+
$ref: "./paths/files.yaml#/paths/~1icon"
115+
"/gallery":
116+
$ref: "./paths/files.yaml#/paths/~1gallery"
111117

112118
# friends
113119

openapi/components/paths/files.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,96 @@ paths:
294294
security:
295295
- authCookie: []
296296
description: Get the standard performance analysis for the uploaded assets of an avatar
297+
'/file/image':
298+
post:
299+
summary: Upload gallery image, icon, emoji or sticker
300+
tags:
301+
- files
302+
x-codeSamples:
303+
$ref: "../codeSamples/files.yaml#/~1file~1image/post"
304+
responses:
305+
'200':
306+
$ref: ../responses/files/FileResponse.yaml
307+
operationId: uploadImage
308+
requestBody:
309+
content:
310+
multipart/form-data:
311+
schema:
312+
type: object
313+
properties:
314+
file:
315+
type: string
316+
format: binary
317+
description: The binary blob of the png file.
318+
tag:
319+
type: string
320+
description: Needs to be either icon, gallery, sticker or emoji
321+
animationStyle:
322+
type: string
323+
example: bats
324+
description: Animation style for sticker, required for emoji.
325+
maskTag:
326+
type: string
327+
example: square
328+
description: Mask of the sticker, optional for emoji.
329+
required:
330+
- file
331+
- tag
332+
security:
333+
- authCookie: []
334+
description: Upload an image, which can be an icon, gallery image, sticker or emoji
335+
'/icon':
336+
post:
337+
summary: Upload icon
338+
tags:
339+
- files
340+
x-codeSamples:
341+
$ref: "../codeSamples/files.yaml#/~1icon/post"
342+
responses:
343+
'200':
344+
$ref: ../responses/files/FileResponse.yaml
345+
operationId: uploadIcon
346+
requestBody:
347+
content:
348+
multipart/form-data:
349+
schema:
350+
type: object
351+
properties:
352+
file:
353+
type: string
354+
format: binary
355+
description: The binary blob of the png file.
356+
required:
357+
- file
358+
security:
359+
- authCookie: [ ]
360+
description: Upload an icon
361+
'/gallery':
362+
post:
363+
summary: Upload gallery image
364+
tags:
365+
- files
366+
x-codeSamples:
367+
$ref: "../codeSamples/files.yaml#/~1gallery/post"
368+
responses:
369+
'200':
370+
$ref: ../responses/files/FileResponse.yaml
371+
operationId: uploadGalleryImage
372+
requestBody:
373+
content:
374+
multipart/form-data:
375+
schema:
376+
type: object
377+
properties:
378+
file:
379+
type: string
380+
format: binary
381+
description: The binary blob of the png file.
382+
required:
383+
- file
384+
security:
385+
- authCookie: [ ]
386+
description: Upload a gallery image
297387
tags:
298388
$ref: ../tags.yaml
299389
components:

openapi/components/schemas/File.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
description: ''
22
properties:
3+
animationStyle:
4+
type: string
5+
example: bats
6+
maskTag:
7+
type: string
8+
example: square
39
extension:
410
example: .unitypackage
511
minLength: 1

0 commit comments

Comments
 (0)