Skip to content

Commit 993f00d

Browse files
authored
Merge pull request #11 from aternosorg/spec-update
Update to latest openapi spec
2 parents d4b466a + 1f06763 commit 993f00d

File tree

117 files changed

+1812
-10124
lines changed

Some content is hidden

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

117 files changed

+1812
-10124
lines changed

config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ invokerPackage: Aternos\ModrinthApi
22
artifactVersion: 1.0.0
33
generatorName: php
44
outputDir: .
5-
# This points to a downgraded Open API 3.0.0 spec for now. The official spec can be found at https://docs.modrinth.com/redocusaurus/plugin-redoc-0.yaml
6-
inputSpec: https://raw.githubusercontent.com/JulianVennen/modrinth-docs/php-modrinth-api/static/openapi.yaml
5+
inputSpec: https://docs.modrinth.com/redocusaurus/plugin-redoc-0.yaml

docs/Api/MiscApi.md

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ All URIs are relative to https://api.modrinth.com/v2, except if the operation de
66
| ------------- | ------------- | ------------- |
77
| [**forgeUpdates()**](MiscApi.md#forgeUpdates) | **GET** /updates/{id|slug}/forge_updates.json | Forge Updates JSON file |
88
| [**statistics()**](MiscApi.md#statistics) | **GET** /statistics | Various statistics about this Modrinth instance |
9-
| [**submitReport()**](MiscApi.md#submitReport) | **POST** /report | Report a project, user, or version |
109

1110

1211
## `forgeUpdates()`
@@ -123,65 +122,3 @@ No authorization required
123122
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
124123
[[Back to Model list]](../../README.md#models)
125124
[[Back to README]](../../README.md)
126-
127-
## `submitReport()`
128-
129-
```php
130-
submitReport($creatable_report): \Aternos\ModrinthApi\Model\Report
131-
```
132-
133-
Report a project, user, or version
134-
135-
Bring a project, user, or version to the attention of the moderators by reporting it.
136-
137-
### Example
138-
139-
```php
140-
<?php
141-
require_once(__DIR__ . '/vendor/autoload.php');
142-
143-
144-
// Configure API key authorization: TokenAuth
145-
$config = Aternos\ModrinthApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
146-
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
147-
// $config = Aternos\ModrinthApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
148-
149-
150-
$apiInstance = new Aternos\ModrinthApi\Api\MiscApi(
151-
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
152-
// This is optional, `GuzzleHttp\Client` will be used as default.
153-
new GuzzleHttp\Client(),
154-
$config
155-
);
156-
$creatable_report = new \Aternos\ModrinthApi\Model\CreatableReport(); // \Aternos\ModrinthApi\Model\CreatableReport | The report to be sent
157-
158-
try {
159-
$result = $apiInstance->submitReport($creatable_report);
160-
print_r($result);
161-
} catch (Exception $e) {
162-
echo 'Exception when calling MiscApi->submitReport: ', $e->getMessage(), PHP_EOL;
163-
}
164-
```
165-
166-
### Parameters
167-
168-
| Name | Type | Description | Notes |
169-
| ------------- | ------------- | ------------- | ------------- |
170-
| **creatable_report** | [**\Aternos\ModrinthApi\Model\CreatableReport**](../Model/CreatableReport.md)| The report to be sent | [optional] |
171-
172-
### Return type
173-
174-
[**\Aternos\ModrinthApi\Model\Report**](../Model/Report.md)
175-
176-
### Authorization
177-
178-
[TokenAuth](../../README.md#TokenAuth)
179-
180-
### HTTP request headers
181-
182-
- **Content-Type**: `application/json`
183-
- **Accept**: `application/json`
184-
185-
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
186-
[[Back to Model list]](../../README.md#models)
187-
[[Back to README]](../../README.md)

docs/Api/ProjectsApi.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ void (empty response body)
987987
## `searchProjects()`
988988

989989
```php
990-
searchProjects($query, $facets, $index, $offset, $limit, $filters, $version): \Aternos\ModrinthApi\Model\SearchResults
990+
searchProjects($query, $facets, $index, $offset, $limit): \Aternos\ModrinthApi\Model\SearchResults
991991
```
992992

993993
Search projects
@@ -1010,11 +1010,9 @@ $facets = [["categories:forge"],["versions:1.17.1"],["project_type:mod"],["licen
10101010
$index = downloads; // string | The sorting method used for sorting search results
10111011
$offset = 20; // int | The offset into the search. Skips this number of results
10121012
$limit = 20; // int | The number of results returned by the search
1013-
$filters = categories="fabric" AND (categories="technology" OR categories="utility"); // string | A list of filters relating to the properties of a project. Facets are generally recommended over filters.
1014-
$version = version="1.16.3" OR version="1.16.2" OR version="1.16.1"; // string | A list of filters relating to the versions of a project. Use of facets for filtering by version is recommended
10151013

10161014
try {
1017-
$result = $apiInstance->searchProjects($query, $facets, $index, $offset, $limit, $filters, $version);
1015+
$result = $apiInstance->searchProjects($query, $facets, $index, $offset, $limit);
10181016
print_r($result);
10191017
} catch (Exception $e) {
10201018
echo 'Exception when calling ProjectsApi->searchProjects: ', $e->getMessage(), PHP_EOL;
@@ -1030,8 +1028,6 @@ try {
10301028
| **index** | **string**| The sorting method used for sorting search results | [optional] [default to &#39;relevance&#39;] |
10311029
| **offset** | **int**| The offset into the search. Skips this number of results | [optional] [default to 0] |
10321030
| **limit** | **int**| The number of results returned by the search | [optional] [default to 10] |
1033-
| **filters** | **string**| A list of filters relating to the properties of a project. Facets are generally recommended over filters. | [optional] |
1034-
| **version** | **string**| A list of filters relating to the versions of a project. Use of facets for filtering by version is recommended | [optional] |
10351031

10361032
### Return type
10371033

docs/Api/TagsApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ No authorization required
177177
## `licenseText()`
178178

179179
```php
180-
licenseText($id): \Aternos\ModrinthApi\Model\LicenseText200Response
180+
licenseText($id): \Aternos\ModrinthApi\Model\License
181181
```
182182

183183
Get the text and title of a license
@@ -213,7 +213,7 @@ try {
213213

214214
### Return type
215215

216-
[**\Aternos\ModrinthApi\Model\LicenseText200Response**](../Model/LicenseText200Response.md)
216+
[**\Aternos\ModrinthApi\Model\License**](../Model/License.md)
217217

218218
### Authorization
219219

docs/Api/UsersApi.md

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ All URIs are relative to https://api.modrinth.com/v2, except if the operation de
99
| [**getPayoutHistory()**](UsersApi.md#getPayoutHistory) | **GET** /user/{id|username}/payouts | Get user&#39;s payout history |
1010
| [**getUser()**](UsersApi.md#getUser) | **GET** /user/{id|username} | Get a user |
1111
| [**getUserFromAuth()**](UsersApi.md#getUserFromAuth) | **GET** /user | Get user from authorization header |
12-
| [**getUserNotifications()**](UsersApi.md#getUserNotifications) | **GET** /user/{id|username}/notifications | Get user&#39;s notifications |
1312
| [**getUserProjects()**](UsersApi.md#getUserProjects) | **GET** /user/{id|username}/projects | Get user&#39;s projects |
1413
| [**getUsers()**](UsersApi.md#getUsers) | **GET** /users | Get multiple users |
1514
| [**modifyUser()**](UsersApi.md#modifyUser) | **PATCH** /user/{id|username} | Modify a user |
@@ -310,66 +309,6 @@ This endpoint does not need any parameter.
310309
[[Back to Model list]](../../README.md#models)
311310
[[Back to README]](../../README.md)
312311

313-
## `getUserNotifications()`
314-
315-
```php
316-
getUserNotifications($id_username): \Aternos\ModrinthApi\Model\Notification[]
317-
```
318-
319-
Get user's notifications
320-
321-
### Example
322-
323-
```php
324-
<?php
325-
require_once(__DIR__ . '/vendor/autoload.php');
326-
327-
328-
// Configure API key authorization: TokenAuth
329-
$config = Aternos\ModrinthApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
330-
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
331-
// $config = Aternos\ModrinthApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
332-
333-
334-
$apiInstance = new Aternos\ModrinthApi\Api\UsersApi(
335-
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
336-
// This is optional, `GuzzleHttp\Client` will be used as default.
337-
new GuzzleHttp\Client(),
338-
$config
339-
);
340-
$id_username = ["EEFFGGHH","my_user"]; // string | The ID or username of the user
341-
342-
try {
343-
$result = $apiInstance->getUserNotifications($id_username);
344-
print_r($result);
345-
} catch (Exception $e) {
346-
echo 'Exception when calling UsersApi->getUserNotifications: ', $e->getMessage(), PHP_EOL;
347-
}
348-
```
349-
350-
### Parameters
351-
352-
| Name | Type | Description | Notes |
353-
| ------------- | ------------- | ------------- | ------------- |
354-
| **id_username** | **string**| The ID or username of the user | |
355-
356-
### Return type
357-
358-
[**\Aternos\ModrinthApi\Model\Notification[]**](../Model/Notification.md)
359-
360-
### Authorization
361-
362-
[TokenAuth](../../README.md#TokenAuth)
363-
364-
### HTTP request headers
365-
366-
- **Content-Type**: Not defined
367-
- **Accept**: `application/json`
368-
369-
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
370-
[[Back to Model list]](../../README.md#models)
371-
[[Back to README]](../../README.md)
372-
373312
## `getUserProjects()`
374313

375314
```php

docs/Api/VersionsApi.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ $apiInstance = new Aternos\ModrinthApi\Api\VersionsApi(
221221
new GuzzleHttp\Client()
222222
);
223223
$id_slug = ["AABBCCDD","my_project"]; // string | The ID or slug of the project
224-
$loaders = ["fabric"]; // string[] | The types of loaders to filter for
225-
$game_versions = ["1.18.1"]; // string[] | The game versions to filter for
224+
$loaders = ["fabric"]; // string | The types of loaders to filter for
225+
$game_versions = ["1.18.1"]; // string | The game versions to filter for
226226
$featured = True; // bool | Allows to filter for featured or non-featured versions only
227227

228228
try {
@@ -238,8 +238,8 @@ try {
238238
| Name | Type | Description | Notes |
239239
| ------------- | ------------- | ------------- | ------------- |
240240
| **id_slug** | **string**| The ID or slug of the project | |
241-
| **loaders** | [**string[]**](../Model/string.md)| The types of loaders to filter for | [optional] |
242-
| **game_versions** | [**string[]**](../Model/string.md)| The game versions to filter for | [optional] |
241+
| **loaders** | **string**| The types of loaders to filter for | [optional] |
242+
| **game_versions** | **string**| The game versions to filter for | [optional] |
243243
| **featured** | **bool**| Allows to filter for featured or non-featured versions only | [optional] |
244244

245245
### Return type
@@ -392,7 +392,7 @@ $apiInstance = new Aternos\ModrinthApi\Api\VersionsApi(
392392
// This is optional, `GuzzleHttp\Client` will be used as default.
393393
new GuzzleHttp\Client()
394394
);
395-
$ids = ["AABBCCDD","EEFFGGHH"]; // string | The IDs of the versions
395+
$ids = ["AABBCCDD", "EEFFGGHH"]; // string | The IDs of the versions
396396

397397
try {
398398
$result = $apiInstance->getVersions($ids);

docs/Model/EditableProjectAllOf.md

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# # ForgeUpdatesPromos
1+
# # ForgeUpdateCheckerPromos
22

33
## Properties
44

docs/Model/ForgeUpdates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**homepage** | **string** | A link to the mod page | [optional]
8-
**promos** | [**\Aternos\ModrinthApi\Model\ForgeUpdatesPromos**](ForgeUpdatesPromos.md) | | [optional]
8+
**promos** | [**\Aternos\ModrinthApi\Model\ForgeUpdateCheckerPromos**](ForgeUpdateCheckerPromos.md) | | [optional]
99

1010
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/GetLatestVersionsFromHashesBodyAllOf.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)