From 202acc5372693c47ec624416105da2aebb4ef433 Mon Sep 17 00:00:00 2001 From: Gummby Date: Fri, 9 Aug 2024 03:36:36 +0000 Subject: [PATCH] Auto-updated by master commit to modio-restapi Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- source/index.html.md | 1595 +++++++++++++++++++++--------------------- 1 file changed, 779 insertions(+), 816 deletions(-) diff --git a/source/index.html.md b/source/index.html.md index fb54a60..adfb043 100644 --- a/source/index.html.md +++ b/source/index.html.md @@ -19,6 +19,10 @@ headingLevel: '2' + + + + ## mod.io API v1 Welcome to the official documentation for [mod.io](https://mod.io), an API for developers to add mod support to their games. Using our [SDKs and plugins](#implementation) for popular and custom game engines, getting your creator community started and making the mods they create discoverable and installable via your in-game menu is straight forward, with full cross-platform support. If you are a game developer, you can manage your games and API access via your [mod.io content dashboard](https://mod.io/content). If you are a user creating tools and apps, you can request API access via your [mod.io account](https://mod.io/me/access). @@ -1000,6 +1004,7 @@ The purpose of this endpoint is to provide the text, links and buttons you can u } } + ```

Responses

@@ -1128,6 +1133,7 @@ Request an access token on behalf of a Steam user. To use this functionality you "date_expires": 1570673249 } + ```

Responses

@@ -1263,6 +1269,7 @@ Request an access token on behalf of an Xbox Live user. A Successful request wil "date_expires": 1570673249 } + ```

Responses

@@ -1402,6 +1409,7 @@ Request an access token on behalf of a PlayStation Network (PSN) user. A Success "date_expires": 1570673249 } + ```

Responses

@@ -1528,6 +1536,7 @@ Request an access token on behalf of a Nintendo Switch user. A Successful reques "date_expires": 1570673249 } + ```

Responses

@@ -1667,6 +1676,7 @@ Request an access token on behalf of an Meta Quest user. To use this functionali "date_expires": 1570673249 } + ```

Responses

@@ -1797,6 +1807,7 @@ Request an access token on behalf of an Epic Games user. A Successful request wi "date_expires": 1570673249 } + ```

Responses

@@ -1925,6 +1936,7 @@ Request an access token on behalf of a GOG Galaxy user. To use this functionalit "date_expires": 1570673249 } + ```

Responses

@@ -2054,6 +2066,7 @@ Request an access token on behalf of a 'Sign in with Apple' user. A Successful r "date_expires": 1570673249 } + ```

Responses

@@ -2190,6 +2203,7 @@ Request an access token on behalf of a Google user. A Successful request will re "date_expires": 1570673249 } + ```

Responses

@@ -2319,6 +2333,7 @@ Request an access token on behalf of a Discord user. A Successful request will r "date_expires": 1570673249 } + ```

Responses

@@ -2453,6 +2468,7 @@ Request an access token on behalf of an OpenID identity provider. To use this me "date_expires": 1570673249 } + ```

Responses

@@ -2590,6 +2606,7 @@ Exchange `client_id` and `client_secret` for an access token. Successful request "scope": "read,write" } + ```

Responses

@@ -2710,6 +2727,7 @@ Request a security code for a user, identified by their e-mail which can then be "message": "Please enter the 5-digit security code sent to your email address (someperson@someservice.com)." } + ```

Responses

@@ -2835,6 +2853,7 @@ Exchange a security code issued from the [Email Request endpoint](#email) for an "date_expires": 1570673249 } + ```

Responses

@@ -2959,6 +2978,7 @@ Log the user out by revoking their current access token. If this request success "message": "You have successfully logged out of mod.io." } + ```

Responses

@@ -2969,6 +2989,7 @@ Status|Meaning|Error Ref|Description|Response Schema To perform this request, you must be authenticated via one of the following methods: OAuth 2 (Scopes: read) + # Sign in with mod.io (Web) ## 1. Sign in with mod.io @@ -3078,6 +3099,7 @@ Log a user into your website with a mod.io account using the OAuth2 [Authorizati "state": "T6KQGIXWrHXxFDfyp5Hh" } + ```

Responses

@@ -3211,6 +3233,7 @@ Exchange the `code` returned to your callback server for an access token. If the "refresh_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiUlNBLU9BRVAiLCJjdHkiOi...." } + ```

Responses

@@ -3344,6 +3367,7 @@ Exchange a `refresh_token` for an access token. You should always attempt to ref "refresh_token": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiUlNBLU9BRVAiLCJjdHkiOi...." } + ```

Responses

@@ -3579,6 +3603,9 @@ Get all games. Successful request will return an array of [Game Objects](#get-ga } ] }, + { + ... + }, { ... } @@ -3589,6 +3616,7 @@ Get all games. Successful request will return an array of [Game Objects](#get-ga "result_total": 70 } + ```

Responses

@@ -3793,6 +3821,7 @@ Get a game. Successful request will return a single [Game Object](#game-object). ] } + ```

Responses

@@ -3968,6 +3997,9 @@ Get all guides for a game. Successful request will return an array of [Guide Obj } ] }, + { + ... + }, { ... } @@ -3978,6 +4010,7 @@ Get all guides for a game. Successful request will return an array of [Guide Obj "result_total": 70 } + ```

Responses

@@ -4134,6 +4167,7 @@ Get a guide. Successful request will return a single [Guide Object](#guide-objec ] } + ```

Responses

@@ -4144,48 +4178,35 @@ Status|Meaning|Error Ref|Description|Response Schema To perform this request, you must be authenticated via one of the following methods: api_key, OAuth 2 (Scopes: read) -## Add Guide +## Get Mod > Example request ```shell # You can also use wget -curl -X POST https://*.modapi.io/v1/games/{game-id}/guides \ - -H 'Authorization: Bearer {access-token}' \ - -H 'Content-Type: multipart/form-data' \ - -H 'Content-Type: multipart/form-data' \ - -H 'Accept: application/json' \ - -F 'name=Modding Guide for Rogue Knight' \ - -F 'summary=Short descriptive summary here' \ - -F 'description=

Getting started with..' \ - -F 'logo=@/path/to/image.jpg' \ - -F 'date_live=1626667557' +curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey \ + -H 'Accept: application/json' ``` ```http -POST https://*.modapi.io/v1/games/{game-id}/guides HTTP/1.1 +GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey HTTP/1.1 Host: *.modapi.io -Content-Type: multipart/form-data + Accept: application/json -Authorization: Bearer {access-token} -Content-Type: multipart/form-data ``` ```javascript var headers = { - 'Authorization':'Bearer {access-token}', - 'Content-Type':'multipart/form-data', - 'Content-Type':'multipart/form-data', 'Accept':'application/json' }; $.ajax({ - url: 'https://*.modapi.io/v1/games/{game-id}/guides', - method: 'post', - + url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}', + method: 'get', + data: '?api_key=YourApiKey', headers: headers, success: function(data) { console.log(JSON.stringify(data)); @@ -4195,25 +4216,16 @@ $.ajax({ ```javascript--nodejs const request = require('node-fetch'); -const inputBody = '{ - "name": "Modding Guide for Rogue Knight", - "summary": "Short descriptive summary here", - "description": "

