Platform
abstract class Platform(val name: String, val serialName: String, val shortName: String, val apiUrl: String, val apiVersion: Int, val siteUrl: String) : Provider
Platform is a site containing projects.
Parameters
name
Platform name.
serial Name
Snake case version of the name.
api Url
The API URL address of this platform.
api Version
Version of the API.
Inheritors
Constructors
Functions
Link copied to clipboard
open fun getCommonRequestUrl(apiUrl: String = this.apiUrl, apiVersion: Int = this.apiVersion): String
Link copied to clipboard
Link copied to clipboard
open suspend fun requestFilesForProject(mcVersions: List<String>, loaders: List<String>, project: Project, fileId: String? = null, numberOfFiles: Int = 1, projectType: ProjectType? = null): <Error class: unknown class><MutableSet<ProjectFile>, ActionError>
Requests project files for provided project, with optional number of files to take.
Link copied to clipboard
abstract suspend fun requestMultipleProjectFiles(mcVersions: List<String>, loaders: List<String>, projectIdsToTypes: Map<String, ProjectType?>, ids: List<String>): <Error class: unknown class><MutableSet<ProjectFile>, ActionError>
Link copied to clipboard
abstract suspend fun requestMultipleProjects(ids: List<String>): <Error class: unknown class><MutableSet<Project>, ActionError>
Link copied to clipboard
abstract suspend fun requestMultipleProjectsWithFiles(mcVersions: List<String>, loaders: List<String>, projectIdsToTypes: Map<String, ProjectType?>, numberOfFiles: Int): <Error class: unknown class><MutableSet<Project>, ActionError>
Link copied to clipboard
abstract suspend fun requestProject(input: String, projectType: ProjectType? = null): <Error class: unknown class><Project, ActionError>
Link copied to clipboard
open suspend fun requestProjectBody(input: String): <Error class: unknown class><String, ActionError>
open suspend fun requestProjectBody(input: String, bodyContent: () -> String): <Error class: unknown class><String, ActionError>
Link copied to clipboard
abstract suspend fun requestProjectFiles(mcVersions: List<String>, loaders: List<String>, projectId: String, fileId: String? = null, projectType: ProjectType? = null): <Error class: unknown class><MutableSet<ProjectFile>, ActionError>
Requests project files based on minecraft versions, loaders, projectId or projectId&fileId.
Link copied to clipboard
open suspend override fun requestProjectWithFiles(mcVersions: List<String>, loaders: List<String>, input: String, fileId: String?, numberOfFiles: Int, projectType: ProjectType?): <Error class: unknown class><Project, ActionError>
Requests a project with files, and returns a project, with optional number of files to take.