Mod portal API: Difference between revisions
Line 123: | Line 123: | ||
|- | |- | ||
| 10 || Trademark Use || This license explicitly states that it does NOT grant you trademark rights, even though licenses without such a statement probably do not grant you any implicit trademark rights. | | 10 || Trademark Use || This license explicitly states that it does NOT grant you trademark rights, even though licenses without such a statement probably do not grant you any implicit trademark rights. | ||
|} | |||
=== Media File === | |||
{| class="wikitable" | |||
! Key !! Type !! Description | |||
|- | |||
| id || Integer || | |||
|- | |||
| width || Integer || | |||
|- | |||
| height || Integer || | |||
|- | |||
| size || Integer || | |||
|- | |||
| urls || Object || | |||
|} | |} | ||
{{Languages}}[[Category:Technical]] | {{Languages}}[[Category:Technical]] |
Revision as of 18:28, 26 January 2017
The Mod Portal API is used to both browse and download all mods available on the official Factorio mod portal. Using the API does not require any kind of authentication or account information and can be viewed simply by following the URLs below in any web browser.
https://mods.factorio.com/api/mods
More detailed information about a particular mod can be obtained by retrieving the following URL, where {name} is the mod's name field in the result object.
https://mods.factorio.com/api/mods/{name}
Object Types
Result Entry
Fields returned by the api/mods endpoint are marked with a check (✓) in the "Short" column, and those returned the the api/mods/{name} endpoint are marked with a check in the "Full" column.
Key | Type | Short | Full | Description |
---|---|---|---|---|
created_at | String(ISO 8601) | ✓ | ✓ | The datetime the mod was uploaded, in the full ISO 8601 format, with a space separator instead of 'T'. |
current_user_rating | Null | ✓ | ✓ | Doesn't seem to be implemented yet. |
description | String | ✓ | A longer description of the mod, in text only format. | |
description_html | String(HTML) | ✓ | A longer description of the mod, with HTML tags. | |
downloads_count | Integer | ✓ | ✓ | Number of downloads. |
first_media_file | Object | ✓ | The first media file in the "media_files" list. | |
game_versions | String[] | ✓ | ✓ | A list of major Factorio version strings (e.g. "0.13") starting with 0.13 that the mod is compatible with, in addition to the version(s) found in "latest_release" / "releases". |
github_path | String | ✓ | ✓ | A link to the mod's github project page, just prepend "github.com/". Can be blank (""). |
homepage | String | ✓ | ✓ | Usually a URL to the mod's main project page, but can be any string. |
id | Integer | ✓ | ✓ | A numerical mod ID used to identify the mod in other API endpoints. |
latest_release | Object | ✓ | ||
license_flags | Integer(11 bit) | ✓ | ✓ | A bit field describing what permissions the mod's license grants. See #License Flags |
license_name | String | ✓ | ✓ | The mod's license name. |
license_url | String | ✓ | ✓ | A URL link to the full license agreement. Can be any string in case of custom licenses. |
media_files | Object[] | ✓ | ||
name | String | ✓ | ✓ | The mod's machine-readable ID string. |
owner | String | ✓ | ✓ | The Factorio username of the mod's author. |
ratings_count | 0 | ✓ | ✓ | Doesn't seem to be implemented yet. |
releases | Object[] | ✓ | ||
summary | String | ✓ | ✓ | Mod description. |
tags | Object[] | ✓ | ✓ | A list of tag objects that categorize the mod. |
title | String | ✓ | ✓ | The mod's human-readable name. |
updated_at | String(ISO 8601) | ✓ | ✓ | The datetime the mod was last updated, in the full ISO 8601 format, with a space separator instead of 'T'. |
visits_count | Integer | ✓ | ✓ | The number of times the mod was viewed, but perhaps only counted on the web interface??? |
License Flags
The "license_flags" is an 11 bit number that describe generally what permissions the mod's license grants.
2n | Title | Description |
---|---|---|
Permissions | ||
0 | Commercial Use | This software and derivatives may be used for commercial purposes |
1 | Modification | The software may be modified. |
2 | Distribution | You may distribute this software. |
3 | Patent Use | This license provides an express grant of patent rights from the contributor to the recipient. |
4 | Private Use | You may use and modify the software without distributing it. |
Conditions | ||
5 | Disclose Source | Source code must be made available when distributing the software. |
6 | License & Copyright Notice | Include a copy of the license and copyright notice with the code. |
7 | Same License | Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used. |
8 | State Changes | Indicate changes made to the code. |
Limitations | ||
9 | Hold Liable | Software is provided without warranty and the software author/license owner cannot be held liable for damages. |
10 | Trademark Use | This license explicitly states that it does NOT grant you trademark rights, even though licenses without such a statement probably do not grant you any implicit trademark rights. |
Media File
Key | Type | Description |
---|---|---|
id | Integer | |
width | Integer | |
height | Integer | |
size | Integer | |
urls | Object |