Getting started with..", - "logo": "@/path/to/image.jpg", - "date_live": 1626667557 -}'; + const headers = { - 'Authorization':'Bearer {access-token}', - 'Content-Type':'multipart/form-data', - 'Content-Type':'multipart/form-data', 'Accept':'application/json' }; -fetch('https://*.modapi.io/v1/games/{game-id}/guides', +fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey', { - method: 'POST', - body: inputBody, + method: 'GET', + headers: headers }) .then(function(res) { @@ -4226,23 +4238,20 @@ fetch('https://*.modapi.io/v1/games/{game-id}/guides', ```python import requests headers = { - 'Authorization': 'Bearer {access-token}', - 'Content-Type': 'multipart/form-data', - 'Content-Type': 'multipart/form-data', 'Accept': 'application/json' } -r = requests.post('https://*.modapi.io/v1/games/{game-id}/guides', params={ - +r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}', params={ + 'api_key': 'YourApiKey' }, headers = headers) print r.json() ``` ```java -URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides"); +URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("POST"); +con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); @@ -4255,36 +4264,19 @@ in.close(); System.out.println(response.toString()); ``` -`POST /games/{game-id}/guides` - -Add a guide for a game. Successful request will return a single [Guide Object](#guide-object). +`GET /games/{game-id}/mods/{mod-id}` - Parameter|Type|Required|Description - ---|---|---|---| - logo|file|true|Image file which will represent your guides logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. - name|string|true|Name of your guide. - name_id|string||Path for the guide on mod.io. For example: https://mod.io/g/gamename/r/__guide-name-id-here__. If no `name_id` is specified the `name` will be used. For example: _'Stellaris Shader Guide'_ will become _'stellaris-shader-guide'_. Cannot exceed 50 characters. - summary|string|true|Summary for your guide, giving a brief overview of what it's about. Cannot exceed 250 characters. - description|string||Detailed description for your guide, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. - url|string||Official homepage for your guide. Must be a valid URL. - tags[]|string||Tags to apply to the guide. Every tag to apply requires a separate field with tags[] as the key (eg. tags[]=tag1, tags[]=tag2). - date_live|integer||Unix timestamp of when this guide should go live. To release the guide immediately provide the current time along with the `status` value of 1. If this field is not provided and the `status` is 0, the guide will not be released. +Get a mod. Successful request will return a single [Mod Object](#mod-object). > Example response ```json { - "id": 1209, - "game_id": 3, - "game_name": "My Awesome Game", - "logo": { - "filename": "card.png", - "original": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" - }, - "user": { + "id": 2, + "game_id": 2, + "status": 1, + "visible": 1, + "submitted_by": { "id": 1, "name_id": "xant", "username": "XanT", @@ -4301,68 +4293,154 @@ Add a guide for a game. Successful request will return a single [Guide Object](# "language": "", "profile_url": "https://mod.io/u/xant" }, - "date_added": 1509922961, - "date_updated": 1509922961, - "date_live": 1509922961, - "status": 1, - "url": "https://mod.io/g/rogue-knight/r/getting-started", - "name": "Getting Started", - "name_id": "getting-started", - "summary": "Alright, so let's get started with modding on mod.io", - "description": "

Getting Started

Download this suspiciou....", - "tags": [ + "date_added": 1492564103, + "date_updated": 1499841487, + "date_live": 1499841403, + "maturity_option": 0, + "community_options": 3, + "monetization_options": 0, + "stock": 0, + "price": 0, + "tax": 0, + "logo": { + "filename": "card.png", + "original": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" + }, + "homepage_url": "https://www.rogue-hdpack.com/", + "name": "Rogue Knight HD Pack", + "name_id": "rogue-knight-hd-pack", + "summary": "It's time to bask in the glory of beautiful 4k textures!", + "description": "

Rogue HD Pack does exactly what you thi...", + "description_plaintext": "Rogue HD Pack does exactly what you thi...", + "metadata_blob": "rogue,hd,high-res,4k,hd textures", + "profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack", + "media": { + "youtube": [ + "https://www.youtube.com/watch?v=dQw4w9WgXcQ" + ], + "sketchfab": [ + "https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8" + ], + "images": [ + { + "filename": "card.png", + "original": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" + } + ] + }, + "modfile": { + "id": 2, + "mod_id": 2, + "date_added": 1499841487, + "date_updated": 1499841487, + "date_scanned": 1499841487, + "virus_status": 0, + "virus_positive": 0, + "virustotal_hash": "", + "filesize": 15181, + "filesize_uncompressed": 16384, + "filehash": { + "md5": "2d4a0e2d7273db6b0a94b0740a88ad0d" + }, + "filename": "rogue-knight-v1.zip", + "version": "1.3", + "changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.", + "metadata_blob": "rogue,hd,high-res,4k,hd textures", + "download": { + "binary_url": "https://*.modapi.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294", + "date_expires": 1579316848 + }, + "platforms": [ + { + "platform": "windows", + "status": 1 + } + ] + }, + "dependencies": false, + "platforms": [ { - "name": "Instructions", - "date_added": 1499841487, - "count": 22 + "platform": "windows", + "modfile_live": 1 } ], - "stats": [ + "metadata_kvp": [ { - "guide_id": 2, - "visits_total": 0, - "comments_total": 0 + "metakey": "pistol-dmg", + "metavalue": "800" } - ] + ], + "tags": [ + { + "name": "Unity", + "name_localized": "Unity", + "date_added": 1499841487 + } + ], + "stats": { + "mod_id": 2, + "popularity_rank_position": 13, + "popularity_rank_total_mods": 204, + "downloads_today": 327, + "downloads_total": 27492, + "subscribers_total": 16394, + "ratings_total": 1230, + "ratings_positive": 1047, + "ratings_negative": 183, + "ratings_percentage_positive": 91, + "ratings_weighted_aggregate": 87.38, + "ratings_display_text": "Very Positive", + "date_expires": 1492564103 + } } + ``` -

Responses

+

Cross-Platform Filtering

+ +If the parent game has platform filtering enabled, this endpoint supports the [targeting a platform](#targeting-a-platform) request header to return the [modfile](#modfile-object) within the [Mod Object](#mod-object) for the requested platform. If the request targets a platform that is invalid, the `modfile` field will be an empty object `{}`. + +

Responses

Status|Meaning|Error Ref|Description|Response Schema ---|---|----|---|---| -201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)||Created|[Guide Object](#schemaguide_object) -403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|14027|The authenticated user does not have permission to add guides to this game. Ensure the user is part of the game team before attempting the request again.|[Error Object](#schemaerror_object) +200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)||Successful Request|[Mod Object](#schemamod_object) -## Edit Guide +## Add Mod > Example request ```shell # You can also use wget -curl -X POST https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} \ +curl -X POST https://*.modapi.io/v1/games/{game-id}/mods \ -H 'Authorization: Bearer {access-token}' \ -H 'Content-Type: multipart/form-data' \ - -H 'Content-Type: multipart/form-data' \ -H 'Accept: application/json' \ - -F 'name=Modding Guide for Rogue Knight' \ + -F 'name=Graphics Overhaul Mod' \ + -F 'name_id=graphics-overhaul-mod' \ -F 'summary=Short descriptive summary here' \ -F 'description=

Getting started with..' \ -F 'logo=@/path/to/image.jpg' \ - -F 'date_live=1626667557' + -F 'homepage_url=https://www.example.com' \ + -F 'metadata_blob={"version_sig":"YXJlbnQgeW91IGlucXVpc2l0dmU="}' \ + -F 'tags[]=easy' ``` ```http -POST https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} HTTP/1.1 +POST https://*.modapi.io/v1/games/{game-id}/mods HTTP/1.1 Host: *.modapi.io Content-Type: multipart/form-data Accept: application/json Authorization: Bearer {access-token} -Content-Type: multipart/form-data ``` @@ -4370,13 +4448,12 @@ Content-Type: multipart/form-data var headers = { 'Authorization':'Bearer {access-token}', 'Content-Type':'multipart/form-data', - 'Content-Type':'multipart/form-data', 'Accept':'application/json' }; $.ajax({ - url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', + url: 'https://*.modapi.io/v1/games/{game-id}/mods', method: 'post', headers: headers, @@ -4389,21 +4466,23 @@ $.ajax({ ```javascript--nodejs const request = require('node-fetch'); const inputBody = '{ - "name": "Modding Guide for Rogue Knight", + "name": "Graphics Overhaul Mod", + "name_id": "graphics-overhaul-mod", "summary": "Short descriptive summary here", "description": "

Getting started with..", "logo": "@/path/to/image.jpg", - "date_live": 1626667557 + "homepage_url": "https://www.example.com", + "metadata_blob": "{\"version_sig\":\"YXJlbnQgeW91IGlucXVpc2l0dmU=\"}", + "tags": "easy" }'; const headers = { 'Authorization':'Bearer {access-token}', 'Content-Type':'multipart/form-data', - 'Content-Type':'multipart/form-data', 'Accept':'application/json' }; -fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', +fetch('https://*.modapi.io/v1/games/{game-id}/mods', { method: 'POST', body: inputBody, @@ -4421,11 +4500,10 @@ import requests headers = { 'Authorization': 'Bearer {access-token}', 'Content-Type': 'multipart/form-data', - 'Content-Type': 'multipart/form-data', 'Accept': 'application/json' } -r = requests.post('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', params={ +r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods', params={ }, headers = headers) @@ -4433,7 +4511,7 @@ print r.json() ``` ```java -URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}"); +URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); @@ -4448,37 +4526,37 @@ in.close(); System.out.println(response.toString()); ``` -`POST /games/{game-id}/guides/{guide-id}` +`POST /games/{game-id}/mods` -Update an existing guide. Successful request will return the updated [Guide Object](#guide-object). +Add a mod. Successful request will return the newly created [Mod Object](#mod-object). All content published by users on [mod.io](https://mod.io) is subject to the [Terms of Use](https://mod.io/terms/widget). It is a requirement that you provide a link to [https://mod.io/terms](https://mod.io/terms) in any place where users are submitting content to mod.io. + + __NOTE:__ By default new mods are 'not accepted' and 'public'. They can only be 'accepted' and made available via the API once a [Mod File](#add-modfile) has been uploaded. [Media](#add-mod-media), [Metadata Key Value Pairs](#add-mod-kvp-metadata) and [Dependencies](#add-mod-dependencies) can also be added after a mod profile is created. Parameter|Type|Required|Description ---|---|---|---| - status|integer||Status of the guide, see [status and visibility](#status-amp-visibility) for details):

__0__ = Not accepted
__1__ = Accepted (game admins only)
__3__ = Deleted (use the [delete guide](#delete-guide) endpoint to set this status) - logo|file||Image file which will represent your guides logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. - name|string||Name of your guide. - name_id|string||Path for the guide on mod.io. For example: https://mod.io/g/gamename/r/__guide-name-id-here__. If no `name_id` is specified the `name` will be used. For example: _'Stellaris Shader Guide'_ will become _'stellaris-shader-guide'_. Cannot exceed 50 characters. - summary|string||Summary for your guide, giving a brief overview of what it's about. Cannot exceed 250 characters. - description|string||Detailed description for your guide, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. - url|string||Official homepage for your guide. Must be a valid URL. - tags[]|string||Tags to apply to the guide. Every tag to apply requires a separate field with tags[] as the key (eg. tags[]=tag1, tags[]=tag2).

__NOTE:__ When editing a guide any tags you add or remove from the existing tags list will be added/removed, so if you do not wish to remove any tags you must re-submit all existing tags. - date_live|integer||Unix timestamp of when this guide should go live. To release the guide immediately provide the current time along with the `status` 1. If this field is not provided and the `status` is 0, the guide will not be released. + logo|file|true|Image file which will represent your mods logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. + name|string|true|Name of your mod. + name_id|string||Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/__mod-name-id-here__. If no `name_id` is specified the `name` will be used. For example: _'Stellaris Shader Mod'_ will become _'stellaris-shader-mod'_. Cannot exceed 50 characters. + summary|string|true|Summary for your mod, giving a brief overview of what it's about. Cannot exceed 250 characters. + visible|integer||Visibility of the mod (best if this field is controlled by mod admins, see [status and visibility](#status-amp-visibility) for details):

__0__ = Hidden
__1__ = Public _(default)_ + description|string||Detailed description for your mod, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. + homepage_url|string||Official homepage for your mod. Must be a valid URL. + price|int||The price of the mod.

__NOTE:__ The value of this field will be ignored if the parent game's queue is enabled (see `curation_option` field in [Game Object](#game-object)). + stock|integer||Maximum number of times this mod can be sold.

__NOTE:__ Limited mods can be enforced by the parent game. The value of this field is not used if the parent game's or mod's limited support is disabled (see `monetization_options` field in [Game Object](#game-object)). + maturity_option|integer||Mature content found in this mod.

__NOTE:__ The value of this field will default to 0 unless the parent game allows you to flag mature content (see `maturity_options` field in [Game Object](#game-object)).

__0__ = None _(default)_
__1__ = Alcohol
__2__ = Drugs
__4__ = Violence
__8__ = Explicit
__?__ = Add the options you want together, to enable multiple options (see [BITWISE fields](#bitwise-and-bitwise-and)) + community_options|integer||Community features enabled for this mod:

__0__ = All the options below are disabled
__1__ = Enable comments
__64__ = Enable previews
__128__ = Enable preview URLs
__1024__ = Allow dependencies
__?__ = Add the options you want together, to enable multiple options (see [BITWISE fields](#bitwise-and-bitwise-and)) + metadata_blob|string||Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. As an example, this may include properties as to how the item works, or other information you need to display. Metadata can also be stored as searchable [key value pairs](#metadata), and to individual [mod files](#get-modfiles). + tags[]|string||Tags to apply to the mod. Every tag to apply requires a separate field with tags[] as the key (e.g. tags[]=tag1, tags[]=tag2). Only the tags pre-defined by the parent game can be applied. To determine what tags are eligible, see the tags values within `tag_options` column on the parent [Game Object](#game-object). > Example response ```json { - "id": 1209, - "game_id": 3, - "game_name": "My Awesome Game", - "logo": { - "filename": "card.png", - "original": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" - }, - "user": { + "id": 2, + "game_id": 2, + "status": 1, + "visible": 1, + "submitted_by": { "id": 1, "name_id": "xant", "username": "XanT", @@ -4495,77 +4573,172 @@ Update an existing guide. Successful request will return the updated [Guide Obje "language": "", "profile_url": "https://mod.io/u/xant" }, - "date_added": 1509922961, - "date_updated": 1509922961, - "date_live": 1509922961, - "status": 1, - "url": "https://mod.io/g/rogue-knight/r/getting-started", - "name": "Getting Started", - "name_id": "getting-started", - "summary": "Alright, so let's get started with modding on mod.io", - "description": "

Getting Started

Download this suspiciou....", - "tags": [ + "date_added": 1492564103, + "date_updated": 1499841487, + "date_live": 1499841403, + "maturity_option": 0, + "community_options": 3, + "monetization_options": 0, + "stock": 0, + "price": 0, + "tax": 0, + "logo": { + "filename": "card.png", + "original": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" + }, + "homepage_url": "https://www.rogue-hdpack.com/", + "name": "Rogue Knight HD Pack", + "name_id": "rogue-knight-hd-pack", + "summary": "It's time to bask in the glory of beautiful 4k textures!", + "description": "

Rogue HD Pack does exactly what you thi...", + "description_plaintext": "Rogue HD Pack does exactly what you thi...", + "metadata_blob": "rogue,hd,high-res,4k,hd textures", + "profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack", + "media": { + "youtube": [ + "https://www.youtube.com/watch?v=dQw4w9WgXcQ" + ], + "sketchfab": [ + "https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8" + ], + "images": [ + { + "filename": "card.png", + "original": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" + } + ] + }, + "modfile": { + "id": 2, + "mod_id": 2, + "date_added": 1499841487, + "date_updated": 1499841487, + "date_scanned": 1499841487, + "virus_status": 0, + "virus_positive": 0, + "virustotal_hash": "", + "filesize": 15181, + "filesize_uncompressed": 16384, + "filehash": { + "md5": "2d4a0e2d7273db6b0a94b0740a88ad0d" + }, + "filename": "rogue-knight-v1.zip", + "version": "1.3", + "changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.", + "metadata_blob": "rogue,hd,high-res,4k,hd textures", + "download": { + "binary_url": "https://*.modapi.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294", + "date_expires": 1579316848 + }, + "platforms": [ + { + "platform": "windows", + "status": 1 + } + ] + }, + "dependencies": false, + "platforms": [ { - "name": "Instructions", - "date_added": 1499841487, - "count": 22 + "platform": "windows", + "modfile_live": 1 } ], - "stats": [ + "metadata_kvp": [ { - "guide_id": 2, - "visits_total": 0, - "comments_total": 0 + "metakey": "pistol-dmg", + "metavalue": "800" } - ] + ], + "tags": [ + { + "name": "Unity", + "name_localized": "Unity", + "date_added": 1499841487 + } + ], + "stats": { + "mod_id": 2, + "popularity_rank_position": 13, + "popularity_rank_total_mods": 204, + "downloads_today": 327, + "downloads_total": 27492, + "subscribers_total": 16394, + "ratings_total": 1230, + "ratings_positive": 1047, + "ratings_negative": 183, + "ratings_percentage_positive": 91, + "ratings_weighted_aggregate": 87.38, + "ratings_display_text": "Very Positive", + "date_expires": 1492564103 + } } + ``` -

Responses

+

Responses

Status|Meaning|Error Ref|Description|Response Schema ---|---|----|---|---| -200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)||OK|[Guide Object](#schemaguide_object) -403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|14036|The authenticated user does not have permission to edit guides to this game. Ensure the user is part of the game team before attempting the request again.|[Error Object](#schemaerror_object) -403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|14031|The guide status cannot be changed to accepted due to the request originating from a non-site admin whilst there is a DMCA report active against the guide.|[Error Object](#schemaerror_object) +201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)||Resource Created|[Mod Object](#schemamod_object) +422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|900011|Your marketplace amount is not within the minimum or maximum amount allowed.|[Error Object](#schemaerror_object) +403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|15012|The authenticated user has had upload privileges restricted by mod.io admins, this is typically due to spam.|[Error Object](#schemaerror_object) +### Response Headers + +Status|Header|Type|Format|Description +---|---|---|---|---| +201|Location|string||URL to newly created resource + -## Delete Guide +## Add Guide > Example request ```shell # You can also use wget -curl -X DELETE https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} \ +curl -X POST https://*.modapi.io/v1/games/{game-id}/guides \ -H 'Authorization: Bearer {access-token}' \ - -H 'Content-Type: application/x-www-form-urlencoded' \ - -H 'Accept: application/json' + -H 'Content-Type: multipart/form-data' \ + -H 'Content-Type: multipart/form-data' \ + -H 'Accept: application/json' \ + -F 'name=Modding Guide for Rogue Knight' \ + -F 'summary=Short descriptive summary here' \ + -F 'description=

Getting started with..' \ + -F 'logo=@/path/to/image.jpg' \ + -F 'date_live=1626667557' ``` ```http -DELETE https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} HTTP/1.1 +POST https://*.modapi.io/v1/games/{game-id}/guides HTTP/1.1 Host: *.modapi.io - +Content-Type: multipart/form-data Accept: application/json Authorization: Bearer {access-token} -Content-Type: application/x-www-form-urlencoded +Content-Type: multipart/form-data ``` ```javascript var headers = { 'Authorization':'Bearer {access-token}', - 'Content-Type':'application/x-www-form-urlencoded', + 'Content-Type':'multipart/form-data', + 'Content-Type':'multipart/form-data', 'Accept':'application/json' }; $.ajax({ - url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', - method: 'delete', + url: 'https://*.modapi.io/v1/games/{game-id}/guides', + method: 'post', headers: headers, success: function(data) { @@ -4576,18 +4749,25 @@ $.ajax({ ```javascript--nodejs const request = require('node-fetch'); - +const inputBody = '{ + "name": "Modding Guide for Rogue Knight", + "summary": "Short descriptive summary here", + "description": "

Getting started with..", + "logo": "@/path/to/image.jpg", + "date_live": 1626667557 +}'; const headers = { 'Authorization':'Bearer {access-token}', - 'Content-Type':'application/x-www-form-urlencoded', + 'Content-Type':'multipart/form-data', + 'Content-Type':'multipart/form-data', 'Accept':'application/json' }; -fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', +fetch('https://*.modapi.io/v1/games/{game-id}/guides', { - method: 'DELETE', - + method: 'POST', + body: inputBody, headers: headers }) .then(function(res) { @@ -4601,11 +4781,12 @@ fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', import requests headers = { 'Authorization': 'Bearer {access-token}', - 'Content-Type': 'application/x-www-form-urlencoded', + 'Content-Type': 'multipart/form-data', + 'Content-Type': 'multipart/form-data', 'Accept': 'application/json' } -r = requests.delete('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', params={ +r = requests.post('https://*.modapi.io/v1/games/{game-id}/guides', params={ }, headers = headers) @@ -4613,9 +4794,9 @@ print r.json() ``` ```java -URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}"); +URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("DELETE"); +con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); @@ -4628,56 +4809,131 @@ in.close(); System.out.println(response.toString()); ``` -`DELETE /games/{game-id}/guides/{guide-id}` +`POST /games/{game-id}/guides` -Delete a guide. Successful request will return `204 No Content`. +Add a guide for a game. Successful request will return a single [Guide Object](#guide-object). + + Parameter|Type|Required|Description + ---|---|---|---| + logo|file|true|Image file which will represent your guides logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. + name|string|true|Name of your guide. + name_id|string||Path for the guide on mod.io. For example: https://mod.io/g/gamename/r/__guide-name-id-here__. If no `name_id` is specified the `name` will be used. For example: _'Stellaris Shader Guide'_ will become _'stellaris-shader-guide'_. Cannot exceed 50 characters. + summary|string|true|Summary for your guide, giving a brief overview of what it's about. Cannot exceed 250 characters. + description|string||Detailed description for your guide, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. + url|string||Official homepage for your guide. Must be a valid URL. + tags[]|string||Tags to apply to the guide. Every tag to apply requires a separate field with tags[] as the key (eg. tags[]=tag1, tags[]=tag2). + date_live|integer||Unix timestamp of when this guide should go live. To release the guide immediately provide the current time along with the `status` value of 1. If this field is not provided and the `status` is 0, the guide will not be released. > Example response ```json - 204 No Content +{ + "id": 1209, + "game_id": 3, + "game_name": "My Awesome Game", + "logo": { + "filename": "card.png", + "original": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" + }, + "user": { + "id": 1, + "name_id": "xant", + "username": "XanT", + "display_name_portal": null, + "date_online": 1509922961, + "date_joined": 1509922961, + "avatar": { + "filename": "avatar.png", + "original": "https://assets.modcdn.io/images/placeholder/avatar.png", + "thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png", + "thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png" + }, + "timezone": "", + "language": "", + "profile_url": "https://mod.io/u/xant" + }, + "date_added": 1509922961, + "date_updated": 1509922961, + "date_live": 1509922961, + "status": 1, + "url": "https://mod.io/g/rogue-knight/r/getting-started", + "name": "Getting Started", + "name_id": "getting-started", + "summary": "Alright, so let's get started with modding on mod.io", + "description": "

Getting Started

Download this suspiciou....", + "tags": [ + { + "name": "Instructions", + "date_added": 1499841487, + "count": 22 + } + ], + "stats": [ + { + "guide_id": 2, + "visits_total": 0, + "comments_total": 0 + } + ] +} + ``` -

Responses

+

Responses

Status|Meaning|Error Ref|Description|Response Schema ---|---|----|---|---| -204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)||Successful Request. No Body Returned.|None -403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|14028|The authenticated user does not have permission to delete guides to this game. Ensure the user is part of the game team before attempting the request again.|[Error Object](#schemaerror_object) -403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|14031|The guide cannot be deleted due to the request originating from a non-site admin whilst there is a DMCA report active against the guide.|[Error Object](#schemaerror_object) +201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)||Created|[Guide Object](#schemaguide_object) +403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|14027|The authenticated user does not have permission to add guides to this game. Ensure the user is part of the game team before attempting the request again.|[Error Object](#schemaerror_object) -## Get Guides Tags +## Edit Guide > Example request ```shell # You can also use wget -curl -X GET https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey \ - -H 'Accept: application/json' +curl -X POST https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} \ + -H 'Authorization: Bearer {access-token}' \ + -H 'Content-Type: multipart/form-data' \ + -H 'Content-Type: multipart/form-data' \ + -H 'Accept: application/json' \ + -F 'name=Modding Guide for Rogue Knight' \ + -F 'summary=Short descriptive summary here' \ + -F 'description=

Getting started with..' \ + -F 'logo=@/path/to/image.jpg' \ + -F 'date_live=1626667557' ``` ```http -GET https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey HTTP/1.1 +POST https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} HTTP/1.1 Host: *.modapi.io - +Content-Type: multipart/form-data Accept: application/json +Authorization: Bearer {access-token} +Content-Type: multipart/form-data ``` ```javascript var headers = { + 'Authorization':'Bearer {access-token}', + 'Content-Type':'multipart/form-data', + 'Content-Type':'multipart/form-data', 'Accept':'application/json' }; $.ajax({ - url: 'https://*.modapi.io/v1/games/{game-id}/guides/tags', - method: 'get', - data: '?api_key=YourApiKey', + url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', + method: 'post', + headers: headers, success: function(data) { console.log(JSON.stringify(data)); @@ -4687,16 +4943,25 @@ $.ajax({ ```javascript--nodejs const request = require('node-fetch'); - +const inputBody = '{ + "name": "Modding Guide for Rogue Knight", + "summary": "Short descriptive summary here", + "description": "

Getting started with..", + "logo": "@/path/to/image.jpg", + "date_live": 1626667557 +}'; const headers = { + 'Authorization':'Bearer {access-token}', + 'Content-Type':'multipart/form-data', + 'Content-Type':'multipart/form-data', 'Accept':'application/json' }; -fetch('https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey', +fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', { - method: 'GET', - + method: 'POST', + body: inputBody, headers: headers }) .then(function(res) { @@ -4709,20 +4974,23 @@ fetch('https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey', ```python import requests headers = { + 'Authorization': 'Bearer {access-token}', + 'Content-Type': 'multipart/form-data', + 'Content-Type': 'multipart/form-data', 'Accept': 'application/json' } -r = requests.get('https://*.modapi.io/v1/games/{game-id}/guides/tags', params={ - 'api_key': 'YourApiKey' +r = requests.post('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', params={ + }, headers = headers) print r.json() ``` ```java -URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey"); +URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); +con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); @@ -4735,71 +5003,126 @@ in.close(); System.out.println(response.toString()); ``` -`GET /games/{game-id}/guides/tags` +`POST /games/{game-id}/guides/{guide-id}` -Get all guide tags for a game. Successful request will return an array of [Guide Tag Objects](#get-guide-tags). +Update an existing guide. Successful request will return the updated [Guide Object](#guide-object). + + Parameter|Type|Required|Description + ---|---|---|---| + status|integer||Status of the guide, see [status and visibility](#status-amp-visibility) for details):

__0__ = Not accepted
__1__ = Accepted (game admins only)
__3__ = Deleted (use the [delete guide](#delete-guide) endpoint to set this status) + logo|file||Image file which will represent your guides logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. + name|string||Name of your guide. + name_id|string||Path for the guide on mod.io. For example: https://mod.io/g/gamename/r/__guide-name-id-here__. If no `name_id` is specified the `name` will be used. For example: _'Stellaris Shader Guide'_ will become _'stellaris-shader-guide'_. Cannot exceed 50 characters. + summary|string||Summary for your guide, giving a brief overview of what it's about. Cannot exceed 250 characters. + description|string||Detailed description for your guide, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. + url|string||Official homepage for your guide. Must be a valid URL. + tags[]|string||Tags to apply to the guide. Every tag to apply requires a separate field with tags[] as the key (eg. tags[]=tag1, tags[]=tag2).

__NOTE:__ When editing a guide any tags you add or remove from the existing tags list will be added/removed, so if you do not wish to remove any tags you must re-submit all existing tags. + date_live|integer||Unix timestamp of when this guide should go live. To release the guide immediately provide the current time along with the `status` 1. If this field is not provided and the `status` is 0, the guide will not be released. > Example response ```json { - "data": [ + "id": 1209, + "game_id": 3, + "game_name": "My Awesome Game", + "logo": { + "filename": "card.png", + "original": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png", + "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" + }, + "user": { + "id": 1, + "name_id": "xant", + "username": "XanT", + "display_name_portal": null, + "date_online": 1509922961, + "date_joined": 1509922961, + "avatar": { + "filename": "avatar.png", + "original": "https://assets.modcdn.io/images/placeholder/avatar.png", + "thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png", + "thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png" + }, + "timezone": "", + "language": "", + "profile_url": "https://mod.io/u/xant" + }, + "date_added": 1509922961, + "date_updated": 1509922961, + "date_live": 1509922961, + "status": 1, + "url": "https://mod.io/g/rogue-knight/r/getting-started", + "name": "Getting Started", + "name_id": "getting-started", + "summary": "Alright, so let's get started with modding on mod.io", + "description": "

Getting Started

Download this suspiciou....", + "tags": [ { "name": "Instructions", "date_added": 1499841487, "count": 22 - }, - { - ... } ], - "result_count": 70, - "result_offset": 0, - "result_limit": 100, - "result_total": 70 + "stats": [ + { + "guide_id": 2, + "visits_total": 0, + "comments_total": 0 + } + ] } + ``` -

Responses

+

Responses

Status|Meaning|Error Ref|Description|Response Schema ---|---|----|---|---| -200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)||Successful Request|[Get Guide Tags](#schemaget_guide_tags) +200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)||OK|[Guide Object](#schemaguide_object) +403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|14036|The authenticated user does not have permission to edit guides to this game. Ensure the user is part of the game team before attempting the request again.|[Error Object](#schemaerror_object) +403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|14031|The guide status cannot be changed to accepted due to the request originating from a non-site admin whilst there is a DMCA report active against the guide.|[Error Object](#schemaerror_object) -# Mods - -## Get Mods +## Delete Guide > Example request ```shell # You can also use wget -curl -X GET https://*.modapi.io/v1/games/{game-id}/mods?api_key=YourApiKey \ +curl -X DELETE https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} \ + -H 'Authorization: Bearer {access-token}' \ + -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Accept: application/json' ``` ```http -GET https://*.modapi.io/v1/games/{game-id}/mods?api_key=YourApiKey HTTP/1.1 +DELETE https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} HTTP/1.1 Host: *.modapi.io Accept: application/json +Authorization: Bearer {access-token} +Content-Type: application/x-www-form-urlencoded ``` ```javascript var headers = { + 'Authorization':'Bearer {access-token}', + 'Content-Type':'application/x-www-form-urlencoded', 'Accept':'application/json' }; $.ajax({ - url: 'https://*.modapi.io/v1/games/{game-id}/mods', - method: 'get', - data: '?api_key=YourApiKey', + url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', + method: 'delete', + headers: headers, success: function(data) { console.log(JSON.stringify(data)); @@ -4811,13 +5134,15 @@ $.ajax({ const request = require('node-fetch'); const headers = { + 'Authorization':'Bearer {access-token}', + 'Content-Type':'application/x-www-form-urlencoded', 'Accept':'application/json' }; -fetch('https://*.modapi.io/v1/games/{game-id}/mods?api_key=YourApiKey', +fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', { - method: 'GET', + method: 'DELETE', headers: headers }) @@ -4831,20 +5156,22 @@ fetch('https://*.modapi.io/v1/games/{game-id}/mods?api_key=YourApiKey', ```python import requests headers = { + 'Authorization': 'Bearer {access-token}', + 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json' } -r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods', params={ - 'api_key': 'YourApiKey' +r = requests.delete('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', params={ + }, headers = headers) print r.json() ``` ```java -URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods?api_key=YourApiKey"); +URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); +con.setRequestMethod("DELETE"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); @@ -4857,210 +5184,41 @@ in.close(); System.out.println(response.toString()); ``` -`GET /games/{game-id}/mods` +`DELETE /games/{game-id}/guides/{guide-id}` -Get all mods for the corresponding game. Successful request will return an array of [Mod Objects](#get-mods-2). We recommended reading the [filtering documentation](#filtering) to return only the records you want. - - Filter|Type|Description - ---|---|--- - id|integer|Unique id of the mod. - game_id|integer|Unique id of the parent game. - status|integer|Status of the mod (only game admins can filter by this field, see [status and visibility](#status-amp-visibility) for details):

__0__ = Not accepted
__1__ = Accepted _(default)_
__3__ = Deleted - visible|integer|Visibility of the mod (only game admins can filter by this field, see [status and visibility](#status-amp-visibility) for details):

__0__ = Hidden
__1__ = Public _(default)_ - submitted_by|integer|Unique id of the user who has ownership of the mod. - date_added|integer|Unix timestamp of date mod was registered. - date_updated|integer|Unix timestamp of date mod was updated. - date_live|integer|Unix timestamp of date mod was set live. - community_options|integer|Community features enabled for this mod:

__0__ = All the options below are disabled
__1__ = Enable comments
__64__ = Enable previews
__128__ = Enable preview URLs
__1024__ = Allow dependencies
__?__ = Add the options you want together, to enable multiple options (see [BITWISE fields](#bitwise-and-bitwise-and)) - maturity_option|integer|Maturity options set by the mod creator:

__0__ = None
__1__ = Alcohol
__2__ = Drugs
__4__ = Violence
__8__ = Explicit
__?__ = Combine to find mods with multiple options enabled (see [BITWISE fields](#bitwise-and-bitwise-and)) - monetization_options|integer|Monetization options enabled for this mod:

__0__ = Access to monetization features disabled
__1__ = Access to monetization features enabled by the game for this mod
__2__ = Marketplace enabled
__8__ = Quantity of this mod is limited
__?__ = Combine to find mods with multiple options enabled (see [BITWISE fields](#bitwise-and-bitwise-and)) - name|string|Name of the mod. - name_id|string|Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/__mod-name-id-here__ - modfile|integer|Unique id of the file that is the current active release (see [mod files](#files)). - metadata_blob|string|Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. As an example, this may include properties as to how the item works, or other information you need to display. Metadata can also be stored as searchable [key value pairs](#metadata), and to individual [mod files](#get-modfiles). - metadata_kvp|string|Colon-separated values representing the key-value pairs you want to filter the results by. If you supply more than one key-pair, separate the pairs by a comma. Will only filter by an exact key-pair match. - tags|string|Comma-separated values representing the tags you want to filter the results by. If you specify multiple tags, only mods which have all tags will be returned, and only tags that are supported by the parent game can be applied. To determine what tags are eligible, see the tags values within `tag_options` column on the parent [Game Object](#game-object). If you want to ensure mods returned do not contain particular tag(s), you can use the `tags-not-in` filter either independently or alongside this filter. - platform_status|string|If the parent game has enabled per-platform files, by default only mods with files which are approved and live for the [target platform](#targeting-a-platform) will be returned.

To QA mods with pending files, you can filter results by their current platform status, using `pending_only` or `live_and_pending`.

__NOTE:__ only game admins can filter by this field. - revenue_type|integer|Finds all mods with or without a price. Defaults to free.

__0__ = Free
__1__ = Paid
__2__ = Free and Paid - stock|integer|Finds all mods that are in/out of stock.

__0__ = Sold Out
__1__ = In Stock - - Sort|Description - ---|--- - downloads|Sort results by most downloads using [_sort filter](#filtering) parameter, value should be `downloads` for descending or `-downloads` for ascending results. - popular|Sort results by popularity using [_sort filter](#filtering), value should be `popular` for descending or `-popular` for ascending results.

__NOTE:__ Popularity is calculated hourly and reset daily (results are ranked from 1 to X). You should sort this column in ascending order `-popular` to get the top ranked results. - rating|Sort results by weighted rating using [_sort filter](#filtering), value should be `rating` for descending or `-rating` for ascending results. - subscribers|Sort results by most subscribers using [_sort filter](#filtering), value should be `subscribers` for descending or `-subscribers` for ascending results. +Delete a guide. Successful request will return `204 No Content`. > Example response ```json -{ - "data": [ - { - "id": 2, - "game_id": 2, - "status": 1, - "visible": 1, - "submitted_by": { - "id": 1, - "name_id": "xant", - "username": "XanT", - "display_name_portal": null, - "date_online": 1509922961, - "date_joined": 1509922961, - "avatar": { - "filename": "avatar.png", - "original": "https://assets.modcdn.io/images/placeholder/avatar.png", - "thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png", - "thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png" - }, - "timezone": "", - "language": "", - "profile_url": "https://mod.io/u/xant" - }, - "date_added": 1492564103, - "date_updated": 1499841487, - "date_live": 1499841403, - "maturity_option": 0, - "community_options": 3, - "monetization_options": 0, - "stock": 0, - "price": 0, - "tax": 0, - "logo": { - "filename": "card.png", - "original": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" - }, - "homepage_url": "https://www.rogue-hdpack.com/", - "name": "Rogue Knight HD Pack", - "name_id": "rogue-knight-hd-pack", - "summary": "It's time to bask in the glory of beautiful 4k textures!", - "description": "

Rogue HD Pack does exactly what you thi...", - "description_plaintext": "Rogue HD Pack does exactly what you thi...", - "metadata_blob": "rogue,hd,high-res,4k,hd textures", - "profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack", - "media": { - "youtube": [ - "https://www.youtube.com/watch?v=dQw4w9WgXcQ" - ], - "sketchfab": [ - "https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8" - ], - "images": [ - { - "filename": "card.png", - "original": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" - } - ] - }, - "modfile": { - "id": 2, - "mod_id": 2, - "date_added": 1499841487, - "date_updated": 1499841487, - "date_scanned": 1499841487, - "virus_status": 0, - "virus_positive": 0, - "virustotal_hash": "", - "filesize": 15181, - "filesize_uncompressed": 16384, - "filehash": { - "md5": "2d4a0e2d7273db6b0a94b0740a88ad0d" - }, - "filename": "rogue-knight-v1.zip", - "version": "1.3", - "changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.", - "metadata_blob": "rogue,hd,high-res,4k,hd textures", - "download": { - "binary_url": "https://*.modapi.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294", - "date_expires": 1579316848 - }, - "platforms": [ - { - "platform": "windows", - "status": 1 - } - ] - }, - "dependencies": false, - "platforms": [ - { - "platform": "windows", - "modfile_live": 1 - } - ], - "metadata_kvp": [ - { - "metakey": "pistol-dmg", - "metavalue": "800" - } - ], - "tags": [ - { - "name": "Unity", - "name_localized": "Unity", - "date_added": 1499841487 - } - ], - "stats": { - "mod_id": 2, - "popularity_rank_position": 13, - "popularity_rank_total_mods": 204, - "downloads_today": 327, - "downloads_total": 27492, - "subscribers_total": 16394, - "ratings_total": 1230, - "ratings_positive": 1047, - "ratings_negative": 183, - "ratings_percentage_positive": 91, - "ratings_weighted_aggregate": 87.38, - "ratings_display_text": "Very Positive", - "date_expires": 1492564103 - } - }, - { - ... - } - ], - "result_count": 70, - "result_offset": 0, - "result_limit": 100, - "result_total": 70 -} + 204 No Content + ``` -

Cross-Platform Filtering

- -If the parent game has platform filtering enabled, this endpoint supports the [targeting a platform](#targeting-a-platform) request header to return mods that have been approved for the requested platform. If you are a member of the parent game team, please see the `platform_status` filter for this endpoint above on how you can retrieve pending mods. - -

Responses

+

Responses

Status|Meaning|Error Ref|Description|Response Schema ---|---|----|---|---| -200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)||Successful Request|[Get Mods](#schemaget_mods) -403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|15025|The authenticated user has applied an admin-only filter or value to the request, and is not an administrator for this game.|[Error Object](#schemaerror_object) +204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)||Successful Request. No Body Returned.|None +403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|14028|The authenticated user does not have permission to delete guides to this game. Ensure the user is part of the game team before attempting the request again.|[Error Object](#schemaerror_object) +403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|14031|The guide cannot be deleted due to the request originating from a non-site admin whilst there is a DMCA report active against the guide.|[Error Object](#schemaerror_object) -## Get Mod +## Get Guides Tags > Example request ```shell # You can also use wget -curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey \ +curl -X GET https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey \ -H 'Accept: application/json' ``` ```http -GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey HTTP/1.1 +GET https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey HTTP/1.1 Host: *.modapi.io Accept: application/json @@ -5074,7 +5232,7 @@ var headers = { }; $.ajax({ - url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}', + url: 'https://*.modapi.io/v1/games/{game-id}/guides/tags', method: 'get', data: '?api_key=YourApiKey', headers: headers, @@ -5092,7 +5250,7 @@ const headers = { }; -fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey', +fetch('https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey', { method: 'GET', @@ -5111,7 +5269,7 @@ headers = { 'Accept': 'application/json' } -r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}', params={ +r = requests.get('https://*.modapi.io/v1/games/{game-id}/guides/tags', params={ 'api_key': 'YourApiKey' }, headers = headers) @@ -5119,7 +5277,7 @@ print r.json() ``` ```java -URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey"); +URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); @@ -5134,438 +5292,46 @@ in.close(); System.out.println(response.toString()); ``` -`GET /games/{game-id}/mods/{mod-id}` +`GET /games/{game-id}/guides/tags` -Get a mod. Successful request will return a single [Mod Object](#mod-object). +Get all guide tags for a game. Successful request will return an array of [Guide Tag Objects](#get-guide-tags). > Example response -```json -{ - "id": 2, - "game_id": 2, - "status": 1, - "visible": 1, - "submitted_by": { - "id": 1, - "name_id": "xant", - "username": "XanT", - "display_name_portal": null, - "date_online": 1509922961, - "date_joined": 1509922961, - "avatar": { - "filename": "avatar.png", - "original": "https://assets.modcdn.io/images/placeholder/avatar.png", - "thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png", - "thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png" - }, - "timezone": "", - "language": "", - "profile_url": "https://mod.io/u/xant" - }, - "date_added": 1492564103, - "date_updated": 1499841487, - "date_live": 1499841403, - "maturity_option": 0, - "community_options": 3, - "monetization_options": 0, - "stock": 0, - "price": 0, - "tax": 0, - "logo": { - "filename": "card.png", - "original": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" - }, - "homepage_url": "https://www.rogue-hdpack.com/", - "name": "Rogue Knight HD Pack", - "name_id": "rogue-knight-hd-pack", - "summary": "It's time to bask in the glory of beautiful 4k textures!", - "description": "

Rogue HD Pack does exactly what you thi...", - "description_plaintext": "Rogue HD Pack does exactly what you thi...", - "metadata_blob": "rogue,hd,high-res,4k,hd textures", - "profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack", - "media": { - "youtube": [ - "https://www.youtube.com/watch?v=dQw4w9WgXcQ" - ], - "sketchfab": [ - "https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8" - ], - "images": [ - { - "filename": "card.png", - "original": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" - } - ] - }, - "modfile": { - "id": 2, - "mod_id": 2, - "date_added": 1499841487, - "date_updated": 1499841487, - "date_scanned": 1499841487, - "virus_status": 0, - "virus_positive": 0, - "virustotal_hash": "", - "filesize": 15181, - "filesize_uncompressed": 16384, - "filehash": { - "md5": "2d4a0e2d7273db6b0a94b0740a88ad0d" - }, - "filename": "rogue-knight-v1.zip", - "version": "1.3", - "changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.", - "metadata_blob": "rogue,hd,high-res,4k,hd textures", - "download": { - "binary_url": "https://*.modapi.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294", - "date_expires": 1579316848 - }, - "platforms": [ - { - "platform": "windows", - "status": 1 - } - ] - }, - "dependencies": false, - "platforms": [ - { - "platform": "windows", - "modfile_live": 1 - } - ], - "metadata_kvp": [ - { - "metakey": "pistol-dmg", - "metavalue": "800" - } - ], - "tags": [ - { - "name": "Unity", - "name_localized": "Unity", - "date_added": 1499841487 - } - ], - "stats": { - "mod_id": 2, - "popularity_rank_position": 13, - "popularity_rank_total_mods": 204, - "downloads_today": 327, - "downloads_total": 27492, - "subscribers_total": 16394, - "ratings_total": 1230, - "ratings_positive": 1047, - "ratings_negative": 183, - "ratings_percentage_positive": 91, - "ratings_weighted_aggregate": 87.38, - "ratings_display_text": "Very Positive", - "date_expires": 1492564103 - } -} - -``` -

Cross-Platform Filtering

- -If the parent game has platform filtering enabled, this endpoint supports the [targeting a platform](#targeting-a-platform) request header to return the [modfile](#modfile-object) within the [Mod Object](#mod-object) for the requested platform. If the request targets a platform that is invalid, the `modfile` field will be an empty object `{}`. - -

Responses

- -Status|Meaning|Error Ref|Description|Response Schema ----|---|----|---|---| -200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)||Successful Request|[Mod Object](#schemamod_object) - -## Add Mod - -> Example request - -```shell -# You can also use wget -curl -X POST https://*.modapi.io/v1/games/{game-id}/mods \ - -H 'Authorization: Bearer {access-token}' \ - -H 'Content-Type: multipart/form-data' \ - -H 'Accept: application/json' \ - -F 'name=Graphics Overhaul Mod' \ - -F 'name_id=graphics-overhaul-mod' \ - -F 'summary=Short descriptive summary here' \ - -F 'description=

Getting started with..' \ - -F 'logo=@/path/to/image.jpg' \ - -F 'homepage_url=https://www.example.com' \ - -F 'metadata_blob={"version_sig":"YXJlbnQgeW91IGlucXVpc2l0dmU="}' \ - -F 'tags[]=easy' - -``` - -```http -POST https://*.modapi.io/v1/games/{game-id}/mods HTTP/1.1 -Host: *.modapi.io -Content-Type: multipart/form-data -Accept: application/json -Authorization: Bearer {access-token} - -``` - -```javascript -var headers = { - 'Authorization':'Bearer {access-token}', - 'Content-Type':'multipart/form-data', - 'Accept':'application/json' - -}; - -$.ajax({ - url: 'https://*.modapi.io/v1/games/{game-id}/mods', - method: 'post', - - headers: headers, - success: function(data) { - console.log(JSON.stringify(data)); - } -}) -``` - -```javascript--nodejs -const request = require('node-fetch'); -const inputBody = '{ - "name": "Graphics Overhaul Mod", - "name_id": "graphics-overhaul-mod", - "summary": "Short descriptive summary here", - "description": "

Getting started with..", - "logo": "@/path/to/image.jpg", - "homepage_url": "https://www.example.com", - "metadata_blob": "{\"version_sig\":\"YXJlbnQgeW91IGlucXVpc2l0dmU=\"}", - "tags": "easy" -}'; -const headers = { - 'Authorization':'Bearer {access-token}', - 'Content-Type':'multipart/form-data', - 'Accept':'application/json' - -}; - -fetch('https://*.modapi.io/v1/games/{game-id}/mods', -{ - method: 'POST', - body: inputBody, - headers: headers -}) -.then(function(res) { - return res.json(); -}).then(function(body) { - console.log(body); -}); -``` - -```python -import requests -headers = { - 'Authorization': 'Bearer {access-token}', - 'Content-Type': 'multipart/form-data', - 'Accept': 'application/json' -} - -r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods', params={ - -}, headers = headers) - -print r.json() -``` - -```java -URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("POST"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); -``` - -`POST /games/{game-id}/mods` - -Add a mod. Successful request will return the newly created [Mod Object](#mod-object). All content published by users on [mod.io](https://mod.io) is subject to the [Terms of Use](https://mod.io/terms/widget). It is a requirement that you provide a link to [https://mod.io/terms](https://mod.io/terms) in any place where users are submitting content to mod.io. - - __NOTE:__ By default new mods are 'not accepted' and 'public'. They can only be 'accepted' and made available via the API once a [Mod File](#add-modfile) has been uploaded. [Media](#add-mod-media), [Metadata Key Value Pairs](#add-mod-kvp-metadata) and [Dependencies](#add-mod-dependencies) can also be added after a mod profile is created. - - Parameter|Type|Required|Description - ---|---|---|---| - logo|file|true|Image file which will represent your mods logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. - name|string|true|Name of your mod. - name_id|string||Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/__mod-name-id-here__. If no `name_id` is specified the `name` will be used. For example: _'Stellaris Shader Mod'_ will become _'stellaris-shader-mod'_. Cannot exceed 50 characters. - summary|string|true|Summary for your mod, giving a brief overview of what it's about. Cannot exceed 250 characters. - visible|integer||Visibility of the mod (best if this field is controlled by mod admins, see [status and visibility](#status-amp-visibility) for details):

__0__ = Hidden
__1__ = Public _(default)_ - description|string||Detailed description for your mod, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. - homepage_url|string||Official homepage for your mod. Must be a valid URL. - price|int||The price of the mod.

__NOTE:__ The value of this field will be ignored if the parent game's queue is enabled (see `curation_option` field in [Game Object](#game-object)). - stock|integer||Maximum number of times this mod can be sold.

__NOTE:__ Limited mods can be enforced by the parent game. The value of this field is not used if the parent game's or mod's limited support is disabled (see `monetization_options` field in [Game Object](#game-object)). - maturity_option|integer||Mature content found in this mod.

__NOTE:__ The value of this field will default to 0 unless the parent game allows you to flag mature content (see `maturity_options` field in [Game Object](#game-object)).

__0__ = None _(default)_
__1__ = Alcohol
__2__ = Drugs
__4__ = Violence
__8__ = Explicit
__?__ = Add the options you want together, to enable multiple options (see [BITWISE fields](#bitwise-and-bitwise-and)) - community_options|integer||Community features enabled for this mod:

__0__ = All the options below are disabled
__1__ = Enable comments
__64__ = Enable previews
__128__ = Enable preview URLs
__1024__ = Allow dependencies
__?__ = Add the options you want together, to enable multiple options (see [BITWISE fields](#bitwise-and-bitwise-and)) - metadata_blob|string||Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. As an example, this may include properties as to how the item works, or other information you need to display. Metadata can also be stored as searchable [key value pairs](#metadata), and to individual [mod files](#get-modfiles). - tags[]|string||Tags to apply to the mod. Every tag to apply requires a separate field with tags[] as the key (e.g. tags[]=tag1, tags[]=tag2). Only the tags pre-defined by the parent game can be applied. To determine what tags are eligible, see the tags values within `tag_options` column on the parent [Game Object](#game-object). - -> Example response - -```json -{ - "id": 2, - "game_id": 2, - "status": 1, - "visible": 1, - "submitted_by": { - "id": 1, - "name_id": "xant", - "username": "XanT", - "display_name_portal": null, - "date_online": 1509922961, - "date_joined": 1509922961, - "avatar": { - "filename": "avatar.png", - "original": "https://assets.modcdn.io/images/placeholder/avatar.png", - "thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png", - "thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png" - }, - "timezone": "", - "language": "", - "profile_url": "https://mod.io/u/xant" - }, - "date_added": 1492564103, - "date_updated": 1499841487, - "date_live": 1499841403, - "maturity_option": 0, - "community_options": 3, - "monetization_options": 0, - "stock": 0, - "price": 0, - "tax": 0, - "logo": { - "filename": "card.png", - "original": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" - }, - "homepage_url": "https://www.rogue-hdpack.com/", - "name": "Rogue Knight HD Pack", - "name_id": "rogue-knight-hd-pack", - "summary": "It's time to bask in the glory of beautiful 4k textures!", - "description": "

Rogue HD Pack does exactly what you thi...", - "description_plaintext": "Rogue HD Pack does exactly what you thi...", - "metadata_blob": "rogue,hd,high-res,4k,hd textures", - "profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack", - "media": { - "youtube": [ - "https://www.youtube.com/watch?v=dQw4w9WgXcQ" - ], - "sketchfab": [ - "https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8" - ], - "images": [ - { - "filename": "card.png", - "original": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png", - "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" - } - ] - }, - "modfile": { - "id": 2, - "mod_id": 2, - "date_added": 1499841487, - "date_updated": 1499841487, - "date_scanned": 1499841487, - "virus_status": 0, - "virus_positive": 0, - "virustotal_hash": "", - "filesize": 15181, - "filesize_uncompressed": 16384, - "filehash": { - "md5": "2d4a0e2d7273db6b0a94b0740a88ad0d" - }, - "filename": "rogue-knight-v1.zip", - "version": "1.3", - "changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.", - "metadata_blob": "rogue,hd,high-res,4k,hd textures", - "download": { - "binary_url": "https://*.modapi.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294", - "date_expires": 1579316848 - }, - "platforms": [ - { - "platform": "windows", - "status": 1 - } - ] - }, - "dependencies": false, - "platforms": [ +```json +{ + "data": [ { - "platform": "windows", - "modfile_live": 1 - } - ], - "metadata_kvp": [ + "name": "Instructions", + "date_added": 1499841487, + "count": 22 + }, { - "metakey": "pistol-dmg", - "metavalue": "800" - } - ], - "tags": [ + ... + }, { - "name": "Unity", - "name_localized": "Unity", - "date_added": 1499841487 + ... } ], - "stats": { - "mod_id": 2, - "popularity_rank_position": 13, - "popularity_rank_total_mods": 204, - "downloads_today": 327, - "downloads_total": 27492, - "subscribers_total": 16394, - "ratings_total": 1230, - "ratings_positive": 1047, - "ratings_negative": 183, - "ratings_percentage_positive": 91, - "ratings_weighted_aggregate": 87.38, - "ratings_display_text": "Very Positive", - "date_expires": 1492564103 - } + "result_count": 70, + "result_offset": 0, + "result_limit": 100, + "result_total": 70 } + ``` -

Responses

+

Responses

Status|Meaning|Error Ref|Description|Response Schema ---|---|----|---|---| -201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)||Resource Created|[Mod Object](#schemamod_object) -422|[Unprocessable Entity](https://tools.ietf.org/html/rfc2518#section-10.3)|900011|Your marketplace amount is not within the minimum or maximum amount allowed.|[Error Object](#schemaerror_object) -403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|15012|The authenticated user has had upload privileges restricted by mod.io admins, this is typically due to spam.|[Error Object](#schemaerror_object) -### Response Headers - -Status|Header|Type|Format|Description ----|---|---|---|---| -201|Location|string||URL to newly created resource - +200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)||Successful Request|[Get Guide Tags](#schemaget_guide_tags) +# Mods + ## Edit Mod > Example request @@ -5831,6 +5597,7 @@ Edit details for a mod. If you want to update the `logo` or media associated wit } } + ```

Responses

@@ -5951,6 +5718,7 @@ Delete a mod profile. Successful request will return `204 No Content` and fire a ```json 204 No Content + ```

Responses

@@ -6106,6 +5874,9 @@ Get all files that are published for the corresponding mod. Successful request w } ] }, + { + ... + }, { ... } @@ -6116,6 +5887,7 @@ Get all files that are published for the corresponding mod. Successful request w "result_total": 70 } + ```

Cross-Platform Filtering

@@ -6253,6 +6025,7 @@ Get a file. Successful request will return a single [Modfile Object](#modfile-ob ] } + ```

Responses

@@ -6423,6 +6196,7 @@ Upload a file for the corresponding mod. Successful request will return the newl ] } + ```

Cross-Platform Filtering

@@ -6585,6 +6359,7 @@ Edit the details of a published file. If you want to update fields other than th ] } + ```

Cross-Platform Filtering

@@ -6705,6 +6480,7 @@ Delete a modfile. Successful request will return `204 No Content`.

__NOTE ```json 204 No Content + ```

Responses

@@ -6857,6 +6633,7 @@ Manage the platform status of a particular modfile. This endpoint does not set a ] } + ```

Responses

@@ -6976,6 +6753,9 @@ Get all uploaded parts for a corresponding upload session. Successful request wi "part_size": 52428800, "date_added": 1499846132 }, + { + ... + }, { ... } @@ -6986,6 +6766,7 @@ Get all uploaded parts for a corresponding upload session. Successful request wi "result_total": 70 } + ```

Responses

@@ -7122,6 +6903,7 @@ Add a new multipart upload part to an [existing upload session](#create-multipar "date_added": 1499846132 } + ```

Responses

@@ -7264,6 +7046,7 @@ Create a new multipart upload session. A successful request will return a single "status": 0 } + ```

Responses

@@ -7377,6 +7160,7 @@ Terminate an active multipart upload session, a successful request will return ` ```json 204 No Content + ```

Responses

@@ -7491,6 +7275,9 @@ Get all upload sessions belonging to the authenticated user for the correspondin "upload_id": "123e4567-e89b-12d3-a456-426614174000", "status": 0 }, + { + ... + }, { ... } @@ -7501,6 +7288,7 @@ Get all upload sessions belonging to the authenticated user for the correspondin "result_total": 70 } + ```

Responses

@@ -7616,6 +7404,7 @@ Complete an active multipart upload session, this endpoint assumes that you have "status": 0 } + ```

Responses

@@ -7867,6 +7656,7 @@ Subscribe the _authenticated user_ to a corresponding mod. No body parameters ar } } + ```

Responses

@@ -8248,6 +8039,7 @@ Get all comments posted in the guides profile. Successful request will return an "result_total": 1 } + ```

Responses

@@ -8401,6 +8193,7 @@ Add a comment for the corresponding guide. Successful request will return the ne "options": 0 } + ```

Responses

@@ -8542,6 +8335,7 @@ Get a Guide Comment. Successful request will return a single [Comment Object](#c "options": 0 } + ```

Responses

@@ -8692,6 +8486,7 @@ Update a comment for the corresponding guide. Successful request will return the "options": 0 } + ```

Responses

@@ -8807,6 +8602,7 @@ Delete a comment from a guide profile. Successful request will return `204 No Co ```json 204 No Content + ```

Responses

@@ -8958,6 +8754,7 @@ Update the Karma rating in single increments or decrements for a corresponding g "options": 0 } + ```

Responses

@@ -9112,6 +8909,7 @@ Get all comments posted in the mods profile. Successful request will return an a "result_total": 1 } + ```

Responses

@@ -9265,6 +9063,7 @@ Add a comment for the corresponding mod. Successful request will return the newl "options": 0 } + ```

Responses

@@ -9406,6 +9205,7 @@ Get a Mod Comment. Successful request will return a single [Comment Object](#com "options": 0 } + ```

Responses

@@ -9556,6 +9356,7 @@ Update a comment for the corresponding mod. Successful request will return the u "options": 0 } + ```

Responses

@@ -9671,6 +9472,7 @@ Delete a comment from a mod profile. Successful request will return `204 No Cont ```json 204 No Content + ```

Responses

@@ -9822,6 +9624,7 @@ Update the Karma rating in single increments or decrements for a corresponding m "options": 0 } + ```

Responses

@@ -9954,6 +9757,7 @@ Upload new media to a game. The request `Content-Type` header __must__ be `multi "message": "You have successfully added new media to the specified game profile." } + ```

Responses

@@ -10093,6 +9897,7 @@ This endpoint is very flexible and will add any images posted to the mods galler "message": "You have successfully added new media to the specified mod." } + ```

Responses

@@ -10229,6 +10034,7 @@ Delete images, sketchfab or youtube links from a mod profile. Successful request ```json 204 No Content + ```

Responses

@@ -10359,6 +10165,7 @@ Reorder images, sketchfab or youtube links from a mod profile. Successful reques ```json 204 No Content + ```

Responses

@@ -10487,6 +10294,9 @@ Get all mods events for the corresponding game sorted by latest event first. Suc "date_added": 1499846132, "event_type": "MODFILE_CHANGED" }, + { + ... + }, { ... } @@ -10497,6 +10307,7 @@ Get all mods events for the corresponding game sorted by latest event first. Suc "result_total": 70 } + ```

Responses

@@ -10609,6 +10420,9 @@ Get the event log for a mod, showing changes made sorted by latest event first. "date_added": 1499846132, "event_type": "MODFILE_CHANGED" }, + { + ... + }, { ... } @@ -10619,6 +10433,7 @@ Get the event log for a mod, showing changes made sorted by latest event first. "result_total": 70 } + ```

Responses

@@ -10753,6 +10568,9 @@ Get all tags for the corresponding game, that can be applied to any of its mods. "hidden": false, "locked": false }, + { + ... + }, { ... } @@ -10763,6 +10581,7 @@ Get all tags for the corresponding game, that can be applied to any of its mods. "result_total": 70 } + ```

Responses

@@ -10878,6 +10697,9 @@ Get all tags for the corresponding mod. Successful request will return an array "name_localized": "Unity", "date_added": 1499841487 }, + { + ... + }, { ... } @@ -10888,6 +10710,7 @@ Get all tags for the corresponding mod. Successful request will return an array "result_total": 70 } + ```

Responses

@@ -11012,6 +10835,7 @@ Add tags to a mod's profile. You can only add tags allowed by the parent game, w "message": "Your request was successful." } + ```

Responses

@@ -11140,6 +10964,7 @@ Delete tags from a mod's profile. Deleting tags is identical to adding tags exce ```json 204 No Content + ```

Responses

@@ -11269,6 +11094,7 @@ Submit a positive or negative rating for a mod. Each user can supply only one ra "message": "You have successfully submitted a rating for the specified mod." } + ```

Responses

@@ -11386,6 +11212,7 @@ Get game stats for the corresponding game. Successful request will return a sing "date_expires": 1492564103 } + ```

Responses

@@ -11518,6 +11345,9 @@ Get all mod stats for mods of the corresponding game. Successful request will re "ratings_display_text": "Very Positive", "date_expires": 1492564103 }, + { + ... + }, { ... } @@ -11528,6 +11358,7 @@ Get all mod stats for mods of the corresponding game. Successful request will re "result_total": 70 } + ```

Responses

@@ -11647,6 +11478,7 @@ Get mod stats for the corresponding mod. Successful request will return a single "date_expires": 1492564103 } + ```

Responses

@@ -11758,6 +11590,9 @@ Get all metadata stored by the game developer for this mod as searchable key val "metakey": "pistol-dmg", "metavalue": "800" }, + { + ... + }, { ... } @@ -11768,6 +11603,7 @@ Get all metadata stored by the game developer for this mod as searchable key val "result_total": 70 } + ```

Responses

@@ -11894,6 +11730,7 @@ Add metadata for this mod as searchable key value pairs. Metadata is useful to d "message": "You have successfully added new key-value metadata to the specified mod." } + ```

Responses

@@ -12022,6 +11859,7 @@ Delete key value pairs metadata defined for this mod. Successful request will re ```json 204 No Content + ```

Responses

@@ -12186,6 +12024,9 @@ Get all dependencies the chosen mod has selected. This is useful if a mod requir ] } }, + { + ... + }, { ... } @@ -12196,6 +12037,7 @@ Get all dependencies the chosen mod has selected. This is useful if a mod requir "result_total": 70 } + ```

Responses

@@ -12320,6 +12162,7 @@ Add mod dependencies required by the corresponding mod. A dependency is a mod th "message": "You have successfully added new dependencies to the specified mod." } + ```

Responses

@@ -12448,6 +12291,7 @@ Delete mod dependencies the corresponding mod has selected. Successful request w ```json 204 No Content + ```

Responses

@@ -12572,6 +12416,9 @@ Get all mods depending on the given mod. Successful request will return an array "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" } }, + { + ... + }, { ... } @@ -12582,6 +12429,7 @@ Get all mods depending on the given mod. Successful request will return an array "result_total": 70 } + ```

Responses

@@ -12722,6 +12570,9 @@ Get all users that are part of a mod team. Successful request will return an arr "position": "Turret Builder", "invite_pending": 1 }, + { + ... + }, { ... } @@ -12732,6 +12583,7 @@ Get all users that are part of a mod team. Successful request will return an arr "result_total": 70 } + ```

