The version numbers correspond to the Neucore version numbers.
When updating, check the generator version in .openapi-generator/VERSION, a new version may break backwards compatibility.
Breaking changes
- 1.43.0
Player.character_id is now an integer instead of string.
Client library of Neucore API
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 2.4.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import neucoreapi "github.com/bravecollective/neucore-api-go"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), neucoreapi.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), neucoreapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), neucoreapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), neucoreapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to https://localhost/api
Class | Method | HTTP request | Description |
---|---|---|---|
ApplicationApi | ShowV1 | Get /app/v1/show | Show app information. |
ApplicationCharactersApi | CharacterListV1 | Post /app/v1/character-list | Returns all known characters from the parameter list. |
ApplicationCharactersApi | CharactersBulkV1 | Post /app/v1/characters | Returns all characters from multiple player accounts identified by character IDs. |
ApplicationCharactersApi | CharactersV1 | Get /app/v1/characters/{characterId} | Returns all characters of the player account to which the character ID belongs. |
ApplicationCharactersApi | CorporationCharactersV1 | Get /app/v1/corp-characters/{corporationId} | Returns a list of all known characters from the corporation. |
ApplicationCharactersApi | CorporationPlayersV1 | Get /app/v1/corp-players/{corporationId} | Returns a list of all players that have a character in the corporation. |
ApplicationCharactersApi | IncomingCharactersV1 | Get /app/v1/incoming-characters/{characterId} | Returns all characters that were moved from another account to the player account to which the ID belongs. |
ApplicationCharactersApi | MainV1 | Get /app/v1/main/{cid} | Returns the main character of the player account to which the character ID belongs. |
ApplicationCharactersApi | MainV2 | Get /app/v2/main/{cid} | Returns the main character of the player account to which the character ID belongs. |
ApplicationCharactersApi | PlayerCharactersV1 | Get /app/v1/player-chars/{playerId} | Returns all characters from the player account. |
ApplicationCharactersApi | PlayerV1 | Get /app/v1/player/{characterId} | Returns the player account to which the character ID belongs. |
ApplicationCharactersApi | PlayerWithCharactersV1 | Get /app/v1/player-with-characters/{characterId} | Returns the player account to which the character ID belongs with all characters. |
ApplicationCharactersApi | PlayersV1 | Post /app/v1/players | Returns player accounts identified by character IDs. Can contain the same player several times. |
ApplicationCharactersApi | RemovedCharactersV1 | Get /app/v1/removed-characters/{characterId} | Returns all characters that were removed from the player account to which the character ID belongs. |
ApplicationESIApi | EsiAccessTokenV1 | Get /app/v1/esi/access-token/{characterId} | Returns an access token for a character and EVE login. |
ApplicationESIApi | EsiEveLoginCharactersV1 | Get /app/v1/esi/eve-login/{name}/characters | Returns character IDs of characters that have an ESI token (including invalid) of an EVE login. |
ApplicationESIApi | EsiEveLoginTokenDataV1 | Get /app/v1/esi/eve-login/{name}/token-data | Returns data for all valid tokens (roles are also checked if applicable) for an EVE login. |
ApplicationESIApi | EsiPostV1 | Post /app/v1/esi | See POST /app/v2/esi |
ApplicationESIApi | EsiPostV2 | Post /app/v2/esi | Same as GET /app/v2/esi, but for POST requests. |
ApplicationESIApi | EsiV1 | Get /app/v1/esi | See GET /app/v2/esi |
ApplicationESIApi | EsiV2 | Get /app/v2/esi | Makes an ESI GET request on behalf on an EVE character and returns the result. |
ApplicationGroupsApi | AllianceGroupsBulkV1 | Post /app/v1/alliance-groups | Return groups of multiple alliances. |
ApplicationGroupsApi | AllianceGroupsV1 | Get /app/v1/alliance-groups/{aid} | Return groups of the alliance. |
ApplicationGroupsApi | AllianceGroupsV2 | Get /app/v2/alliance-groups/{aid} | Return groups of the alliance. |
ApplicationGroupsApi | CorpGroupsBulkV1 | Post /app/v1/corp-groups | Return groups of multiple corporations. |
ApplicationGroupsApi | CorpGroupsV1 | Get /app/v1/corp-groups/{cid} | Return groups of the corporation. |
ApplicationGroupsApi | CorpGroupsV2 | Get /app/v2/corp-groups/{cid} | Return groups of the corporation. |
ApplicationGroupsApi | GroupMembersV1 | Get /app/v1/group-members/{groupId} | Returns the main character IDs from all group members. |
ApplicationGroupsApi | GroupsBulkV1 | Post /app/v1/groups | Return groups of multiple players, identified by one of their character IDs. |
ApplicationGroupsApi | GroupsV1 | Get /app/v1/groups/{cid} | Return groups of the character's player account. |
ApplicationGroupsApi | GroupsV2 | Get /app/v2/groups/{cid} | Return groups of the character's player account. |
ApplicationGroupsApi | GroupsWithFallbackV1 | Get /app/v1/groups-with-fallback | Returns groups from the character's account, if available, or the corporation and alliance. |
ApplicationTrackingApi | MemberTrackingV1 | Get /app/v1/corporation/{id}/member-tracking | Return corporation member tracking data. |
- Alliance
- App
- Character
- CharacterGroups
- CharacterNameChange
- Corporation
- CorporationMember
- EsiAccessToken
- EsiLocation
- EsiToken
- EsiTokenData
- EsiType
- EveLogin
- Group
- GroupApplication
- HourlyAppRequests
- MonthlyAppRequests
- Player
- PlayerLoginStatistics
- PlayerWithCharcterId
- Plugin
- PluginConfigurationDatabase
- PluginConfigurationFile
- PluginConfigurationURL
- RemovedCharacter
- Role
- SearchResult
- ServiceAccount
- SystemVariable
- TotalDailyAppRequests
- TotalMonthlyAppRequests
- Watchlist
Authentication schemes defined for the API:
- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime