Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add User Group Instances endpoint #406

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions openapi/components/codeSamples/users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@
source: >-
curl -X GET "https://api.vrchat.cloud/api/1/userNotes/{userNoteId}" \
-b "auth={authCookie}"
'/users/{userId}/instances/groups':
get:
- lang: cURL
source: >-
curl -X GET "https://api.vrchat.cloud/api/1/users/{userId}/instances/groups" \
-b "auth={authCookie}"
2 changes: 2 additions & 0 deletions openapi/components/paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@
$ref: "./paths/users.yaml#/paths/~1userNotes"
"/userNotes/{userNoteId}":
$ref: "./paths/users.yaml#/paths/~1userNotes~1{userNoteId}"
"/users/{userId}/instances/groups":
$ref: "./paths/users.yaml#/paths/~1users~1{userId}~1instances~1groups"

# worlds

Expand Down
20 changes: 20 additions & 0 deletions openapi/components/paths/users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,26 @@ paths:
$ref: ../responses/MissingCredentialsError.yaml
operationId: getUserNote
description: Get a particular user note
"/users/{userId}/instances/groups":
parameters:
- $ref: ../parameters.yaml#/userId
get:
summary: Get User Group Instances
x-codeSamples:
$ref: ../codeSamples/users.yaml#/~1users~1{userId}~1instances~1groups/get
description: Returns a list of group instances for a user
operationId: getUserGroupInstances
tags:
- users
responses:
'200':
$ref: ../responses/users/UserGroupInstanceListResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
'403':
$ref: ../responses/users/UserMustBeOwnError.yaml
security:
- authCookie: []
tags:
$ref: ../tags.yaml
components:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Returns a list of Instance objects with a fetched at time.
content:
application/json:
schema:
type: object
properties:
fetchedAt:
type: string
format: date-time
instances:
type: array
items:
$ref: ../../schemas/Instance.yaml
11 changes: 11 additions & 0 deletions openapi/components/responses/users/UserMustBeOwnError.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: Error response when trying get group instances of another user.
content:
application/json:
schema:
$ref: ../../schemas/Error.yaml
examples:
User Id must be your own:
value:
error:
message: "User ID must be your own․"
status_code: 403