gmodstore-sdk v1.3.0
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
Class | Method | HTTP request | Description |
---|---|---|---|
GmodstoreSdk.AddonCouponsApi | createAddonCoupon | POST /addons/{addon_id}/coupons | Create an addon coupon |
GmodstoreSdk.AddonCouponsApi | deleteAddonCoupon | DELETE /addons/{addon_id}/coupons/{coupon_id} | Destroy an addon's coupon |
GmodstoreSdk.AddonCouponsApi | getAddonCoupon | GET /addons/{addon_id}/coupons/{coupon_id} | Fetch an addon's coupon |
GmodstoreSdk.AddonCouponsApi | listAddonCoupons | GET /addons/{addon_id}/coupons | Fetch all the coupons for an addon |
GmodstoreSdk.AddonCouponsApi | updateAddonCoupon | PUT /addons/{addon_id}/coupons/{coupon_id} | Update an addon's coupon |
GmodstoreSdk.AddonPurchasesApi | createAddonPurchase | POST /addons/{addon_id}/purchases | Create a purchase for an addon |
GmodstoreSdk.AddonPurchasesApi | getAddonPurchase | GET /addons/{addon_id}/purchases/{user_id} | Get a purchase of an addon by user |
GmodstoreSdk.AddonPurchasesApi | listAddonPurchases | GET /addons/{addon_id}/purchases | Fetch all purchases of an addon |
GmodstoreSdk.AddonPurchasesApi | updateAddonPurchase | PUT /addons/{addon_id}/purchases/{user_id} | Update a purchase for an addon |
GmodstoreSdk.AddonReviewsApi | getAddonReview | GET /addons/{addon_id}/reviews/{review_id} | Fetch a review of an addon |
GmodstoreSdk.AddonReviewsApi | listAddonReviews | GET /addons/{addon_id}/reviews | Fetch all the reviews of an addon |
GmodstoreSdk.AddonStatsApi | getAddonStats | GET /addons/{addon_id}/stats | Fetch all the stats for an addon |
GmodstoreSdk.AddonVersionsApi | createAddonVersion | POST /addons/{addon_id}/versions | Create a new version for an addon |
GmodstoreSdk.AddonVersionsApi | downloadAddonVersion | GET /addons/{addon_id}/versions/{version_id}/download | Generate a download token for a specific version of an addon |
GmodstoreSdk.AddonVersionsApi | getAddonVersion | GET /addons/{addon_id}/versions/{version_id} | Fetch a specific version of an addon |
GmodstoreSdk.AddonVersionsApi | listAddonVersions | GET /addons/{addon_id}/versions | Fetch all the versions of an addon |
GmodstoreSdk.AddonVersionsApi | updateAddonVersion | PUT /addons/{addon_id}/versions/{version_id} | Update a version of an addon |
GmodstoreSdk.AddonsApi | getAddon | GET /addons/{addon_id} | Fetch a single addon |
GmodstoreSdk.AddonsApi | listSelfAddons | GET /addons | Fetch all the addons that you have access to |
GmodstoreSdk.AdventCalendarApi | getAdventCalendarStats | GET /events/advent-calendar/stats | Fetch statistics relating to the advent calendar event |
GmodstoreSdk.CurrentAPIKeyApi | getCurrentApiKey | GET /me | Get meta information about the current API key |
GmodstoreSdk.PermissionGroupsApi | listPermissionGroups | GET /permission-groups | Fetches all available permission groups |
GmodstoreSdk.TeamAddonsApi | listTeamAddons | GET /teams/{team_id}/addons | Fetch all the addons in the given team |
GmodstoreSdk.TeamUsersApi | listTeamUsers | GET /teams/{team_id}/users | Fetch all the users in the given team |
GmodstoreSdk.TeamsApi | getTeam | GET /teams/{team_id} | Fetch a single team |
GmodstoreSdk.UserAddonsApi | listUserAddons | GET /users/{user_id}/addons | Fetch all the addons authored / co-authored by a user |
GmodstoreSdk.UserBadgesApi | createUserBadge | POST /users/{user_id}/badges | Give a user a badge |
GmodstoreSdk.UserBadgesApi | deleteUserBadge | DELETE /users/{user_id}/badges/{badge_id} | Destroy a users's badge |
GmodstoreSdk.UserBadgesApi | listUserBadges | GET /users/{user_id}/badges | Fetch all the badges a user has |
GmodstoreSdk.UserBansApi | listUserBans | GET /users/{user_id}/bans | Fetch all active bans associated with this user |
GmodstoreSdk.UserPurchasesApi | listUserPurchases | GET /users/{user_id}/purchases | Fetch all purchases a user has made |
GmodstoreSdk.UserTeamsApi | listUserTeams | GET /users/{user_id}/teams | Fetch all the teams of a user |
GmodstoreSdk.UsersApi | getSelfUser | GET /users/me | Fetches the current user (API Key Owner) |
GmodstoreSdk.UsersApi | getUser | GET /users/{user_id} | Fetch a single user |
Documentation for Models
- GmodstoreSdk.Addon
- GmodstoreSdk.AddonCoupon
- GmodstoreSdk.AddonCouponListResponse
- GmodstoreSdk.AddonCouponResponse
- GmodstoreSdk.AddonDownload
- GmodstoreSdk.AddonDownloadResponse
- GmodstoreSdk.AddonImages
- GmodstoreSdk.AddonListResponse
- GmodstoreSdk.AddonPrice
- GmodstoreSdk.AddonPurchase
- GmodstoreSdk.AddonPurchaseListResponse
- GmodstoreSdk.AddonPurchaseResponse
- GmodstoreSdk.AddonResponse
- GmodstoreSdk.AddonReview
- GmodstoreSdk.AddonReviewListResponse
- GmodstoreSdk.AddonReviewResponse
- GmodstoreSdk.AddonStats
- GmodstoreSdk.AddonStatsListResponse
- GmodstoreSdk.AddonStatsRevenue
- GmodstoreSdk.AddonStatsRevenueCurrent
- GmodstoreSdk.AddonStatsSales
- GmodstoreSdk.AddonStatsSalesCurrent
- GmodstoreSdk.AddonStatsViews
- GmodstoreSdk.AddonStatsViewsCurrent
- GmodstoreSdk.AddonVersion
- GmodstoreSdk.AddonVersionListResponse
- GmodstoreSdk.AddonVersionReleaseType
- GmodstoreSdk.AddonVersionResponse
- GmodstoreSdk.AdventCalendarStats
- GmodstoreSdk.AdventCalendarStatsResponse
- GmodstoreSdk.ApiKey
- GmodstoreSdk.ApiKeyResponse
- GmodstoreSdk.BadgeListResponse
- GmodstoreSdk.BadgeResponse
- GmodstoreSdk.Error
- GmodstoreSdk.ErrorResponse
- GmodstoreSdk.Money
- GmodstoreSdk.NewAddonPurchase
- GmodstoreSdk.OrderItem
- GmodstoreSdk.PermissionGroup
- GmodstoreSdk.PermissionGroupListResponse
- GmodstoreSdk.Team
- GmodstoreSdk.TeamAddon
- GmodstoreSdk.TeamAddonListResponse
- GmodstoreSdk.TeamListResponse
- GmodstoreSdk.TeamResponse
- GmodstoreSdk.TeamUser
- GmodstoreSdk.TeamUserListResponse
- GmodstoreSdk.User
- GmodstoreSdk.UserBadge
- GmodstoreSdk.UserBadgeLegend
- GmodstoreSdk.UserBan
- GmodstoreSdk.UserBanListResponse
- GmodstoreSdk.UserResponse
Documentation for Authorization
bearerAuth
- Type: Bearer authentication (API Key)