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

Economy related endpoints #411

Merged
merged 5 commits into from
Nov 19, 2024
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
36 changes: 36 additions & 0 deletions openapi/components/codeSamples/economy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,39 @@
source: >-
curl -X GET "https://vrchat.com/api/1/licenseGroups/{licenseGroupId}" \
-b "auth={authCookie}"
'/listing/{productId}':
get:
- lang: cURL
source: >-
curl -X GET "https://vrchat.com/api/1/listing/{productId}" \
-b "auth={authCookie}"
'/user/{userId}/listings':
get:
- lang: cURL
source: >-
curl -X GET "https://vrchat.com/api/1/user/{userId}/listings?hydrate=true" \
-b "auth={authCookie}"
'/tokenBundles':
get:
- lang: cURL
source: >-
curl -X GET "https://vrchat.com/api/1/tokenBundles" \
-b "auth={authCookie}"
'/tilia/status':
get:
- lang: cURL
source: >-
curl -X GET "https://vrchat.com/api/1/tilia/status" \
-b "auth={authCookie}"
'/user/{userId}/tilia/tos':
get:
- lang: cURL
source: >-
curl -X GET "https://vrchat.com/api/1/user/{userId}/tilia/tos" \
-b "auth={authCookie}"
'/user/{userId}/balance':
get:
- lang: cURL
source: >-
curl -X GET "https://vrchat.com/api/1/user/{userId}/balance" \
-b "auth={authCookie}"
29 changes: 29 additions & 0 deletions openapi/components/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ sort:
schema:
$ref: ./schemas/SortOption.yaml
description: The sort order of the results.
hydrate:
name: hydrate
in: query
required: false
schema:
type: boolean
description: Populates some fields and changes types of others for certain objects.
groupMemberSort:
name: sort
in: query
Expand Down Expand Up @@ -90,6 +97,14 @@ groupId:
type: string
example: grp_00000000-0000-0000-0000-000000000000
description: Must be a valid group ID.
groupIdFilter:
name: groupId
in: query
required: false
schema:
type: string
example: grp_00000000-0000-0000-0000-000000000000
description: Must be a valid group ID.
groupRoleId:
name: groupRoleId
in: path
Expand Down Expand Up @@ -337,6 +352,20 @@ licenseGroupId:
schema:
type: string
description: Must be a valid license group ID.
productId:
name: productId
in: path
required: true
schema:
type: string
description: Must be a valid product ID.
active:
name: active
in: query
required: false
schema:
type: boolean
description: Filter for users' listings.
variant:
name: variant
in: query
Expand Down
12 changes: 12 additions & 0 deletions openapi/components/paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@
$ref: "./paths/economy.yaml#/paths/~1subscriptions"
'/licenseGroups/{licenseGroupId}':
$ref: "./paths/economy.yaml#/paths/~1licenseGroups~1{licenseGroupId}"
'/listing/{productId}':
$ref: "./paths/economy.yaml#/paths/~1listing~1{productId}"
'/user/{userId}/listings':
$ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1listings"
'/tokenBundles':
$ref: "./paths/economy.yaml#/paths/~1tokenBundles"
'/tilia/status':
$ref: "./paths/economy.yaml#/paths/~1tilia~1status"
'/user/{userId}/tilia/tos':
$ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1tilia~1tos"
'/user/{userId}/balance':
$ref: "./paths/economy.yaml#/paths/~1user~1{userId}~1balance"

# favorites

