Giter Site home page Giter Site logo

gmodstore-python-sdk's Introduction

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 Python package is automatically generated by the OpenAPI Generator project:

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

Requirements.

Python >= 3.6

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/everyday-as/gmodstore-python-sdk.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/everyday-as/gmodstore-python-sdk.git)

Then import the package:

import gmodstore-sdk

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import gmodstore-sdk

Getting Started

Please follow the installation procedure and then run the following:

import time
import gmodstore-sdk
from pprint import pprint
from gmodstore-sdk.api import addon_coupons_api
from gmodstore-sdk.model.addon_coupon import AddonCoupon
from gmodstore-sdk.model.addon_coupon_list_response import AddonCouponListResponse
from gmodstore-sdk.model.addon_coupon_response import AddonCouponResponse
from gmodstore-sdk.model.error_response import ErrorResponse
# Defining the host is optional and defaults to https://api.gmodstore.com/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = gmodstore-sdk.Configuration(
    host = "https://api.gmodstore.com/v2"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (API Key): bearerAuth
configuration = gmodstore-sdk.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)


# Enter a context with an instance of the API client
with gmodstore-sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = addon_coupons_api.AddonCouponsApi(api_client)
    addon_id = 1 # int | Id of the addon
addon_coupon = AddonCoupon(
        code="code_example",
        percent=1,
        max_uses=1,
        expires_at=dateutil_parser('1970-01-01T00:00:00.00Z'),
        bound_user_id=1,
    ) # AddonCoupon | 
_with = [
        "addon",
    ] # [str] | The relations you want to fetch with the `AddonCoupon` (optional)

    try:
        # Create an addon coupon
        api_response = api_instance.create_addon_coupon(addon_id, addon_coupon, _with=_with)
        pprint(api_response)
    except gmodstore-sdk.ApiException as e:
        print("Exception when calling AddonCouponsApi->create_addon_coupon: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
AddonCouponsApi create_addon_coupon POST /addons/{addon_id}/coupons Create an addon coupon
AddonCouponsApi delete_addon_coupon DELETE /addons/{addon_id}/coupons/{coupon_id} Destroy an addon's coupon
AddonCouponsApi get_addon_coupon GET /addons/{addon_id}/coupons/{coupon_id} Fetch an addon's coupon
AddonCouponsApi list_addon_coupons GET /addons/{addon_id}/coupons Fetch all the coupons for an addon
AddonCouponsApi update_addon_coupon PUT /addons/{addon_id}/coupons/{coupon_id} Update an addon's coupon
AddonPurchasesApi create_addon_purchase POST /addons/{addon_id}/purchases Create a purchase for an addon
AddonPurchasesApi get_addon_purchase GET /addons/{addon_id}/purchases/{user_id} Get a purchase of an addon by user
AddonPurchasesApi list_addon_purchases GET /addons/{addon_id}/purchases Fetch all purchases of an addon
AddonPurchasesApi update_addon_purchase PUT /addons/{addon_id}/purchases/{user_id} Update a purchase for an addon
AddonReviewsApi get_addon_review GET /addons/{addon_id}/reviews/{review_id} Fetch a review of an addon
AddonReviewsApi list_addon_reviews GET /addons/{addon_id}/reviews Fetch all the reviews of an addon
AddonStatsApi get_addon_stats GET /addons/{addon_id}/stats Fetch all the stats for an addon
AddonVersionsApi create_addon_version POST /addons/{addon_id}/versions Create a new version for an addon
AddonVersionsApi download_addon_version GET /addons/{addon_id}/versions/{version_id}/download Generate a download token for a specific version of an addon
AddonVersionsApi get_addon_version GET /addons/{addon_id}/versions/{version_id} Fetch a specific version of an addon
AddonVersionsApi list_addon_versions GET /addons/{addon_id}/versions Fetch all the versions of an addon
AddonVersionsApi update_addon_version PUT /addons/{addon_id}/versions/{version_id} Update a version of an addon
AddonsApi get_addon GET /addons/{addon_id} Fetch a single addon
AddonsApi list_self_addons GET /addons Fetch all the addons that you have access to
AdventCalendarApi get_advent_calendar_stats GET /events/advent-calendar/stats Fetch statistics relating to the advent calendar event
CurrentAPIKeyApi get_current_api_key GET /me Get meta information about the current API key
PermissionGroupsApi list_permission_groups GET /permission-groups Fetches all available permission groups
TeamAddonsApi list_team_addons GET /teams/{team_id}/addons Fetch all the addons in the given team
TeamUsersApi list_team_users GET /teams/{team_id}/users Fetch all the users in the given team
TeamsApi get_team GET /teams/{team_id} Fetch a single team
UserAddonsApi list_user_addons GET /users/{user_id}/addons Fetch all the addons authored / co-authored by a user
UserBadgesApi create_user_badge POST /users/{user_id}/badges Give a user a badge
UserBadgesApi delete_user_badge DELETE /users/{user_id}/badges/{badge_id} Destroy a users's badge
UserBadgesApi list_user_badges GET /users/{user_id}/badges Fetch all the badges a user has
UserBansApi list_user_bans GET /users/{user_id}/bans Fetch all active bans associated with this user
UserPurchasesApi list_user_purchases GET /users/{user_id}/purchases Fetch all purchases a user has made
UserTeamsApi list_user_teams GET /users/{user_id}/teams Fetch all the teams of a user
UsersApi get_self_user GET /users/me Fetches the current user (API Key Owner)
UsersApi get_user GET /users/{user_id} Fetch a single user

Documentation For Models

Documentation For Authorization

bearerAuth

  • Type: Bearer authentication (API Key)

Author

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in gmodstore-sdk.apis and gmodstore-sdk.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from gmodstore-sdk.api.default_api import DefaultApi
  • from gmodstore-sdk.model.pet import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
import gmodstore-sdk
from gmodstore-sdk.apis import *
from gmodstore-sdk.models import *

gmodstore-python-sdk's People

Contributors

actions-user avatar marcuzz avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.