tkhamez/swagger-eve-php

An OpenAPI Client Library for EVE Online (ESI)

10.0.0 2024-07-14 19:15 UTC

README

An OpenAPI for EVE Online.

This client is generated from the "underscore routes".

It contains one patch that removes validation of all enum attributes because CCP declared extending those to be no longer a breaking change, see ESI changelog. This patch might be incomplete if I missed something after an API update.

Versioning scheme since 1.0.0
  • Patch: Generated client from a new swagger.json file, refer to esi-issues/changelog.md (note, however, that the date is not always correct there) and/or generated with a new patch version of the generator library.
  • Minor: Switched to a new minor version of the generator library.
  • Major: Switched to a new major version of the generator library, switched to another generator library or another breaking change.

See https://github.com/OpenAPITools/openapi-generator/releases for generator library changes.

Notable changes other than API updates

10.0.0

  • Added patch that removes the exception if a response contains more elements than declared.

8.0.0

  • Raised minimum PHP requirement to 7.4

7.1.0

  • Require Guzzle HTTP client ^7.3.

7.0.0

  • Raised minimum PHP requirement to 7.3

6.1.0

  • Require guzzlehttp/psr7 < version 2 (this library uses functions that were removed in 2.0).

5.0.0

  • Added patch to allow Guzzle HTTP client ^7.2 together with ^6.2 (7.2 requires PHP ^7.2.5 || ^8.0).

4.0.0

  • Removed previous patches.
  • Added patch to removed validation of all enum attributes.

3.2.0

  • Added DISABLE_TYPE_VALIDATION.patch: Disables validation of character notification type (CCP adds new types without increasing the endpoint version or mentioning it in the changelog).