Responses

@@ -12894,6 +12746,7 @@ The purpose of this endpoint is enable users to report a resource (game, mod or "message": "You have successfully submitted a report and it will be reviewed by the mod.io team as soon as possible." } + ```

Responses

@@ -13053,6 +12906,7 @@ Get the current agreement (version) by type. Successful request will return a si "description": "Privacy Agreement - 20/11/2020....." } + ```

Responses

@@ -13186,6 +13040,7 @@ Get the specified agreement version. Successful request will return an [Agreemen "description": "Privacy Agreement - 20/11/2020....." } + ```

Responses

@@ -13300,6 +13155,7 @@ Mute a user. This will prevent mod.io from returning mods to you authored by the ```json 204 No Content + ```

Responses

@@ -13412,6 +13268,7 @@ Unmute a previously muted user. This will re-enable mod.io to returning mods to ```json 204 No Content + ```

Responses

@@ -13541,6 +13398,7 @@ Get the _authenticated user_ details. Successful request will return a single [U "profile_url": "https://mod.io/u/xant" } + ```

Responses

@@ -13663,6 +13521,9 @@ __Deprecated__: This endpoint is deprecated for in-game use and will be removed "date_added": 1499846132, "event_type": "USER_SUBSCRIBE" }, + { + ... + }, { ... } @@ -13673,6 +13534,7 @@ __Deprecated__: This endpoint is deprecated for in-game use and will be removed "result_total": 70 } + ```

Responses

@@ -13830,6 +13692,9 @@ Get all modfiles the _authenticated user_ uploaded. Successful request will retu } ] }, + { + ... + }, { ... } @@ -13840,6 +13705,7 @@ Get all modfiles the _authenticated user_ uploaded. Successful request will retu "result_total": 70 } + ```

