Skip to content

Commit

Permalink
Fixed API urls
Browse files Browse the repository at this point in the history
  • Loading branch information
intenscia committed Jul 4, 2024
1 parent 8dd519c commit e68c738
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions public/en-us/game-integration/unity/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ new SearchFilter(2, 10); // Will return results 21-30
```

:::note
Search Filters have a number of options for filtering and ordering your results. See the [reference documentation](/unityref/) (or use code completion in your IDE) for its available options.
Search Filters have a number of options for filtering and ordering your results. See the [reference documentation](https://docs.mod.io/unityref/) (or use code completion in your IDE) for its available options.
:::

### Downloading Images
Expand Down Expand Up @@ -529,7 +529,7 @@ async void SetRandomMod()
The code above relies on `allMods`, which is set in the first [searching for mods](#searching-for-mods) section. **Ensure that `allMods` has been set before running this method.**
:::

This method is downloading the smallest version of the logo, `logoImage_320x180`. However, Mod Profiles have a number of sizes for each image. See the [reference documentation](/unityref/) (or use code completion in your IDE) to view available options.
This method is downloading the smallest version of the logo, `logoImage_320x180`. However, Mod Profiles have a number of sizes for each image. See the [reference documentation](https://docs.mod.io/unityref/) (or use code completion in your IDE) to view available options.

## Getting Subscribed Mods

Expand Down Expand Up @@ -676,7 +676,7 @@ void Update()
In a real implementation, you'll likely track the `modId`'s download and install progress separately to display in your UI. But, this should give you an idea of what's possible with the mod management feature.

:::note
There are a number of mod management events available. See the [reference documentation](/unityref/) (or use code completion in your IDE) for a complete list.
There are a number of mod management events available. See the [reference documentation](https://docs.mod.io/unityref/) (or use code completion in your IDE) for a complete list.
:::

## Using Mods
Expand Down
2 changes: 1 addition & 1 deletion public/en-us/game-management/metrics/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ slug: /metrics/data/

# Data

Your game's data is shown on dashboards on mod.io. To access the dashboards, click the ‘stats’ icon at the top right of the game page on the mod.io website. Alternatively, access the url https://mod.io/g/gamename/admin/stats, substituting ‘gamename’ in the url. You will first see the UGC dashboard. Other dashboards can be accessed via the ‘Stats’ dropdown at the top of the game admin menu.
Your game's data is shown on dashboards on mod.io. To access the dashboards, click the ‘stats’ icon at the top right of the game page on the mod.io website. Alternatively, access the url `https://mod.io/g/gamename/admin/stats`, substituting ‘gamename’ in the url. You will first see the UGC dashboard. Other dashboards can be accessed via the ‘Stats’ dropdown at the top of the game admin menu.

At the top of each dashboard is a row of spark charts showing the total numbers of each stat presented in that dashboard. Click on each spark chart to populate the dashboard with the chosen stat. For example, to see month-on-month growth for ‘UGC added’, click on the ‘UGC added’ spark chart, then scroll down to view the ‘Monthly growth’ chart.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Finally, after all of the checks above are complete, if they evaluate to __TRUE_

#### Allow / Deny

