/gmodstore-php-sdk

The GmodStore PHP SDK

Primary LanguagePHPMIT LicenseMIT

GmodStore SDK

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

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.2.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen For more information, please visit https://docs.gmodstore.com

Requirements

PHP 7.2 and later

Installation & Usage

Composer

To install the bindings via Composer, run the following command:

composer require everyday/gmodstore-sdk

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/GmodStore SDK/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure Bearer (API Key) authorization: bearerAuth
$config = Everyday\GmodStore\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Everyday\GmodStore\Sdk\Api\AddonCouponsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$addonId = 56; // int | Id of the addon
$addonCoupon = new \Everyday\GmodStore\Sdk\Model\AddonCoupon(); // \Everyday\GmodStore\Sdk\Model\AddonCoupon | 
$with = array('with_example'); // string[] | The relations you want to fetch with the `AddonCoupon`

try {
    $result = $apiInstance->createAddonCoupon($addonId$addonCoupon$with);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddonCouponsApi->createAddonCoupon: ', $e->getMessage(), PHP_EOL;
}

?>

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

bearerAuth

  • Type: Bearer authentication (API Key)