-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
765c6d3
commit 91b40a9
Showing
7 changed files
with
182 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: LewMC Download Counter API | ||
description: Counts downloads for LewMC resources. | ||
version: 1.0.0 | ||
servers: | ||
- url: https://service.lewmc.net | ||
|
||
paths: | ||
/latest-version: | ||
get: | ||
summary: Get download count | ||
parameters: | ||
- name: resource | ||
in: path | ||
required: true | ||
description: The resource to get the latest download count for. | ||
schema: | ||
type: string | ||
format: string | ||
minimum: 1 | ||
example: galactica | ||
responses: | ||
'200': # status code | ||
description: Fetch the latest download count | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
description: HTTP status code | ||
example: 200 | ||
data: | ||
type: object | ||
properties: | ||
spigot: | ||
type: integer | ||
description: The latest download statistic from Spigot | ||
example: 2000 | ||
modrinth: | ||
type: integer | ||
description: The latest download statistic from Modrinth | ||
example: 1000 | ||
hangar: | ||
type: integer | ||
description: The latest download statistic from Hangar | ||
example: 1000 | ||
curseforge: | ||
type: integer | ||
description: The latest download statistic from CurseForge | ||
example: 5000 | ||
total: | ||
type: integer | ||
description: The total latest download statistic across all sources | ||
example: 9000 | ||
'404': | ||
description: Unable to find resource | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
format: int64 | ||
example: 404 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: LewMC Version API | ||
description: Collects version information for LewMC resources. | ||
version: 1.0.0 | ||
servers: | ||
- url: https://service.lewmc.net | ||
|
||
paths: | ||
/latest-version: | ||
get: | ||
summary: Get latest version | ||
parameters: | ||
- name: resource | ||
in: path | ||
required: true | ||
description: The resource to get the latest version for. | ||
schema: | ||
type: string | ||
format: string | ||
minimum: 1 | ||
example: galactica | ||
responses: | ||
'200': # status code | ||
description: Fetch the latest version | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
description: HTTP status code | ||
example: 200 | ||
data: | ||
type: object | ||
properties: | ||
version: | ||
type: string | ||
description: The latest version of the resource | ||
example: "1.11.1" | ||
minecraft: | ||
type: string | ||
description: The Minecraft version compatible with the resource | ||
example: "1.12.2" | ||
modloader: | ||
type: string | ||
description: The modloader version compatible with the resource | ||
example: "Forge 14.23.5.2858" | ||
released: | ||
type: string | ||
format: date | ||
description: The release date of the latest version | ||
example: "2023-10-17" | ||
'404': | ||
description: Unable to find resource | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
format: int64 | ||
example: 404 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Version API | ||
|
||
> Base URL: https://service.lewmc.net | ||
Get information about the latest version of a resource. | ||
|
||
https://service.lewmc.net/latest-version?resource=[RESOURCE] | ||
|
||
You can also get a simple format by adding &format=simpleversion to the end. | ||
|
||
Example (Full): https://service.lewmc.net/download-counter?resource=essence | ||
|
||
Example (Simple): https://service.lewmc.net/download-counter?resource=essence&format=simpleversion | ||
|
||
<api-doc openapi-path="../openapi/service-version.yml"></api-doc> | ||
|
||
## Resources | ||
| Resource | Description | Version API | Download Counter API | | ||
|---------------------|---------------------------------------------|-------------|----------------------| | ||
| galactica | The Galactica Modpack | ✅ | ✅ | | ||
| lewsjurassicpack | The Lew's Jurassic Pack Modpack | ✅ | ✅ | | ||
| lewsclientpack | The Lew's Client Pack Modpack | ✅ | ✅ | | ||
| simplyaesthetic | The SimplyAesthetic Modpack | ✅ | ✅ | | ||
| essence | The Essence Plugin | ✅ | ✅ | | ||
| essence-snapshot | The Essence Plugin's snapshot/git branch | ✅ | ❌ | | ||
| kryptonite | The Kryptonite Plugin | ✅ | ✅ | | ||
| kryptonite-snapshot | The Kryptonite Plugin's snapshot/git branch | ✅ | ❌ | |