Responses

@@ -14078,6 +13944,9 @@ Get all games the _authenticated user_ added or is a team member of. Successful } ] }, + { + ... + }, { ... } @@ -14088,6 +13957,7 @@ Get all games the _authenticated user_ added or is a team member of. Successful "result_total": 70 } + ```

Responses

@@ -14352,6 +14222,9 @@ Get all mod's the _authenticated user_ is subscribed to. Successful request will "date_expires": 1492564103 } }, + { + ... + }, { ... } @@ -14362,6 +14235,7 @@ Get all mod's the _authenticated user_ is subscribed to. Successful request will "result_total": 70 } + ```

Cross-Platform Filtering

@@ -14630,6 +14504,9 @@ Get all mods the _authenticated user_ added or is a team member of. Successful r "date_expires": 1492564103 } }, + { + ... + }, { ... } @@ -14640,6 +14517,7 @@ Get all mods the _authenticated user_ added or is a team member of. Successful r "result_total": 70 } + ```

Responses

@@ -14900,6 +14778,9 @@ Get all mod's the _authenticated user_ has purchased. Successful request will re "date_expires": 1492564103 } }, + { + ... + }, { ... } @@ -14910,6 +14791,7 @@ Get all mod's the _authenticated user_ has purchased. Successful request will re "result_total": 70 } + ```

