eigen_api 0.3.1
eigen_api: ^0.3.1 copied to clipboard
Generated dart-dio REST client for the EigenInteractive game engine. Its lib/ sources are regenerated wholesale from openapi.json by scripts/generate-dart-client.sh; THIS manifest is hand-owned and th [...]
Important
Do not depend on this package directly. It is a build artifact,
regenerated wholesale on every wire change, and its surface is not designed
for human use. Flutter apps depend on
eigen_flutter, which re-exports
the wire types a game needs and keeps the *Api classes out of your
namespace.
It is published only because pub.dev rejects path dependencies, the same
reason Flutter's federated plugins publish *_platform_interface packages
nobody imports. Documentation lives at
https://eigeninteractive.com/docs/reference/http-surface.
eigen_api (EXPERIMENTAL) #
The server-authoritative game engine API. Client routes (/api/engine/_*) require a Firebase ID token; the external-bot webhook (/api/bot/action) is HMAC-authenticated.
This Dart package is automatically generated by the OpenAPI Generator project:
- API version: 0.3.1
- Generator version: 7.17.0
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen
Requirements #
- Dart 2.15.0+ or Flutter 2.8.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)
- JSON Serializable 6.1.5+ (https://pub.dev/packages/json_serializable)
Installation & Usage #
pub.dev #
To use the package from pub.dev, please include the following in pubspec.yaml
dependencies:
eigen_api: 1.0.0
Github #
If this Dart package is published to Github, please include the following in pubspec.yaml
dependencies:
eigen_api:
git:
url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
#ref: main
Local development #
To use the package from your local drive, please include the following in pubspec.yaml
dependencies:
eigen_api:
path: /path/to/eigen_api
Getting Started #
Please follow the installation procedure and then run the following:
import 'package:eigen_api/eigen_api.dart';
final api = EigenApi().getBotWebhookApi();
final BotAction botAction = ; // BotAction |
try {
api.botAction(botAction);
} catch on DioException (e) {
print("Exception when calling BotWebhookApi->botAction: $e\n");
}
Documentation for API Endpoints #
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BotWebhookApi | botAction | POST /api/bot/action | |
| BotsApi | getBots | GET /api/engine/bots | |
| GamesApi | addBot | POST /api/engine/games/{gameId}/add-bot | |
| GamesApi | cancelGame | POST /api/engine/games/{gameId}/cancel | |
| GamesApi | createGame | POST /api/engine/games | |
| GamesApi | createSoloGame | POST /api/engine/games/solo | |
| GamesApi | forfeitGame | POST /api/engine/games/{gameId}/forfeit | |
| GamesApi | getFrames | GET /api/engine/games/{gameId}/frames | |
| GamesApi | getGame | GET /api/engine/games/{gameId} | |
| GamesApi | getGameSession | GET /api/engine/games/{gameId}/session | |
| GamesApi | getLobby | GET /api/engine/lobby | |
| GamesApi | getMyGames | GET /api/engine/games/mine | |
| GamesApi | joinGame | POST /api/engine/games/{gameId}/join | |
| GamesApi | joinGameByCode | POST /api/engine/games/join-by-code | |
| GamesApi | leaveGame | POST /api/engine/games/{gameId}/leave | |
| GamesApi | startGame | POST /api/engine/games/{gameId}/start | |
| GamesApi | submitAction | POST /api/engine/games/{gameId}/action | |
| HealthApi | getHealth | GET /health | Liveness probe |
| MeApi | deleteAccount | DELETE /api/engine/me | |
| MeApi | getMyRatingHistory | GET /api/engine/me/rating-history | |
| MeApi | getMyRatings | GET /api/engine/me/ratings | |
| MeApi | getProfile | GET /api/engine/me | |
| MeApi | registerDevice | PUT /api/engine/me/devices | |
| MeApi | unregisterDevice | DELETE /api/engine/me/devices/{fid} | |
| MeApi | updateDisplayName | PUT /api/engine/me/display-name | |
| MeApi | updateUsername | PUT /api/engine/me/username | |
| PlayersApi | getPlayerGames | GET /api/engine/players/{playerId}/games | |
| PlayersApi | getPlayerRatings | GET /api/engine/players/{playerId}/ratings | |
| PlayersApi | getPlayers | GET /api/engine/players | |
| SocialApi | acceptFriendRequest | POST /api/engine/friends/requests/{userId}/accept | |
| SocialApi | blockUser | POST /api/engine/friends/{userId}/block | |
| SocialApi | getFriendsGames | GET /api/engine/friends/games | |
| SocialApi | listFriendRequests | GET /api/engine/friends/requests | |
| SocialApi | listFriends | GET /api/engine/friends | |
| SocialApi | removeFriend | DELETE /api/engine/friends/{userId} | |
| SocialApi | searchUsers | GET /api/engine/users/search | |
| SocialApi | sendFriendRequest | POST /api/engine/friends/requests | |
| SocialApi | unblockUser | DELETE /api/engine/friends/{userId}/block |
Documentation For Models #
- Action
- AddBot
- Bot
- BotAction
- Bots
- CommandAccepted
- CreateGame
- CreateSolo
- Created
- DeviceRegistration
- DisplayNameUpdate
- DisplayNameUpdated
- ErrorCode
- ErrorResponse
- Forfeit
- Frame
- Frames
- Friend
- FriendRequest
- FriendRequestResult
- FriendRequests
- FriendTarget
- Friends
- FriendsGames
- GameAccess
- GameStatus
- GameSummary
- Health
- Join
- JoinByCode
- Lobby
- LobbyCommand
- MyGames
- Outcome
- Player
- PlayerGames
- Players
- Profile
- Rating
- RatingDelta
- RatingHistory
- RatingHistoryEntry
- RatingIdentity
- Ratings
- Seat
- Session
- SoloStarted
- UserSearch
- UsernameUpdate
- UsernameUpdated
Documentation For Authorization #
Authentication schemes defined for the API:
firebase #
- Type: HTTP Bearer Token authentication (JWT)
botHmac #
- Type: API key
- API key parameter name: Eigen-Signature
- Location: HTTP header