README.md•4.31 kB
# openapi
GameBrain API
This Dart 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.DartClientCodegen
## Requirements
Dart 2.12 or later
## Installation & Usage
### Github
If this Dart package is published to Github, add the following dependency to your pubspec.yaml
```
dependencies:
openapi:
git: https://github.com/ddsky/gamebrain-clients/tree/master/dart/.git
```
### Local
To use the package in your local drive, add the following dependency to your pubspec.yaml
```
dependencies:
openapi:
path: /path/to/openapi
```
## Tests
TODO
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```dart
import 'package:openapi/api.dart';
// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: headerApiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('headerApiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('headerApiKey').apiKeyPrefix = 'Bearer';
final api_instance = DefaultApi();
final id = 56; // int | The unique identifier of the game.
final apiKey = abc123; // String | Your API key for authentication.
try {
final result = api_instance.detail(id, apiKey);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->detail: $e\n');
}
```
## Documentation for API Endpoints
All URIs are relative to *https://api.gamebrain.co/v1*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**detail**](doc//DefaultApi.md#detail) | **GET** /games/{id} | Get Game Details
*DefaultApi* | [**news**](doc//DefaultApi.md#news) | **GET** /games/{id}/news | Get Game News
*DefaultApi* | [**search**](doc//DefaultApi.md#search) | **GET** /games | Search Games
*DefaultApi* | [**similar**](doc//DefaultApi.md#similar) | **GET** /games/{id}/similar | Get Similar Games
*DefaultApi* | [**suggest**](doc//DefaultApi.md#suggest) | **GET** /games/suggestions | Get Game Suggestions
## Documentation For Models
- [GameNewsItem](doc//GameNewsItem.md)
- [GameNewsResponse](doc//GameNewsResponse.md)
- [GameResponse](doc//GameResponse.md)
- [GameResponseOffersInner](doc//GameResponseOffersInner.md)
- [GameResponseOffersInnerPrice](doc//GameResponseOffersInnerPrice.md)
- [GameResponseOfficialStoresInner](doc//GameResponseOfficialStoresInner.md)
- [GameResponsePlatformsInner](doc//GameResponsePlatformsInner.md)
- [GameResponsePlaytime](doc//GameResponsePlaytime.md)
- [GameResponseRating](doc//GameResponseRating.md)
- [SearchResponse](doc//SearchResponse.md)
- [SearchResponseActiveFilterOptionsInner](doc//SearchResponseActiveFilterOptionsInner.md)
- [SearchResponseActiveFilterOptionsInnerValuesInner](doc//SearchResponseActiveFilterOptionsInnerValuesInner.md)
- [SearchResponseFilterOptionsInner](doc//SearchResponseFilterOptionsInner.md)
- [SearchResponseFilterOptionsInnerValuesInner](doc//SearchResponseFilterOptionsInnerValuesInner.md)
- [SearchResponseResultsInner](doc//SearchResponseResultsInner.md)
- [SearchResponseResultsInnerRating](doc//SearchResponseResultsInnerRating.md)
- [SearchResponseSorting](doc//SearchResponseSorting.md)
- [SearchResponseSortingOptionsInner](doc//SearchResponseSortingOptionsInner.md)
- [SearchSuggestionResponse](doc//SearchSuggestionResponse.md)
- [SearchSuggestionResponseResultsInner](doc//SearchSuggestionResponseResultsInner.md)
- [SimilarGamesResponse](doc//SimilarGamesResponse.md)
## Documentation For Authorization
Authentication schemes defined for the API:
### apiKey
- **Type**: API key
- **API key parameter name**: api-key
- **Location**: URL query string
### headerApiKey
- **Type**: API key
- **API key parameter name**: x-api-key
- **Location**: HTTP header
## Author
mail@gamebrain.co