Cross-Platform Filtering

@@ -15041,6 +14923,9 @@ Get all users muted by the _authenticated user_. Successful request will return "language": "", "profile_url": "https://mod.io/u/xant" }, + { + ... + }, { ... } @@ -15051,6 +14936,7 @@ Get all users muted by the _authenticated user_. Successful request will return "result_total": 1 } + ```

Responses

@@ -15174,6 +15060,9 @@ Get all mod rating's submitted by the _authenticated user_. Successful request w "rating": -1, "date_added": 1492564103 }, + { + ... + }, { ... } @@ -15184,6 +15073,7 @@ Get all mod rating's submitted by the _authenticated user_. Successful request w "result_total": 70 } + ```

Responses

@@ -15305,6 +15195,7 @@ Get the _authenticated user_ wallets. Successful request will return a single [W "monetization_status": 1 } + ```

Responses

@@ -15451,6 +15342,7 @@ Get the user that is the original _submitter_ of a resource. Successful request "profile_url": "https://mod.io/u/xant" } + ```

Responses

@@ -15560,6 +15452,7 @@ Ping the mod.io API for purpose of a reachability check, successful request will "message": "You have successfully logged out of mod.io." } + ```

Responses

@@ -15716,6 +15609,9 @@ Get a games Embeddable Mod Hub (EMH) config. This will return all of the configu {} ] }, + { + ... + }, { ... } @@ -15726,6 +15622,7 @@ Get a games Embeddable Mod Hub (EMH) config. This will return all of the configu "result_total": 70 } + ```

