1.3.0 • Published 2 years ago

gmodstore-sdk v1.3.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
2 years ago

gmodstore-sdk

GmodstoreSdk - JavaScript client for 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 SDK is automatically generated by the OpenAPI Generator project:

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

Installation

For Node.js

npm

Install it via npm by running:

npm install gmodstore-sdk --save

Install it via yarn by running:

yarn add gmodstore-sdk

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

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

var GmodstoreSdk = require('gmodstore-sdk');

var defaultClient = GmodstoreSdk.ApiClient.instance;
// Configure Bearer (API Key) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

var api = new GmodstoreSdk.AddonCouponsApi()
var addonId = 789; // {Number} Id of the addon
var addonCoupon = new GmodstoreSdk.AddonCoupon(); // {AddonCoupon} 
var opts = {
  '_with': ["null"] // {[String]} The relations you want to fetch with the `AddonCoupon`
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createAddonCoupon(addonId, addonCoupon, opts, callback);

Documentation for API Endpoints

All URIs are relative to https://api.gmodstore.com/v2

ClassMethodHTTP requestDescription
GmodstoreSdk.AddonCouponsApicreateAddonCouponPOST /addons/{addon_id}/couponsCreate an addon coupon
GmodstoreSdk.AddonCouponsApideleteAddonCouponDELETE /addons/{addon_id}/coupons/{coupon_id}Destroy an addon's coupon
GmodstoreSdk.AddonCouponsApigetAddonCouponGET /addons/{addon_id}/coupons/{coupon_id}Fetch an addon's coupon
GmodstoreSdk.AddonCouponsApilistAddonCouponsGET /addons/{addon_id}/couponsFetch all the coupons for an addon
GmodstoreSdk.AddonCouponsApiupdateAddonCouponPUT /addons/{addon_id}/coupons/{coupon_id}Update an addon's coupon
GmodstoreSdk.AddonPurchasesApicreateAddonPurchasePOST /addons/{addon_id}/purchasesCreate a purchase for an addon
GmodstoreSdk.AddonPurchasesApigetAddonPurchaseGET /addons/{addon_id}/purchases/{user_id}Get a purchase of an addon by user
GmodstoreSdk.AddonPurchasesApilistAddonPurchasesGET /addons/{addon_id}/purchasesFetch all purchases of an addon
GmodstoreSdk.AddonPurchasesApiupdateAddonPurchasePUT /addons/{addon_id}/purchases/{user_id}Update a purchase for an addon
GmodstoreSdk.AddonReviewsApigetAddonReviewGET /addons/{addon_id}/reviews/{review_id}Fetch a review of an addon
GmodstoreSdk.AddonReviewsApilistAddonReviewsGET /addons/{addon_id}/reviewsFetch all the reviews of an addon
GmodstoreSdk.AddonStatsApigetAddonStatsGET /addons/{addon_id}/statsFetch all the stats for an addon
GmodstoreSdk.AddonVersionsApicreateAddonVersionPOST /addons/{addon_id}/versionsCreate a new version for an addon
GmodstoreSdk.AddonVersionsApidownloadAddonVersionGET /addons/{addon_id}/versions/{version_id}/downloadGenerate a download token for a specific version of an addon
GmodstoreSdk.AddonVersionsApigetAddonVersionGET /addons/{addon_id}/versions/{version_id}Fetch a specific version of an addon
GmodstoreSdk.AddonVersionsApilistAddonVersionsGET /addons/{addon_id}/versionsFetch all the versions of an addon
GmodstoreSdk.AddonVersionsApiupdateAddonVersionPUT /addons/{addon_id}/versions/{version_id}Update a version of an addon
GmodstoreSdk.AddonsApigetAddonGET /addons/{addon_id}Fetch a single addon
GmodstoreSdk.AddonsApilistSelfAddonsGET /addonsFetch all the addons that you have access to
GmodstoreSdk.AdventCalendarApigetAdventCalendarStatsGET /events/advent-calendar/statsFetch statistics relating to the advent calendar event
GmodstoreSdk.CurrentAPIKeyApigetCurrentApiKeyGET /meGet meta information about the current API key
GmodstoreSdk.PermissionGroupsApilistPermissionGroupsGET /permission-groupsFetches all available permission groups
GmodstoreSdk.TeamAddonsApilistTeamAddonsGET /teams/{team_id}/addonsFetch all the addons in the given team
GmodstoreSdk.TeamUsersApilistTeamUsersGET /teams/{team_id}/usersFetch all the users in the given team
GmodstoreSdk.TeamsApigetTeamGET /teams/{team_id}Fetch a single team
GmodstoreSdk.UserAddonsApilistUserAddonsGET /users/{user_id}/addonsFetch all the addons authored / co-authored by a user
GmodstoreSdk.UserBadgesApicreateUserBadgePOST /users/{user_id}/badgesGive a user a badge
GmodstoreSdk.UserBadgesApideleteUserBadgeDELETE /users/{user_id}/badges/{badge_id}Destroy a users's badge
GmodstoreSdk.UserBadgesApilistUserBadgesGET /users/{user_id}/badgesFetch all the badges a user has
GmodstoreSdk.UserBansApilistUserBansGET /users/{user_id}/bansFetch all active bans associated with this user
GmodstoreSdk.UserPurchasesApilistUserPurchasesGET /users/{user_id}/purchasesFetch all purchases a user has made
GmodstoreSdk.UserTeamsApilistUserTeamsGET /users/{user_id}/teamsFetch all the teams of a user
GmodstoreSdk.UsersApigetSelfUserGET /users/meFetches the current user (API Key Owner)
GmodstoreSdk.UsersApigetUserGET /users/{user_id}Fetch a single user

Documentation for Models

Documentation for Authorization

bearerAuth

  • Type: Bearer authentication (API Key)
1.3.0

2 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.0

4 years ago