Deny will return an error to the user (which you define), and will prevent their request from being processed, as well as any further behaviors from being invoked. Errors will be returned as an [Error Object](https://docs.mod.io/restapiref/#error-object), with [Error Ref of 29200](/api/error-codes/) and the response code you specify. This is an example:
Deny will return an error to the user (which you define), and will prevent their request from being processed, as well as any further behaviors from being invoked. Errors will be returned as an [Error Object](https://docs.mod.io/restapiref/#error-object), with [Error Ref of 29200](/restapi/error-codes/) and the response code you specify. This is an example:

```
{"error":{"code":403,"error_ref":29200,"message":"Your error message goes here."}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ _Viewing the details of a call to a webhook_

mod.io will not automatically retry failed webhook calls, but via the webhook history, you can retry calls to your webhook.

:::note mod.io allows a maximum of 5 seconds for webhooks to process, so if you expect execution to take longer, we recommend you process it in the background whilst returning a successful response code as early as possible. Any response code within the range of 200-299 is treated as successful.
:::warning
mod.io allows a maximum of 5 seconds for webhooks to process, so if you expect execution to take longer, we recommend you process it in the background whilst returning a successful response code as early as possible. Any response code within the range of 200-299 is treated as successful.
:::
4 changes: 2 additions & 2 deletions public/en-us/game-management/monetization/restapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ To get a list of all the purchases a user has made, call the following endpoint:

### Get Paid Mods

To get a list of all the paid mods in the marketplace, call the following endpoint: [get mods](https://docs.mod.io/restapiref/#get-mods) with the revenue_type filter. The following options are available:
To get a list of all the paid mods in the marketplace, call the following endpoint: [get mods](https://docs.mod.io/restapiref/#get-mods) with the `revenue_type` filter. The following options are available:

0 = Free Mods only in results
1 = Paid Mods only in results
2 = Free and Paid Mods in the results

### Managing File Access to Mods

The API has a number of game options that can be enabled to manage file CDN access to mods. Please see the following endpoint: [game options](https://docs.mod.io/restapiref/#get-game-options). This can be managed via the web interface or the API. The recommended option is to use a bit of 4 and above or 8. This will require the user's authentication token to be supplied when attempting to download the mod. When bitwise of 8 is enabled, we will also check if the user owns the mod before allowing the download.
The API has a number of game options that can be enabled to manage file CDN access to mods. Please see the value of `api_access_options` in the game object returned by the endpoint: [get game](https://docs.mod.io/restapiref/#get-game). This can be managed via the web interface or the API. The recommended option is to use a bit of 4 and above or 8. This will require the user's authentication token to be supplied when attempting to download the mod. When bitwise of 8 is enabled, we will also check if the user owns the mod before allowing the download.

### General

Expand Down
4 changes: 2 additions & 2 deletions public/en-us/web-services/authentication/s2s.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ client_id=12743894323&client_secret=Uq8jI5vWHoX0BBKDFDeaiYOVjofITG19&grant_type=

### Obtaining a User Delegation Token for making requests on behalf of a user

Some service-to-service endpoints require user context to be able to make requests on behalf of a user, such as [creating a transaction](/web-services/iap/studio-as-purchase-server/#1-initiating-transaction). To facilitate this, mod.io hosts a public endpoint which can be called by an authenticated user with their bearer token which returns what we call a User Delegation Token. This token should then be sent to your secure backend server from your game client, where you can then use it for specific endpoints in conjunction with a valid service token. See below for the full flow:
Some service-to-service endpoints require user context to be able to make requests on behalf of a user, such as [creating a transaction](/web-services/marketplace/studio-as-purchase-server/#1-initiating-transaction). To facilitate this, mod.io hosts a public endpoint which can be called by an authenticated user with their bearer token which returns what we call a User Delegation Token. This token should then be sent to your secure backend server from your game client, where you can then use it for specific endpoints in conjunction with a valid service token. See below for the full flow:

```mermaid
sequenceDiagram
Expand Down Expand Up @@ -147,7 +147,7 @@ token|string|The User Delegation Token to send to your secure backend.

### Authenticating requests with your service token

Now you have a valid service token, your purchase server has the ability to call service-to-service endpoints, such as [Creating Transactions](/web-services/iap/studio-as-purchase-server/#1-initiating-transaction), [Relaying Clawback Events](/web-services/iap/studio-as-purchase-server/#sending-clawback-data-to-modio) and more.
Now you have a valid service token, your purchase server has the ability to call service-to-service endpoints, such as [Creating Transactions](/web-services/marketplace/studio-as-purchase-server/#1-initiating-transaction), [Relaying Clawback Events](/web-services/marketplace/studio-as-purchase-server/#sending-clawback-data-to-modio) and more.

To authenticate requests using your Service Token, simply add the token to your `Authorization` header as if you would a user Bearer token.

Expand Down
2 changes: 1 addition & 1 deletion public/en-us/web-services/marketplace/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Hard mode. Game Studio does the heavy lifting.
| Your Studio | Registering eligible Platform Entitlements (SKU's) with mod.io, Platform Entitlement Consumption, Virtual Token Transaction Processing with mod.io, Refunds / Chargebacks / Chargeback-reversal Processing from platforms.
| mod.io | Processing Virtual Token transactions from your Purchase Server

For a detailed walkthrough of this flow, head to the [Studio as Purchase Server](/web-services/iap/studio-as-purchase-server/) section.
For a detailed walkthrough of this flow, head to the [Studio as Purchase Server](/web-services/marketplace/studio-as-purchase-server/) section.

# How to Choose

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Upon successful consumption of the entitlement against the Platforms Entitlement

#### Request

Create a service-to-service (S2S) transaction commit. This is for performing an external token transaction. This step finalizes the transaction and will issue tokens to the user associated to it. A successful request will return a [S2S Pay Object](#s2s-pay-object) object. Requires scope of monetization on token.
Create a service-to-service (S2S) transaction commit. This is for performing an external token transaction. This step finalizes the transaction and will issue tokens to the user associated to it. A successful request will return a [S2S Pay Object](https://docs.mod.io/restapiref/#s2s-pay-object) object. Requires scope of monetization on token.

`POST https://{your-game-id}.modapi.io/v1/s2s/transactions/commit`

Expand Down

0 comments on commit e68c738

Please sign in to comment.