.github/workflows | ||
.openapi-generator | ||
api | ||
docs | ||
gradle/wrapper | ||
patches | ||
res | ||
src | ||
.gitignore | ||
.openapi-generator-ignore | ||
.travis.yml | ||
build.gradle | ||
build.sbt | ||
generate.sh | ||
git_push.sh | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
pom.xml | ||
README.md | ||
settings.gradle |
playit-api-java
playit.gg's api
- API version: unstable
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Automatically generated by the OpenAPI Generator
Requirements
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
Installation
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Maven users
Add this dependency to your project's POM:
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>playit-api-java</artifactId>
<version>unstable</version>
<scope>compile</scope>
</dependency>
Gradle users
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'playit-api-java' jar has been published to maven central.
mavenLocal() // Needed if the 'playit-api-java' jar has been published to the local maven repo.
}
dependencies {
implementation "org.openapitools:playit-api-java:unstable"
}
Others
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/playit-api-java-unstable.jar
target/lib/*.jar
Getting Started
Please follow the installation instruction and execute the following Java code:
// Import classes:
import gg.playit.ApiClient;
import gg.playit.ApiException;
import gg.playit.Configuration;
import gg.playit.auth.*;
import gg.playit.models.*;
import gg.playit.api.DefaultPlayitAPI;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.playit.gg");
// Configure API key authorization: AgentKey
ApiKeyAuth AgentKey = (ApiKeyAuth) defaultClient.getAuthentication("AgentKey");
AgentKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AgentKey.setApiKeyPrefix("Token");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
DefaultPlayitAPI apiInstance = new DefaultPlayitAPI(defaultClient);
ReqAgentsRoutingGet reqAgentsRoutingGet = new ReqAgentsRoutingGet(); // ReqAgentsRoutingGet |
try {
AgentsRoutingGetPost200Response result = apiInstance.agentsRoutingGetPost(reqAgentsRoutingGet);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultPlayitAPI#agentsRoutingGetPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Documentation for API Endpoints
All URIs are relative to https://api.playit.gg
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultPlayitAPI | agentsRoutingGetPost | POST /agents/routing/get | |
DefaultPlayitAPI | agentsRundataPost | POST /agents/rundata | |
DefaultPlayitAPI | claimAcceptPost | POST /claim/accept | |
DefaultPlayitAPI | claimDetailsPost | POST /claim/details | |
DefaultPlayitAPI | claimExchangePost | POST /claim/exchange | |
DefaultPlayitAPI | claimRejectPost | POST /claim/reject | |
DefaultPlayitAPI | claimSetupPost | POST /claim/setup | |
DefaultPlayitAPI | loginGuestPost | POST /login/guest | |
DefaultPlayitAPI | protoRegisterPost | POST /proto/register | |
DefaultPlayitAPI | tunnelsCreatePost | POST /tunnels/create | |
DefaultPlayitAPI | tunnelsDeletePost | POST /tunnels/delete | |
DefaultPlayitAPI | tunnelsListPost | POST /tunnels/list |
Documentation for Models
- AccountStatus
- AccountTunnel
- AccountTunnelAllocation
- AccountTunnelAllocationOneOf
- AccountTunnelAllocationOneOf1
- AccountTunnels
- AgentAccepted
- AgentAccountStatus
- AgentClaimDetails
- AgentPendingTunnel
- AgentRouting
- AgentRoutingGetError
- AgentRunData
- AgentSecretKey
- AgentTunnel
- AgentTunnelDisabled
- AgentType
- AgentVersion
- AgentsRoutingGetPost200Response
- AgentsRoutingGetPost400Response
- AgentsRoutingGetPost400ResponseOneOf
- AgentsRundataPost200Response
- AllocatedPorts
- AllocationRegion
- AssignedAgent
- AssignedAgentCreate
- AssignedDefault
- AssignedDefaultCreate
- AssignedManaged
- AssignedManagedCreate
- AuthError
- ClaimAcceptError
- ClaimAcceptPost200Response
- ClaimAcceptPost400Response
- ClaimAcceptPost400ResponseOneOf
- ClaimDetailsError
- ClaimDetailsPost200Response
- ClaimDetailsPost400Response
- ClaimDetailsPost400ResponseOneOf
- ClaimExchangeError
- ClaimExchangePost200Response
- ClaimExchangePost400Response
- ClaimExchangePost400ResponseOneOf
- ClaimRejectError
- ClaimRejectPost400Response
- ClaimRejectPost400ResponseOneOf
- ClaimSetupError
- ClaimSetupPost200Response
- ClaimSetupPost400Response
- ClaimSetupPost400ResponseOneOf
- ClaimSetupResponse
- DeleteError
- GuestLoginError
- IpType
- LoginGuestPost200Response
- ObjectId
- Platform
- PlayitAgentVersion
- PortRange
- PortType
- ProtoRegisterPost200Response
- Ratelimit
- ReqAgentsRoutingGet
- ReqClaimAccept
- ReqClaimDetails
- ReqClaimExchange
- ReqClaimReject
- ReqClaimSetup
- ReqProtoRegister
- ReqTunnelsCreate
- ReqTunnelsDelete
- ReqTunnelsList
- SignedAgentKey
- SignedEpoch
- SubscriptionId
- TotpStatus
- TotpStatusOneOf
- TunnelAllocated
- TunnelAssignment
- TunnelAssignmentOneOf
- TunnelAssignmentOneOf1
- TunnelCreateError
- TunnelCreateUseAllocation
- TunnelCreateUseAllocationOneOf
- TunnelCreateUseAllocationOneOf1
- TunnelCreateUseAllocationOneOf2
- TunnelDedicatedIp
- TunnelDisabled
- TunnelDisabledReason
- TunnelDomain
- TunnelDomainSource
- TunnelExpireNotice
- TunnelOrigin
- TunnelOriginCreate
- TunnelOriginCreateOneOf
- TunnelOriginCreateOneOf1
- TunnelOriginCreateOneOf2
- TunnelOriginOneOf
- TunnelOriginOneOf1
- TunnelOriginOneOf2
- TunnelType
- TunnelsCreatePost200Response
- TunnelsCreatePost400Response
- TunnelsCreatePost400ResponseOneOf
- TunnelsCreatePost400ResponseOneOf1
- TunnelsCreatePost400ResponseOneOfData
- TunnelsCreatePost401Response
- TunnelsCreatePost401ResponseData
- TunnelsCreatePost500Response
- TunnelsCreatePost500ResponseData
- TunnelsDeletePost200Response
- TunnelsDeletePost400Response
- TunnelsListPost200Response
- UseAllocDedicatedIp
- UseAllocPortAlloc
- UseRegion
- WebAuth
- WebSession
Documentation for Authorization
Authentication schemes defined for the API:
ApiKey
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
AgentKey
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Recommendation
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.