bravecollective/neucore-api

Client library of Neucore API

2.7.0 2024-11-23 19:46 UTC

README

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.
  • 1.33.0
    Needs PHP ^7.4 || ^8.0
  • 1.31.1
    Updated guzzlehttp/guzzle to ^7.3 (from ^6.2 || ^7.2)
  • 1.26.0
    Needs PHP ^7.3 || ^8.0
  • 1.21.0
    Needs PHP 7.2+
  • 1.14.0
    The API is now split into several tags. This means that there are now several Api PHP classes instead of just one, the methods remain the same, but they have moved to other classes.
  • 1.4.0
    Generated from OpenAPI v3 definition file.
    The authorization configuration changed, use setAccessToken() instead of setApiKey(), see below.

OpenAPIClient-php

Client library of Neucore API

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": {
    "bravecollective/neucore-api": "~2.7.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');



// Configure Bearer authorization: BearerAuth
$config = Brave\NeucoreApi\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Brave\NeucoreApi\Api\ApplicationApi(
    // 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(),
    $config
);

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

API Endpoints

All URIs are relative to https://localhost/api

Models

Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: Bearer authentication

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: 2.7.0
    • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen