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.

serialName

Snake case version of the name.

apiUrl

The API URL address of this platform.

apiVersion

Version of the API.

Inheritors

Constructors

Link copied to clipboard
constructor(name: String, serialName: String, shortName: String, apiUrl: String, apiVersion: Int, siteUrl: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val serialName: String
Link copied to clipboard
open override val shortName: String
Link copied to clipboard
open override val siteUrl: String

Functions

Link copied to clipboard
open fun getCommonRequestUrl(apiUrl: String = this.apiUrl, apiVersion: Int = this.apiVersion): String
Link copied to clipboard
abstract fun getUrlForProjectType(projectType: ProjectType): String
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>

Requests a project based on provided input.

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>
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.

Link copied to clipboard
open override fun toString(): String