Skip to content

Commit 709644f

Browse files
Social and Inventory endpoints (#530)
* Social and Inventory endpoints /calendar/discover /economy/purchase/listing /economy/purchases /inventory/{inventoryItemId}/consume /inventory/{inventoryItemId}/equip /inventory/{inventoryItemSlot}/equip /products/{productId} /users/{userId}/boop /users/{userId}/mutuals /users/{userId}/mutuals/friends /users/{userId}/mutuals/groups Addresses #474 and #495 * fix typos * Fix lint issues * C# can't handle format byte, it's up to the user to turn string to byte arr * Remove non-required mutualfriend properties * Add information on booprequest fields * Change emojiId to intended schema with built-in emoji name examples * Change parameter resolution for /inventory/{inventoryItemId}/equip * Update GroupLimitedMember.yaml Addresses #489 * Revert unrelated (to pr separately), address linting requirements Previous commit and was put on the wrong branch * Fix typo * Make example multiline string --------- Co-authored-by: jellejurre <jelle@jilles.com>
1 parent c93ade7 commit 709644f

41 files changed

Lines changed: 867 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

openapi/components/parameters.yaml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,91 @@ branch:
5858
schema:
5959
type: string
6060
default: main
61+
buyerId:
62+
name: buyerId
63+
description: Must be a valid user ID.
64+
required: true
65+
in: query
66+
schema:
67+
$ref: ./schemas/UserID.yaml
68+
calendarDiscoveryCategories:
69+
name: categories
70+
description: Filter for calendar event discovery.
71+
required: false
72+
in: query
73+
schema:
74+
type: string
75+
description: Comma-separated list of calendar event categories
76+
example: "avatars,exploration,gaming,roleplaying,music,performance"
77+
calendarDiscoveryFeatured:
78+
name: featuredResults
79+
description: Filter for calendar event discovery.
80+
required: false
81+
in: query
82+
schema:
83+
$ref: ./schemas/CalendarEventDiscoveryInclusion.yaml
84+
calendarDiscoveryMinimumInterestCount:
85+
name: minimumInterestCount
86+
description: Filter for calendar event discovery.
87+
required: false
88+
in: query
89+
schema:
90+
type: integer
91+
example: 5
92+
calendarDiscoveryMinimumRemainingMinutes:
93+
name: minimumRemainingMinutes
94+
description: Filter for calendar event discovery.
95+
required: false
96+
in: query
97+
schema:
98+
type: integer
99+
example: 10
100+
calendarDiscoveryNextCursor:
101+
name: nextCursor
102+
description: Cursor returned from previous calendar discovery queries (see nextCursor property of the schema CalendarEventDiscovery).
103+
required: false
104+
in: query
105+
schema:
106+
type: string
107+
format: string
108+
calendarDiscoveryNonFeatured:
109+
name: nonFeaturedResults
110+
description: Filter for calendar event discovery.
111+
required: false
112+
in: query
113+
schema:
114+
$ref: ./schemas/CalendarEventDiscoveryInclusion.yaml
115+
calendarDiscoveryPersonalized:
116+
name: personalizedResults
117+
description: Filter for calendar event discovery.
118+
required: false
119+
in: query
120+
schema:
121+
$ref: ./schemas/CalendarEventDiscoveryInclusion.yaml
122+
calendarDiscoveryScope:
123+
name: scope
124+
description: Scope for calendar event discovery.
125+
required: false
126+
in: query
127+
schema:
128+
$ref: ./schemas/CalendarEventDiscoveryScope.yaml
129+
calendarDiscoveryTags:
130+
name: tags
131+
description: Filter for calendar event discovery.
132+
required: false
133+
in: query
134+
schema:
135+
type: string
136+
description: Comma-separated list of calendar event tags
137+
example: vrc_event_group_fair
138+
calendarDiscoveryUpcomingOffsetMinutes:
139+
name: upcomingOffsetMinutes
140+
description: Filter for calendar event discovery.
141+
required: false
142+
in: query
143+
schema:
144+
type: integer
145+
example: 10080
61146
calendarId:
62147
name: calendarId
63148
description: Must be a valid calendar ID.
@@ -331,6 +416,13 @@ inventoryItemNotTypes:
331416
in: query
332417
schema:
333418
$ref: ./schemas/InventoryItemType.yaml
419+
inventoryItemSlotAsId:
420+
name: inventoryItemId
421+
description: Selector for inventory slot management.
422+
required: true
423+
in: path
424+
schema:
425+
$ref: ./schemas/InventoryEquipSlot.yaml
334426
inventoryItemTags:
335427
name: tags
336428
description: Filter tags for inventory retrieval (comma-separated).
@@ -492,6 +584,13 @@ order:
492584
in: query
493585
schema:
494586
$ref: ./schemas/OrderOption.yaml
587+
orderShort:
588+
name: order
589+
description: Result ordering
590+
required: false
591+
in: query
592+
schema:
593+
$ref: ./schemas/OrderOptionShort.yaml
495594
permissionId:
496595
name: permissionId
497596
description: Must be a valid permission ID.
@@ -566,6 +665,13 @@ sort:
566665
in: query
567666
schema:
568667
$ref: ./schemas/SortOption.yaml
668+
sortProductPurchase:
669+
name: sort
670+
description: The sort order of the results.
671+
required: false
672+
in: query
673+
schema:
674+
$ref: ./schemas/SortOptionProductPurchase.yaml
569675
startDate:
570676
name: startDate
571677
description: The start date of the search range.

openapi/components/paths.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@
9292
$ref: "./paths/avatars.yaml#/paths/~1avatars~1{avatarId}~1selectFallback"
9393
/calendar:
9494
$ref: "./paths/calendar.yaml#/paths/~1calendar"
95+
/calendar/discover:
96+
$ref: "./paths/calendar.yaml#/paths/~1calendar~1discover"
9597
/calendar/featured:
9698
$ref: "./paths/calendar.yaml#/paths/~1calendar~1featured"
9799
/calendar/following:
@@ -116,6 +118,10 @@
116118
$ref: "./paths/miscellaneous.yaml#/paths/~1css~1app.css"
117119
/economy/licenses/active:
118120
$ref: "./paths/economy.yaml#/paths/~1economy~1licenses~1active"
121+
/economy/purchase/listing:
122+
$ref: "./paths/economy.yaml#/paths/~1economy~1purchase~1listing"
123+
/economy/purchases:
124+
$ref: "./paths/economy.yaml#/paths/~1economy~1purchases"
119125
/economy/store:
120126
$ref: "./paths/economy.yaml#/paths/~1economy~1store"
121127
/economy/store/shelves:
@@ -230,6 +236,10 @@
230236
$ref: "./paths/inventory.yaml#/paths/~1inventory~1template~1{inventoryTemplateId}"
231237
"/inventory/{inventoryItemId}":
232238
$ref: "./paths/inventory.yaml#/paths/~1inventory~1{inventoryItemId}"
239+
"/inventory/{inventoryItemId}/consume":
240+
$ref: "./paths/inventory.yaml#/paths/~1inventory~1{inventoryItemId}~1consume"
241+
"/inventory/{inventoryItemId}/equip":
242+
$ref: "./paths/inventory.yaml#/paths/~1inventory~1{inventoryItemId}~1equip"
233243
"/invite/myself/to/{worldId}:{instanceId}":
234244
$ref: "./paths/invite.yaml#/paths/~1invite~1myself~1to~1{worldId}:{instanceId}"
235245
"/invite/{notificationId}/response":
@@ -268,6 +278,8 @@
268278
$ref: "./paths/prints.yaml#/paths/~1prints~1user~1{userId}"
269279
"/prints/{printId}":
270280
$ref: "./paths/prints.yaml#/paths/~1prints~1{printId}"
281+
"/products/{productId}":
282+
$ref: "./paths/economy.yaml#/paths/~1products~1{productId}"
271283
"/props/{propId}":
272284
$ref: "./paths/props.yaml#/paths/~1props~1{propId}"
273285
"/requestInvite/{userId}":
@@ -316,6 +328,8 @@
316328
$ref: "./paths/avatars.yaml#/paths/~1users~1{userId}~1avatar"
317329
"/users/{userId}/badges/{badgeId}":
318330
$ref: "./paths/users.yaml#/paths/~1users~1{userId}~1badges~1{badgeId}"
331+
"/users/{userId}/boop":
332+
$ref: "./paths/friends.yaml#/paths/~1users~1{userId}~1boop"
319333
"/users/{userId}/credits/eligible":
320334
$ref: "./paths/economy.yaml#/paths/~1users~1{userId}~1credits~1eligible"
321335
"/users/{userId}/delete":
@@ -332,6 +346,12 @@
332346
$ref: "./paths/users.yaml#/paths/~1users~1{userId}~1instances~1groups"
333347
"/users/{userId}/instances/groups/{groupId}":
334348
$ref: "./paths/users.yaml#/paths/~1users~1{userId}~1instances~1groups~1{groupId}"
349+
"/users/{userId}/mutuals":
350+
$ref: "./paths/users.yaml#/paths/~1users~1{userId}~1mutuals"
351+
"/users/{userId}/mutuals/friends":
352+
$ref: "./paths/users.yaml#/paths/~1users~1{userId}~1mutuals~1friends"
353+
"/users/{userId}/mutuals/groups":
354+
$ref: "./paths/users.yaml#/paths/~1users~1{userId}~1mutuals~1groups"
335355
"/users/{userId}/removeTags":
336356
$ref: "./paths/users.yaml#/paths/~1users~1{userId}~1removeTags"
337357
"/users/{userId}/subscription/eligible":

openapi/components/paths/calendar.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,36 @@ paths:
2222
$ref: ../responses/calendar/CalendarEventListResponse.yaml
2323
"401":
2424
$ref: ../responses/MissingCredentialsError.yaml
25+
/calendar/discover:
26+
get:
27+
operationId: discoverCalendarEvents
28+
summary: Discover calendar events
29+
description: |-
30+
Get a list of calendar events
31+
Initially, call without a `nextCursor` parameter
32+
For every successive call, use the `nextCursor` property returned in the previous call & the `number` of entries desired for this call
33+
The `nextCursor` internally keeps track of the `offset` of the results, the initial request parameters, and accounts for discrepancies that might arise from time elapsed between calls
34+
tags:
35+
- calendar
36+
parameters:
37+
- $ref: ../parameters.yaml#/calendarDiscoveryScope
38+
- $ref: ../parameters.yaml#/calendarDiscoveryCategories
39+
- $ref: ../parameters.yaml#/calendarDiscoveryTags
40+
- $ref: ../parameters.yaml#/calendarDiscoveryFeatured
41+
- $ref: ../parameters.yaml#/calendarDiscoveryNonFeatured
42+
- $ref: ../parameters.yaml#/calendarDiscoveryPersonalized
43+
- $ref: ../parameters.yaml#/calendarDiscoveryMinimumInterestCount
44+
- $ref: ../parameters.yaml#/calendarDiscoveryMinimumRemainingMinutes
45+
- $ref: ../parameters.yaml#/calendarDiscoveryUpcomingOffsetMinutes
46+
- $ref: ../parameters.yaml#/number
47+
- $ref: ../parameters.yaml#/calendarDiscoveryNextCursor
48+
security:
49+
- authCookie: []
50+
responses:
51+
"200":
52+
$ref: ../responses/calendar/CalendarEventDiscoveryResponse.yaml
53+
"401":
54+
$ref: ../responses/MissingCredentialsError.yaml
2555
/calendar/featured:
2656
get:
2757
operationId: getFeaturedCalendarEvents

openapi/components/paths/economy.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,46 @@ paths:
9696
$ref: ../responses/economy/LicenseListResponse.yaml
9797
"401":
9898
$ref: ../responses/MissingCredentialsError.yaml
99+
/economy/purchase/listing:
100+
post:
101+
operationId: purchaseProductListing
102+
summary: Purchase Product Listing
103+
description: Purchases a product listing
104+
tags:
105+
- economy
106+
requestBody:
107+
content:
108+
application/json:
109+
schema:
110+
$ref: ../requests/PurchaseProductListingRequest.yaml
111+
security:
112+
- authCookie: []
113+
responses:
114+
"200":
115+
$ref: ../responses/economy/ProductPurchaseResponse.yaml
116+
"401":
117+
$ref: ../responses/MissingCredentialsError.yaml
118+
/economy/purchases:
119+
parameters:
120+
- $ref: ../parameters.yaml#/buyerId
121+
- $ref: ../parameters.yaml#/number
122+
- $ref: ../parameters.yaml#/offset
123+
- $ref: ../parameters.yaml#/mostRecentFlag
124+
- $ref: ../parameters.yaml#/sortProductPurchase
125+
- $ref: ../parameters.yaml#/orderShort
126+
get:
127+
operationId: getProductPurchases
128+
summary: Get Product Purchases
129+
description: Gets product purchases
130+
tags:
131+
- economy
132+
security:
133+
- authCookie: []
134+
responses:
135+
"200":
136+
$ref: ../responses/economy/ProductPurchaseListResponse.yaml
137+
"401":
138+
$ref: ../responses/MissingCredentialsError.yaml
99139
/economy/store:
100140
parameters:
101141
- $ref: ../parameters.yaml#/storeId
@@ -165,6 +205,23 @@ paths:
165205
$ref: ../responses/economy/ProductListingResponse.yaml
166206
"401":
167207
$ref: ../responses/MissingCredentialsError.yaml
208+
"/products/{productId}":
209+
parameters:
210+
- $ref: ../parameters.yaml#/productId
211+
get:
212+
operationId: getProductListingAlternate
213+
deprecated: true
214+
summary: Get Product Listing (alternate)
215+
description: Gets a product listing
216+
tags:
217+
- economy
218+
security:
219+
- authCookie: []
220+
responses:
221+
"200":
222+
$ref: ../responses/economy/ProductListingResponse.yaml
223+
"401":
224+
$ref: ../responses/MissingCredentialsError.yaml
168225
/subscriptions:
169226
get:
170227
operationId: getSubscriptions

openapi/components/paths/friends.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,32 @@ paths:
9191
$ref: ../responses/friends/FriendStatusResponse.yaml
9292
"401":
9393
$ref: ../responses/MissingCredentialsError.yaml
94+
"/users/{userId}/boop":
95+
parameters:
96+
- $ref: ../parameters.yaml#/userId
97+
post:
98+
operationId: boop
99+
summary: Send Boop
100+
description: Send a boop to another user.
101+
tags:
102+
- friends
103+
requestBody:
104+
required: true
105+
content:
106+
application/json:
107+
schema:
108+
$ref: ../requests/BoopRequest.yaml
109+
security:
110+
- authCookie: []
111+
responses:
112+
"200":
113+
$ref: ../responses/friends/BoopSuccess.yaml
114+
"400":
115+
$ref: ../responses/friends/NotFriendsError.yaml
116+
"401":
117+
$ref: ../responses/MissingCredentialsError.yaml
118+
"404":
119+
$ref: ../responses/friends/UserDoesntExistError.yaml
94120
components:
95121
securitySchemes:
96122
$ref: ../securitySchemes.yaml

openapi/components/paths/inventory.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,62 @@ paths:
167167
$ref: ../responses/inventory/DeleteInventoryItemResponse.yaml
168168
"401":
169169
$ref: ../responses/MissingCredentialsError.yaml
170+
"/inventory/{inventoryItemId}/consume":
171+
parameters:
172+
- $ref: ../parameters.yaml#/inventoryItemId
173+
put:
174+
operationId: consumeOwnInventoryItem
175+
summary: Consume Own Inventory Item
176+
description: Returns the modified InventoryItem object as held by the currently logged in user.
177+
tags:
178+
- inventory
179+
security:
180+
- authCookie: []
181+
responses:
182+
"200":
183+
$ref: ../responses/inventory/ConsumeInventoryItemResponse.yaml
184+
"400":
185+
$ref: ../responses/inventory/InventoryItemNotConsumable.yaml
186+
"401":
187+
$ref: ../responses/MissingCredentialsError.yaml
188+
"/inventory/{inventoryItemId}/equip":
189+
delete:
190+
operationId: unequipOwnInventorySlot
191+
summary: Unequip Own Inventory Slot
192+
description: Unequips the InventoryItem in the given slot of the inventory of the currently logged in user.
193+
tags:
194+
- inventory
195+
parameters:
196+
- $ref: ../parameters.yaml#/inventoryItemSlotAsId
197+
security:
198+
- authCookie: []
199+
responses:
200+
"200":
201+
$ref: ../responses/inventory/UnequipInventorySlotResponse.yaml
202+
"401":
203+
$ref: ../responses/MissingCredentialsError.yaml
204+
put:
205+
operationId: equipOwnInventoryItem
206+
summary: Equip Own Inventory Item
207+
description: Returns the modified InventoryItem object as held by the currently logged in user.
208+
tags:
209+
- inventory
210+
parameters:
211+
- $ref: ../parameters.yaml#/inventoryItemId
212+
requestBody:
213+
content:
214+
application/json:
215+
schema:
216+
$ref: ../requests/EquipInventoryItemRequest.yaml
217+
security:
218+
- authCookie: []
219+
responses:
220+
"200":
221+
$ref: ../responses/inventory/InventoryItemResponse.yaml
222+
"400":
223+
$ref: ../responses/inventory/InventoryItemNotEquippable.yaml
224+
"401":
225+
$ref: ../responses/MissingCredentialsError.yaml
170226
"/users/{userId}/inventory/{inventoryItemId}":
171227
parameters:
172228
- $ref: ../parameters.yaml#/userId

0 commit comments

Comments
 (0)