yogarine/bungie-d1-sdk-php

These are legacy endpoints for Destiny 1 that are no longer supported officially by Bungie.

v1.0.1 2023-01-07 19:26 UTC

This package is auto-updated.

Last update: 2024-11-07 23:28:14 UTC


README

These are legacy endpoints for Destiny 1 that are no longer supported officially by Bungie.

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-d1-sdk-php.git"
    }
  ],
  "require": {
    "yogarine/bungie-d1-sdk-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/bungie-d1-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\D1\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Bungie\D1\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = Bungie\D1\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Bungie\D1\Api\DestinyApi(
    // 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
);
$inlineObject1 = new InlineObject1(); // \Bungie\D1\Model\inline_object_1 | 

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

?>

Documentation for API Endpoints

All URIs are relative to https://bungie.net/d1/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.
  • 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.

Author

lowlines89@gmail.com