3.1.0

  • Added TYPE_WAR_ADOPTED2.patch: The notification type "WarAdopted " has a space at the end in the swagger_latest.json file and in the response from ESI. But the generated client somehow removes that, so the validation fails. This patch adds "WarAdopted ".

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "require": {
    "tkhamez/swagger-eve-php": "8.2.0"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new Swagger\Client\Eve\Api\AllianceApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$datasource = 'tranquility'; // string | The server name you would like data from
$if_none_match = 'if_none_match_example'; // string | ETag from a previous request. A 304 will be returned if this matches the current ETag

try {
    $result = $apiInstance->getAlliances($datasource, $if_none_match);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AllianceApi->getAlliances: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://esi.evetech.net

Models

Authorization

Authentication schemes defined for the API:

evesso

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://login.eveonline.com/v2/oauth/authorize
  • Scopes:
    • esi-alliances.read_contacts.v1: EVE SSO scope esi-alliances.read_contacts.v1
    • esi-assets.read_assets.v1: EVE SSO scope esi-assets.read_assets.v1
    • esi-assets.read_corporation_assets.v1: EVE SSO scope esi-assets.read_corporation_assets.v1
    • esi-bookmarks.read_character_bookmarks.v1: EVE SSO scope esi-bookmarks.read_character_bookmarks.v1
    • esi-bookmarks.read_corporation_bookmarks.v1: EVE SSO scope esi-bookmarks.read_corporation_bookmarks.v1
    • esi-calendar.read_calendar_events.v1: EVE SSO scope esi-calendar.read_calendar_events.v1
    • esi-calendar.respond_calendar_events.v1: EVE SSO scope esi-calendar.respond_calendar_events.v1
    • esi-characters.read_agents_research.v1: EVE SSO scope esi-characters.read_agents_research.v1
    • esi-characters.read_blueprints.v1: EVE SSO scope esi-characters.read_blueprints.v1
    • esi-characters.read_contacts.v1: EVE SSO scope esi-characters.read_contacts.v1
    • esi-characters.read_corporation_roles.v1: EVE SSO scope esi-characters.read_corporation_roles.v1
    • esi-characters.read_fatigue.v1: EVE SSO scope esi-characters.read_fatigue.v1
    • esi-characters.read_fw_stats.v1: EVE SSO scope esi-characters.read_fw_stats.v1
    • esi-characters.read_loyalty.v1: EVE SSO scope esi-characters.read_loyalty.v1
    • esi-characters.read_medals.v1: EVE SSO scope esi-characters.read_medals.v1
    • esi-characters.read_notifications.v1: EVE SSO scope esi-characters.read_notifications.v1
    • esi-characters.read_opportunities.v1: EVE SSO scope esi-characters.read_opportunities.v1
    • esi-characters.read_standings.v1: EVE SSO scope esi-characters.read_standings.v1
    • esi-characters.read_titles.v1: EVE SSO scope esi-characters.read_titles.v1
    • esi-characters.write_contacts.v1: EVE SSO scope esi-characters.write_contacts.v1
    • esi-clones.read_clones.v1: EVE SSO scope esi-clones.read_clones.v1
    • esi-clones.read_implants.v1: EVE SSO scope esi-clones.read_implants.v1
    • esi-contracts.read_character_contracts.v1: EVE SSO scope esi-contracts.read_character_contracts.v1
    • esi-contracts.read_corporation_contracts.v1: EVE SSO scope esi-contracts.read_corporation_contracts.v1
    • esi-corporations.read_blueprints.v1: EVE SSO scope esi-corporations.read_blueprints.v1
    • esi-corporations.read_contacts.v1: EVE SSO scope esi-corporations.read_contacts.v1
    • esi-corporations.read_container_logs.v1: EVE SSO scope esi-corporations.read_container_logs.v1
    • esi-corporations.read_corporation_membership.v1: EVE SSO scope esi-corporations.read_corporation_membership.v1
    • esi-corporations.read_divisions.v1: EVE SSO scope esi-corporations.read_divisions.v1
    • esi-corporations.read_facilities.v1: EVE SSO scope esi-corporations.read_facilities.v1
    • esi-corporations.read_fw_stats.v1: EVE SSO scope esi-corporations.read_fw_stats.v1
    • esi-corporations.read_medals.v1: EVE SSO scope esi-corporations.read_medals.v1
    • esi-corporations.read_standings.v1: EVE SSO scope esi-corporations.read_standings.v1
    • esi-corporations.read_starbases.v1: EVE SSO scope esi-corporations.read_starbases.v1
    • esi-corporations.read_structures.v1: EVE SSO scope esi-corporations.read_structures.v1
    • esi-corporations.read_titles.v1: EVE SSO scope esi-corporations.read_titles.v1
    • esi-corporations.track_members.v1: EVE SSO scope esi-corporations.track_members.v1
    • esi-fittings.read_fittings.v1: EVE SSO scope esi-fittings.read_fittings.v1
    • esi-fittings.write_fittings.v1: EVE SSO scope esi-fittings.write_fittings.v1
    • esi-fleets.read_fleet.v1: EVE SSO scope esi-fleets.read_fleet.v1
    • esi-fleets.write_fleet.v1: EVE SSO scope esi-fleets.write_fleet.v1
    • esi-industry.read_character_jobs.v1: EVE SSO scope esi-industry.read_character_jobs.v1
    • esi-industry.read_character_mining.v1: EVE SSO scope esi-industry.read_character_mining.v1
    • esi-industry.read_corporation_jobs.v1: EVE SSO scope esi-industry.read_corporation_jobs.v1
    • esi-industry.read_corporation_mining.v1: EVE SSO scope esi-industry.read_corporation_mining.v1
    • esi-killmails.read_corporation_killmails.v1: EVE SSO scope esi-killmails.read_corporation_killmails.v1
    • esi-killmails.read_killmails.v1: EVE SSO scope esi-killmails.read_killmails.v1
    • esi-location.read_location.v1: EVE SSO scope esi-location.read_location.v1
    • esi-location.read_online.v1: EVE SSO scope esi-location.read_online.v1
    • esi-location.read_ship_type.v1: EVE SSO scope esi-location.read_ship_type.v1
    • esi-mail.organize_mail.v1: EVE SSO scope esi-mail.organize_mail.v1
    • esi-mail.read_mail.v1: EVE SSO scope esi-mail.read_mail.v1
    • esi-mail.send_mail.v1: EVE SSO scope esi-mail.send_mail.v1
    • esi-markets.read_character_orders.v1: EVE SSO scope esi-markets.read_character_orders.v1
    • esi-markets.read_corporation_orders.v1: EVE SSO scope esi-markets.read_corporation_orders.v1
    • esi-markets.structure_markets.v1: EVE SSO scope esi-markets.structure_markets.v1
    • esi-planets.manage_planets.v1: EVE SSO scope esi-planets.manage_planets.v1
    • esi-planets.read_customs_offices.v1: EVE SSO scope esi-planets.read_customs_offices.v1
    • esi-search.search_structures.v1: EVE SSO scope esi-search.search_structures.v1
    • esi-skills.read_skillqueue.v1: EVE SSO scope esi-skills.read_skillqueue.v1
    • esi-skills.read_skills.v1: EVE SSO scope esi-skills.read_skills.v1
    • esi-ui.open_window.v1: EVE SSO scope esi-ui.open_window.v1
    • esi-ui.write_waypoint.v1: EVE SSO scope esi-ui.write_waypoint.v1
    • esi-universe.read_structures.v1: EVE SSO scope esi-universe.read_structures.v1
    • esi-wallet.read_character_wallet.v1: EVE SSO scope esi-wallet.read_character_wallet.v1
    • esi-wallet.read_corporation_wallets.v1: EVE SSO scope esi-wallet.read_corporation_wallets.v1

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.24
    • Generator version: 7.6.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen