Skip to content

Commit 81827b7

Browse files
Websocket-related updates (#150)
Adds content-refresh properties and enum values Addresses specification issue \#417
1 parent d27fefb commit 81827b7

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

content/tutorials/instances.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ The VRChat API has several sentinel values for location strings:
4747
- `""` Pseudo-null value
4848
- `"offline"` Implies a user currently is not either running the VRChat client or connected to the Pipeline (e.g., browser tab open)
4949
- `"traveling"` Indicates a user's client is travelling between instances (e.g., downloading world, synchronizing world state)
50+
- Also can be `"traveling:traveling`
5051
- `"private"` Indicates a user's location is not visible to the currently logged-in user. (e.g., Ask Me/Do Not Disturb status, Invite/Invite+/Group instance)

content/tutorials/websocket.markdown

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ In this part of the documentation, the following `":identifier"`s will be used t
3838
- `""` Pseudo-null value
3939
- `"offline"` Implies a user currently is not either running the VRChat client or connected to the Pipeline (e.g., browser tab open)
4040
- `"traveling"` Indicates a user's client is travelling between instances (e.g., downloading world, synchronizing world state)
41+
- Also can be `"traveling:traveling`
4142
- `"private"` Indicates a user's location is not visible to the currently logged-in user. (e.g., Ask Me/Do Not Disturb status, Invite/Invite+/Group instance)
4243
- *other values* An actual location (see https://vrchatapi.github.io/tutorials/instances/)
4344
- `":platformString"`
@@ -50,13 +51,23 @@ In this part of the documentation, the following `":identifier"`s will be used t
5051
- `"gallery"`
5152
- `"icon"`
5253
- `"emoji"`
54+
- `"print"`
55+
- `"prints"` is also a value observed, but this never has an id attached
56+
- `"sticker"`
57+
- `"inventory"` appears to mirror other
5358
- `"avatar"`
5459
- `"world"`
5560
- *other values* Some other user-uploaded content
5661
- `":contentRefreshActionTypeEnum"`
5762
- `"created"`
5863
- `"deleted"`
59-
- *other values* Not expected
64+
- `"add"` \*
65+
- `"delete"` \*
66+
- *other values* Not expected<br>
67+
\* *only observed with* `"inventory"` *content type*
68+
- `":inventoryType"`
69+
- `"sticker"`
70+
- *other values* Some other user-uploaded or creator economy content
6071
6172
## Events
6273
@@ -368,11 +379,7 @@ A "`user-location`" event is sent when the user has changed instances.
368379
},
369380
"location": ":locationString",
370381
"instance": ":instanceId", // This is locationString without the World ID part.
371-
"worldId": ":worldId",
372-
"world": {
373-
// <World Object>, See return data of World API:
374-
// https://vrchatapi.github.io/docs/api/#get-/worlds/-worldId-
375-
}
382+
"travelingToLocation": ":locationString"
376383
}
377384
}
378385
```
@@ -412,6 +419,9 @@ A "`content-refresh`" event is sent when the user adds or removes profile images
412419
"type": "content-refresh",
413420
"content": {
414421
"contentType": ":contentRefreshContentTypeEnum",
422+
"fileId": ":id", // Id for the content updated (avatar, world, file, etc.)
423+
"itemId": ":inventoryId", // Id for `inventory` item
424+
"itemType": ":inventoryType", // Type of `inventory` item
415425
"actionType": ":contentRefreshActionTypeEnum"
416426
}
417427
}

0 commit comments

Comments
 (0)