Expand Down
110 changes: 110 additions & 0 deletions openapi/components/paths/economy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,116 @@ paths:
tags:
- economy
description: Get a single License Group by given ID.
'/listing/{productId}':
parameters:
- $ref: ../parameters.yaml#/productId
- $ref: ../parameters.yaml#/hydrate
get:
summary: Get Product Listing
operationId: getProductListing
security:
- authCookie: []
x-codeSamples:
$ref: "../codeSamples/economy.yaml#/~1listing~1{productId}/get"
responses:
'200':
$ref: ../responses/economy/ProductListingResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
tags:
- economy
description: 'Gets a product listing'
'/user/{userId}/listings':
parameters:
- $ref: ../parameters.yaml#/userId
- $ref: ../parameters.yaml#/number
- $ref: ../parameters.yaml#/offset
- $ref: ../parameters.yaml#/hydrate
- $ref: ../parameters.yaml#/groupIdFilter
- $ref: ../parameters.yaml#/active
get:
summary: Get User Product Listings
operationId: getProductListings
security:
- authCookie: []
x-codeSamples:
$ref: "../codeSamples/economy.yaml#/~1user~1{userId}~1listings/get"
responses:
'200':
$ref: ../responses/economy/ProductListingListResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
tags:
- economy
description: Gets the product listings of a given user
'/tokenBundles':
get:
summary: List Token Bundles
operationId: getTokenBundles
security:
- authCookie: []
x-codeSamples:
$ref: "../codeSamples/economy.yaml#/~1tokenBundles/get"
responses:
'200':
$ref: ../responses/economy/TokenBundleListResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
tags:
- economy
description: 'Gets the list of token bundles'
'/tilia/status':
get:
summary: Get Tilia Status
operationId: getTiliaStatus
security:
- authCookie: []
x-codeSamples:
$ref: "../codeSamples/economy.yaml#/~1tilia~1status/get"
responses:
'200':
$ref: ../responses/economy/TiliaStatusResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
tags:
- economy
description: 'Gets the status of Tilia integration'
'/user/{userId}/tilia/tos':
parameters:
- $ref: ../parameters.yaml#/userId
get:
summary: Get Tilia TOS Agreement Status
operationId: getTiliaTos
security:
- authCookie: []
x-codeSamples:
$ref: "../codeSamples/economy.yaml#/~1user~1{userId}~1tilia~1tos/get"
responses:
'200':
$ref: ../responses/economy/TiliaTOSResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
tags:
- economy
description: 'Gets the status of the agreement of a user to the Tilia TOS'
'/user/{userId}/balance':
parameters:
- $ref: ../parameters.yaml#/userId
get:
summary: Get Balance
operationId: getBalance
security:
- authCookie: []
x-codeSamples:
$ref: "../codeSamples/economy.yaml#/~1user~1{userId}~1balance/get"
responses:
'200':
$ref: ../responses/economy/BalanceResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
tags:
- economy
description: 'Gets the balance of a user'
tags:
$ref: ../tags.yaml
components:
Expand Down
5 changes: 5 additions & 0 deletions openapi/components/responses/economy/BalanceResponse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Returns a single Balance object.
content:
application/json:
schema:
$ref: ../../schemas/Balance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description: Returns a list of ProductListing objects.
content:
application/json:
schema:
type: array
items:
$ref: ../../schemas/ProductListing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Returns a single ProductListing object.
content:
application/json:
schema:
$ref: ../../schemas/ProductListing.yaml
5 changes: 5 additions & 0 deletions openapi/components/responses/economy/TiliaStatusResponse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Returns a single TiliaStatus object.
content:
application/json:
schema:
$ref: ../../schemas/TiliaStatus.yaml
5 changes: 5 additions & 0 deletions openapi/components/responses/economy/TiliaTOSResponse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Returns a single TiliaTOS object.
content:
application/json:
schema:
$ref: ../../schemas/TiliaTOS.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description: Returns a list of TokenBundle objects.
content:
application/json:
schema:
type: array
items:
$ref: ../../schemas/TokenBundle.yaml
13 changes: 13 additions & 0 deletions openapi/components/schemas/Balance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: ''
type: object
title: Balance
properties:
balance:
default: 0
type: integer
noTransactions:
type: boolean
tiliaResponse:
type: boolean
required:
- balance
61 changes: 61 additions & 0 deletions openapi/components/schemas/Product.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
title: Product
type: object
properties:
archived:
type: boolean
created:
type: string
format: date-time
description:
type: string
displayName:
type: string
groupAccess:
type: boolean
default: false
groupAccessRemove:
type: boolean
default: false
groupId:
$ref: ./GroupID.yaml
groupRoleId:
$ref: ./GroupRoleID.yaml
id:
$ref: ./ProductID.yaml
imageId:
$ref: ./FileID.yaml
nullable: true
parentListings:
type: array
items:
$ref: ./ProductID.yaml
productType:
$ref: ./ProductType.yaml
sellerDisplayName:
type: string
sellerId:
type: string
tags:
type: array
items:
$ref: ./Tag.yaml
updated:
type: string
format: date-time
nullable: true
useForSubscriberList:
type: boolean
default: false
required:
- archived
- created
- description
- displayName
- id
- imageId
- parentListings
- productType
- sellerDisplayName
- sellerId
- tags
- updated
Loading