README.md•5.38 kB
# gamebrain
GameBrain API
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.0.1
- Package version: 1.0.2
- Generator version: 7.8.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements.
Python 3.7+
## Installation & Usage
### pip install
If the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/ddsky/gamebrain-clients/tree/master/python/.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/ddsky/gamebrain-clients/tree/master/python/.git`)
Then import the package:
```python
import gamebrain
```
### Setuptools
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)
Then import the package:
```python
import gamebrain
```
### Tests
Execute `pytest` to run the tests.
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
import gamebrain
from gamebrain.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.gamebrain.co/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = gamebrain.Configuration(
host = "https://api.gamebrain.co/v1"
)
# 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 API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: headerApiKey
configuration.api_key['headerApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['headerApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with gamebrain.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = gamebrain.DefaultApi(api_client)
id = 56 # int | The unique identifier of the game.
api_key = 'abc123' # str | Your API key for authentication.
try:
# Get Game Details
api_response = api_instance.detail(id, api_key)
print("The response of DefaultApi->detail:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->detail: %s\n" % e)
```
## Documentation for API Endpoints
All URIs are relative to *https://api.gamebrain.co/v1*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**detail**](docs/DefaultApi.md#detail) | **GET** /games/{id} | Get Game Details
*DefaultApi* | [**news**](docs/DefaultApi.md#news) | **GET** /games/{id}/news | Get Game News
*DefaultApi* | [**search**](docs/DefaultApi.md#search) | **GET** /games | Search Games
*DefaultApi* | [**similar**](docs/DefaultApi.md#similar) | **GET** /games/{id}/similar | Get Similar Games
*DefaultApi* | [**suggest**](docs/DefaultApi.md#suggest) | **GET** /games/suggestions | Get Game Suggestions
## Documentation For Models
- [GameNewsItem](docs/GameNewsItem.md)
- [GameNewsResponse](docs/GameNewsResponse.md)
- [GameResponse](docs/GameResponse.md)
- [GameResponseOffersInner](docs/GameResponseOffersInner.md)
- [GameResponseOffersInnerPrice](docs/GameResponseOffersInnerPrice.md)
- [GameResponseOfficialStoresInner](docs/GameResponseOfficialStoresInner.md)
- [GameResponsePlatformsInner](docs/GameResponsePlatformsInner.md)
- [GameResponsePlaytime](docs/GameResponsePlaytime.md)
- [GameResponseRating](docs/GameResponseRating.md)
- [SearchResponse](docs/SearchResponse.md)
- [SearchResponseActiveFilterOptionsInner](docs/SearchResponseActiveFilterOptionsInner.md)
- [SearchResponseActiveFilterOptionsInnerValuesInner](docs/SearchResponseActiveFilterOptionsInnerValuesInner.md)
- [SearchResponseFilterOptionsInner](docs/SearchResponseFilterOptionsInner.md)
- [SearchResponseFilterOptionsInnerValuesInner](docs/SearchResponseFilterOptionsInnerValuesInner.md)
- [SearchResponseResultsInner](docs/SearchResponseResultsInner.md)
- [SearchResponseResultsInnerRating](docs/SearchResponseResultsInnerRating.md)
- [SearchResponseSorting](docs/SearchResponseSorting.md)
- [SearchResponseSortingOptionsInner](docs/SearchResponseSortingOptionsInner.md)
- [SearchSuggestionResponse](docs/SearchSuggestionResponse.md)
- [SearchSuggestionResponseResultsInner](docs/SearchSuggestionResponseResultsInner.md)
- [SimilarGamesResponse](docs/SimilarGamesResponse.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Authentication schemes defined for the API:
<a id="apiKey"></a>
### apiKey
- **Type**: API key
- **API key parameter name**: api-key
- **Location**: URL query string
<a id="headerApiKey"></a>
### headerApiKey
- **Type**: API key
- **API key parameter name**: x-api-key
- **Location**: HTTP header
## Author
mail@gamebrain.co