Responses

@@ -15880,6 +15777,7 @@ Get a games Embeddable Mod Hub (EMH) config. This will return all of the configu ] } + ```

Responses

@@ -16004,6 +15902,7 @@ Get all token packs for a game. Successful request will return a [Game Token Pac "date_updated": 1492564103 } + ```

Responses

@@ -16270,6 +16169,7 @@ Purchase a mod. A Successful request will return the newly created [Pay Object]( } } + ```

Responses

@@ -16407,6 +16307,7 @@ Get users in a monetization team. Successful request will return a [Monetization "split": 0 } + ```

Responses

@@ -16532,6 +16433,7 @@ Send a request to create a monetization team for a mod team. Successful request "split": 0 } + ```

Responses

@@ -16695,6 +16597,7 @@ Create a service-to-service (S2S) transaction intent. This is for performing an "purchase_date": 1626667557 } + ```

Responses

@@ -16838,6 +16741,7 @@ Create a service-to-service (S2S) transaction commit. This is for performing an "purchase_date": 1626667557 } + ```

Responses

@@ -16987,6 +16891,7 @@ Create a service-to-service (S2S) transaction clawback. This is for unwinding a "purchase_date": null } + ```

Responses

@@ -17102,6 +17007,7 @@ Disconnect a mod.io user from a linked studio user. This will completely remove ```json 204 No Content + ```

