Skip to content

everyday-as/gmodstore-java-sdk

Repository files navigation

gmodstore-sdk

GmodStore API

  • API version: 1.2.0
    • Build date: 2022-12-03T00:12:40.647077Z[Etc/UTC]

Welcome to the GmodStore API! You can use our API to access GmodStore API endpoints, which can be used interact with GmodStore programmatically.

For more information, please visit https://docs.gmodstore.com

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

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>no.everyday</groupId>
  <artifactId>gmodstore-sdk</artifactId>
  <version>3.1.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "no.everyday:gmodstore-sdk:3.1.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/gmodstore-sdk-3.1.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import no.everyday.gmodstore_sdk.ApiClient;
import no.everyday.gmodstore_sdk.ApiException;
import no.everyday.gmodstore_sdk.Configuration;
import no.everyday.gmodstore_sdk.auth.*;
import no.everyday.gmodstore_sdk.models.*;
import no.everyday.gmodstore_sdk.api.AddonCouponsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.gmodstore.com/v2");
    
    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    AddonCouponsApi apiInstance = new AddonCouponsApi(defaultClient);
    Long addonId = 56L; // Long | Id of the addon
    AddonCoupon addonCoupon = new AddonCoupon(); // AddonCoupon | 
    Set<String> with = Arrays.asList(); // Set<String> | The relations you want to fetch with the `AddonCoupon`
    try {
      AddonCouponResponse result = apiInstance.createAddonCoupon(addonId, addonCoupon, with);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AddonCouponsApi#createAddonCoupon");
      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.gmodstore.com/v2

Class Method HTTP request Description
AddonCouponsApi createAddonCoupon POST /addons/{addon_id}/coupons Create an addon coupon
AddonCouponsApi deleteAddonCoupon DELETE /addons/{addon_id}/coupons/{coupon_id} Destroy an addon's coupon
AddonCouponsApi getAddonCoupon GET /addons/{addon_id}/coupons/{coupon_id} Fetch an addon's coupon
AddonCouponsApi listAddonCoupons GET /addons/{addon_id}/coupons Fetch all the coupons for an addon
AddonCouponsApi updateAddonCoupon PUT /addons/{addon_id}/coupons/{coupon_id} Update an addon's coupon
AddonPurchasesApi createAddonPurchase POST /addons/{addon_id}/purchases Create a purchase for an addon
AddonPurchasesApi getAddonPurchase GET /addons/{addon_id}/purchases/{user_id} Get a purchase of an addon by user
AddonPurchasesApi listAddonPurchases GET /addons/{addon_id}/purchases Fetch all purchases of an addon
AddonPurchasesApi updateAddonPurchase PUT /addons/{addon_id}/purchases/{user_id} Update a purchase for an addon
AddonReviewsApi getAddonReview GET /addons/{addon_id}/reviews/{review_id} Fetch a review of an addon
AddonReviewsApi listAddonReviews GET /addons/{addon_id}/reviews Fetch all the reviews of an addon
AddonStatsApi getAddonStats GET /addons/{addon_id}/stats Fetch all the stats for an addon
AddonVersionsApi createAddonVersion POST /addons/{addon_id}/versions Create a new version for an addon
AddonVersionsApi downloadAddonVersion GET /addons/{addon_id}/versions/{version_id}/download Generate a download token for a specific version of an addon
AddonVersionsApi getAddonVersion GET /addons/{addon_id}/versions/{version_id} Fetch a specific version of an addon
AddonVersionsApi listAddonVersions GET /addons/{addon_id}/versions Fetch all the versions of an addon
AddonVersionsApi updateAddonVersion PUT /addons/{addon_id}/versions/{version_id} Update a version of an addon
AddonsApi getAddon GET /addons/{addon_id} Fetch a single addon
AddonsApi listSelfAddons GET /addons Fetch all the addons that you have access to
AdventCalendarApi getAdventCalendarStats GET /events/advent-calendar/stats Fetch statistics relating to the advent calendar event
CurrentApiKeyApi getCurrentApiKey GET /me Get meta information about the current API key
PermissionGroupsApi listPermissionGroups GET /permission-groups Fetches all available permission groups
TeamAddonsApi listTeamAddons GET /teams/{team_id}/addons Fetch all the addons in the given team
TeamUsersApi listTeamUsers GET /teams/{team_id}/users Fetch all the users in the given team
TeamsApi getTeam GET /teams/{team_id} Fetch a single team
UserAddonsApi listUserAddons GET /users/{user_id}/addons Fetch all the addons authored / co-authored by a user
UserBadgesApi createUserBadge POST /users/{user_id}/badges Give a user a badge
UserBadgesApi deleteUserBadge DELETE /users/{user_id}/badges/{badge_id} Destroy a users's badge
UserBadgesApi listUserBadges GET /users/{user_id}/badges Fetch all the badges a user has
UserBansApi listUserBans GET /users/{user_id}/bans Fetch all active bans associated with this user
UserPurchasesApi listUserPurchases GET /users/{user_id}/purchases Fetch all purchases a user has made
UserTeamsApi listUserTeams GET /users/{user_id}/teams Fetch all the teams of a user
UsersApi getSelfUser GET /users/me Fetches the current user (API Key Owner)
UsersApi getUser GET /users/{user_id} Fetch a single user

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

Releases

No releases published

Packages

No packages published

Languages