yogarine/bungie-sdk-php

These endpoints constitute the functionality exposed by Bungie.net, both for more traditional website functionality and for connectivity to Bungie video games and their related functionality.

dev-master 2023-01-07 19:16 UTC

README

These endpoints constitute the functionality exposed by Bungie.net, both for more traditional website functionality and for connectivity to Bungie video games and their related functionality.

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

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/yogarine/bungie-sdk-php.git"
    }
  ],
  "require": {
    "yogarine/bungie-sdk-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/bungie-sdk-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

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

// Configure API key authorization: apiKey
$config = Bungie\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Bungie\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$apiInstance = new Bungie\Api\DefaultApi(
    // 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->getAvailableLocales();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getAvailableLocales: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://www.bungie.net/Platform

Documentation For Models

Documentation For Authorization

apiKey

  • Type: API key
  • API key parameter name: X-API-Key
  • Location: HTTP header

oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://www.bungie.net/en/OAuth/Authorize
  • Scopes:
  • ReadBasicUserProfile: Read basic user profile information such as the user's handle, avatar icon, etc.
  • ReadGroups: Read Group/Clan Forums, Wall, and Members for groups and clans that the user has joined.
  • WriteGroups: Write Group/Clan Forums, Wall, and Members for groups and clans that the user has joined.
  • AdminGroups: Administer Group/Clan Forums, Wall, and Members for groups and clans that the user is a founder or an administrator.
  • BnetWrite: Create new groups, clans, and forum posts, along with other actions that are reserved for Bungie.net elevated scope: not meant to be used by third party applications.
  • MoveEquipDestinyItems: Move or equip Destiny items
  • ReadDestinyInventoryAndVault: Read Destiny 1 Inventory and Vault contents. For Destiny 2, this scope is needed to read anything regarded as private. This is the only scope a Destiny 2 app needs for read operations against Destiny 2 data such as inventory, vault, currency, vendors, milestones, progression, etc.
  • ReadUserData: Read user data such as who they are web notifications, clan/group memberships, recent activity, muted users.
  • EditUserData: Edit user data such as preferred language, status, motto, avatar selection and theme.
  • ReadDestinyVendorsAndAdvisors: Access vendor and advisor data specific to a user. OBSOLETE. This scope is only used on the Destiny 1 API.
  • ReadAndApplyTokens: Read offer history and claim and apply tokens for the user.
  • AdvancedWriteActions: Can perform actions that will result in a prompt to the user via the Destiny app.
  • PartnerOfferGrant: Can use the partner offer api to claim rewards defined for a partner
  • DestinyUnlockValueQuery: Allows an app to query sensitive information like unlock flags and values not available through normal methods.
  • UserPiiRead: Allows an app to query sensitive user PII, most notably email information.

Author

support@bungie.com