Responses

@@ -17958,6 +17864,9 @@ date_added|integer|Unix timestamp of the date the user was registered as a previ {} ] }, + { + ... + }, { ... } @@ -18056,6 +17965,9 @@ result_total|integer|Number of entitlements mod.io was able to retrieve that can "hidden": false, "locked": false }, + { + ... + }, { ... } @@ -18182,6 +18094,9 @@ result_total|integer|Total number of results found. } ] }, + { + ... + }, { ... } @@ -18274,6 +18189,9 @@ result_total|integer|Total number of results found. "date_added": 1499841487, "count": 22 }, + { + ... + }, { ... } @@ -18356,6 +18274,9 @@ result_total|integer|Total number of results found. } ] }, + { + ... + }, { ... } @@ -18459,6 +18380,9 @@ result_total|integer|Total number of results found. "thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png" } }, + { + ... + }, { ... } @@ -18535,6 +18459,9 @@ result_total|integer|Total number of results found. ] } }, + { + ... + }, { ... } @@ -18572,6 +18499,9 @@ result_total|integer|Total number of results found. "date_added": 1499846132, "event_type": "MODFILE_CHANGED" }, + { + ... + }, { ... } @@ -18606,6 +18536,9 @@ result_total|integer|Total number of results found. "metakey": "pistol-dmg", "metavalue": "800" }, + { + ... + }, { ... } @@ -18651,6 +18584,9 @@ result_total|integer|Total number of results found. "ratings_display_text": "Very Positive", "date_expires": 1492564103 }, + { + ... + }, { ... } @@ -18686,6 +18622,9 @@ result_total|integer|Total number of results found. "name_localized": "Unity", "date_added": 1499841487 }, + { + ... + }, { ... } @@ -18745,6 +18684,9 @@ result_total|integer|Total number of results found. } ] }, + { + ... + }, { ... } @@ -18902,6 +18844,9 @@ result_total|integer|Total number of results found. "date_expires": 1492564103 } }, + { + ... + }, { ... } @@ -18938,6 +18883,9 @@ result_total|integer|Total number of results found. "part_size": 52428800, "date_added": 1499846132 }, + { + ... + }, { ... } @@ -18972,6 +18920,9 @@ result_total|integer|Total number of results found. "upload_id": "123e4567-e89b-12d3-a456-426614174000", "status": 0 }, + { + ... + }, { ... } @@ -19019,6 +18970,9 @@ result_total|integer|Total number of results found. "language": "", "profile_url": "https://mod.io/u/xant" }, + { + ... + }, { ... } @@ -19073,6 +19027,9 @@ result_total|integer|Total number of results found. "position": "Turret Builder", "invite_pending": 1 }, + { + ... + }, { ... } @@ -19111,6 +19068,9 @@ result_total|integer|Total number of results found. "date_added": 1499846132, "event_type": "USER_SUBSCRIBE" }, + { + ... + }, { ... } @@ -19147,6 +19107,9 @@ result_total|integer|Total number of results found. "rating": -1, "date_added": 1492564103 }, + { + ... + }, { ... }