yogarine/bungie-sdk-php

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

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 2020-11-11 09:20 UTC

This package is auto-updated.

Last update: 2021-11-11 11:34:19 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

Class Method HTTP request Description
DefaultApi getAvailableLocales GET /GetAvailableLocales/
DefaultApi getCommonSettings GET /Settings/
DefaultApi getGlobalAlerts GET /GlobalAlerts/
DefaultApi getUserSystemOverrides GET /UserSystemOverrides/
AppApi getApplicationApiUsage GET /App/ApiUsage/{applicationId}/
AppApi getBungieApplications GET /App/FirstParty/
CommunityContentApi getCommunityContent GET /CommunityContent/Get/{sort}/{mediaFilter}/{page}/
ContentApi getContentById GET /Content/GetContentById/{id}/{locale}/
ContentApi getContentByTagAndType GET /Content/GetContentByTagAndType/{tag}/{type}/{locale}/
ContentApi getContentType GET /Content/GetContentType/{type}/
ContentApi searchContentByTagAndType GET /Content/SearchContentByTagAndType/{tag}/{type}/{locale}/
ContentApi searchContentWithText GET /Content/Search/{locale}/
ContentApi searchHelpArticles GET /Content/SearchHelpArticles/{searchtext}/{size}/
Destiny2Api awaGetActionToken GET /Destiny2/Awa/GetActionToken/{correlationId}/
Destiny2Api awaInitializeRequest POST /Destiny2/Awa/Initialize/
Destiny2Api awaProvideAuthorizationResult POST /Destiny2/Awa/AwaProvideAuthorizationResult/
Destiny2Api equipItem POST /Destiny2/Actions/Items/EquipItem/
Destiny2Api equipItems POST /Destiny2/Actions/Items/EquipItems/
Destiny2Api getActivityHistory GET /Destiny2/{membershipType}/Account/{destinyMembershipId}/Character/{characterId}/Stats/Activities/
Destiny2Api getCharacter GET /Destiny2/{membershipType}/Profile/{destinyMembershipId}/Character/{characterId}/
Destiny2Api getClanAggregateStats GET /Destiny2/Stats/AggregateClanStats/{groupId}/
Destiny2Api getClanLeaderboards GET /Destiny2/Stats/Leaderboards/Clans/{groupId}/
Destiny2Api getClanWeeklyRewardState GET /Destiny2/Clan/{groupId}/WeeklyRewardState/
Destiny2Api getCollectibleNodeDetails GET /Destiny2/{membershipType}/Profile/{destinyMembershipId}/Character/{characterId}/Collectibles/{collectiblePresentationNodeHash}/
Destiny2Api getDestinyAggregateActivityStats GET /Destiny2/{membershipType}/Account/{destinyMembershipId}/Character/{characterId}/Stats/AggregateActivityStats/
Destiny2Api getDestinyEntityDefinition GET /Destiny2/Manifest/{entityType}/{hashIdentifier}/
Destiny2Api getDestinyManifest GET /Destiny2/Manifest/
Destiny2Api getHistoricalStats GET /Destiny2/{membershipType}/Account/{destinyMembershipId}/Character/{characterId}/Stats/
Destiny2Api getHistoricalStatsDefinition GET /Destiny2/Stats/Definition/
Destiny2Api getHistoricalStatsForAccount GET /Destiny2/{membershipType}/Account/{destinyMembershipId}/Stats/
Destiny2Api getItem GET /Destiny2/{membershipType}/Profile/{destinyMembershipId}/Item/{itemInstanceId}/
Destiny2Api getLeaderboards GET /Destiny2/{membershipType}/Account/{destinyMembershipId}/Stats/Leaderboards/
Destiny2Api getLeaderboardsForCharacter GET /Destiny2/Stats/Leaderboards/{membershipType}/{destinyMembershipId}/{characterId}/
Destiny2Api getLinkedProfiles GET /Destiny2/{membershipType}/Profile/{membershipId}/LinkedProfiles/
Destiny2Api getPostGameCarnageReport GET /Destiny2/Stats/PostGameCarnageReport/{activityId}/
Destiny2Api getProfile GET /Destiny2/{membershipType}/Profile/{destinyMembershipId}/
Destiny2Api getPublicMilestoneContent GET /Destiny2/Milestones/{milestoneHash}/Content/
Destiny2Api getPublicMilestones GET /Destiny2/Milestones/
Destiny2Api getPublicVendors GET /Destiny2/Vendors/
Destiny2Api getUniqueWeaponHistory GET /Destiny2/{membershipType}/Account/{destinyMembershipId}/Character/{characterId}/Stats/UniqueWeapons/
Destiny2Api getVendor GET /Destiny2/{membershipType}/Profile/{destinyMembershipId}/Character/{characterId}/Vendors/{vendorHash}/
Destiny2Api getVendors GET /Destiny2/{membershipType}/Profile/{destinyMembershipId}/Character/{characterId}/Vendors/
Destiny2Api insertSocketPlug POST /Destiny2/Actions/Items/InsertSocketPlug/
Destiny2Api pullFromPostmaster POST /Destiny2/Actions/Items/PullFromPostmaster/
Destiny2Api reportOffensivePostGameCarnageReportPlayer POST /Destiny2/Stats/PostGameCarnageReport/{activityId}/Report/
Destiny2Api searchDestinyEntities GET /Destiny2/Armory/Search/{type}/{searchTerm}/
Destiny2Api searchDestinyPlayer GET /Destiny2/SearchDestinyPlayer/{membershipType}/{displayName}/
Destiny2Api setItemLockState POST /Destiny2/Actions/Items/SetLockState/
Destiny2Api setQuestTrackedState POST /Destiny2/Actions/Items/SetTrackedState/
Destiny2Api transferItem POST /Destiny2/Actions/Items/TransferItem/
FireteamApi getActivePrivateClanFireteamCount GET /Fireteam/Clan/{groupId}/ActiveCount/
FireteamApi getAvailableClanFireteams GET /Fireteam/Clan/{groupId}/Available/{platform}/{activityType}/{dateRange}/{slotFilter}/{publicOnly}/{page}/
FireteamApi getClanFireteam GET /Fireteam/Clan/{groupId}/Summary/{fireteamId}/
FireteamApi getMyClanFireteams GET /Fireteam/Clan/{groupId}/My/{platform}/{includeClosed}/{page}/
FireteamApi searchPublicAvailableClanFireteams GET /Fireteam/Search/Available/{platform}/{activityType}/{dateRange}/{slotFilter}/{page}/
ForumApi getCoreTopicsPaged GET /Forum/GetCoreTopicsPaged/{page}/{sort}/{quickDate}/{categoryFilter}/
ForumApi getForumTagSuggestions GET /Forum/GetForumTagSuggestions/
ForumApi getPoll GET /Forum/Poll/{topicId}/
ForumApi getPostAndParent GET /Forum/GetPostAndParent/{childPostId}/
ForumApi getPostAndParentAwaitingApproval GET /Forum/GetPostAndParentAwaitingApproval/{childPostId}/
ForumApi getPostsThreadedPaged GET /Forum/GetPostsThreadedPaged/{parentPostId}/{page}/{pageSize}/{replySize}/{getParentPost}/{rootThreadMode}/{sortMode}/
ForumApi getPostsThreadedPagedFromChild GET /Forum/GetPostsThreadedPagedFromChild/{childPostId}/{page}/{pageSize}/{replySize}/{rootThreadMode}/{sortMode}/
ForumApi getRecruitmentThreadSummaries POST /Forum/Recruit/Summaries/
ForumApi getTopicForContent GET /Forum/GetTopicForContent/{contentId}/
ForumApi getTopicsPaged GET /Forum/GetTopicsPaged/{page}/{pageSize}/{group}/{sort}/{quickDate}/{categoryFilter}/
GroupV2Api abdicateFoundership POST /GroupV2/{groupId}/Admin/AbdicateFoundership/{membershipType}/{founderIdNew}/
GroupV2Api addOptionalConversation POST /GroupV2/{groupId}/OptionalConversations/Add/
GroupV2Api approveAllPending POST /GroupV2/{groupId}/Members/ApproveAll/
GroupV2Api approvePending POST /GroupV2/{groupId}/Members/Approve/{membershipType}/{membershipId}/
GroupV2Api approvePendingForList POST /GroupV2/{groupId}/Members/ApproveList/
GroupV2Api banMember POST /GroupV2/{groupId}/Members/{membershipType}/{membershipId}/Ban/
GroupV2Api denyAllPending POST /GroupV2/{groupId}/Members/DenyAll/
GroupV2Api denyPendingForList POST /GroupV2/{groupId}/Members/DenyList/
GroupV2Api editClanBanner POST /GroupV2/{groupId}/EditClanBanner/
GroupV2Api editFounderOptions POST /GroupV2/{groupId}/EditFounderOptions/
GroupV2Api editGroup POST /GroupV2/{groupId}/Edit/
GroupV2Api editGroupMembership POST /GroupV2/{groupId}/Members/{membershipType}/{membershipId}/SetMembershipType/{memberType}/
GroupV2Api editOptionalConversation POST /GroupV2/{groupId}/OptionalConversations/Edit/{conversationId}/
GroupV2Api getAdminsAndFounderOfGroup GET /GroupV2/{groupId}/AdminsAndFounder/
GroupV2Api getAvailableAvatars GET /GroupV2/GetAvailableAvatars/
GroupV2Api getAvailableThemes GET /GroupV2/GetAvailableThemes/
GroupV2Api getBannedMembersOfGroup GET /GroupV2/{groupId}/Banned/
GroupV2Api getGroup GET /GroupV2/{groupId}/
GroupV2Api getGroupByName GET /GroupV2/Name/{groupName}/{groupType}/
GroupV2Api getGroupByNameV2 POST /GroupV2/NameV2/
GroupV2Api getGroupOptionalConversations GET /GroupV2/{groupId}/OptionalConversations/
GroupV2Api getGroupsForMember GET /GroupV2/User/{membershipType}/{membershipId}/{filter}/{groupType}/
GroupV2Api getInvitedIndividuals GET /GroupV2/{groupId}/Members/InvitedIndividuals/
GroupV2Api getMembersOfGroup GET /GroupV2/{groupId}/Members/
GroupV2Api getPendingMemberships GET /GroupV2/{groupId}/Members/Pending/
GroupV2Api getPotentialGroupsForMember GET /GroupV2/User/Potential/{membershipType}/{membershipId}/{filter}/{groupType}/
GroupV2Api getRecommendedGroups POST /GroupV2/Recommended/{groupType}/{createDateRange}/
GroupV2Api getUserClanInviteSetting GET /GroupV2/GetUserClanInviteSetting/{mType}/
GroupV2Api groupSearch POST /GroupV2/Search/
GroupV2Api individualGroupInvite POST /GroupV2/{groupId}/Members/IndividualInvite/{membershipType}/{membershipId}/
GroupV2Api individualGroupInviteCancel POST /GroupV2/{groupId}/Members/IndividualInviteCancel/{membershipType}/{membershipId}/
GroupV2Api kickMember POST /GroupV2/{groupId}/Members/{membershipType}/{membershipId}/Kick/
GroupV2Api recoverGroupForFounder GET /GroupV2/Recover/{membershipType}/{membershipId}/{groupType}/
GroupV2Api unbanMember POST /GroupV2/{groupId}/Members/{membershipType}/{membershipId}/Unban/
PreviewApi getClanAggregateStats GET /Destiny2/Stats/AggregateClanStats/{groupId}/
PreviewApi getClanLeaderboards GET /Destiny2/Stats/Leaderboards/Clans/{groupId}/
PreviewApi getLeaderboards GET /Destiny2/{membershipType}/Account/{destinyMembershipId}/Stats/Leaderboards/
PreviewApi getLeaderboardsForCharacter GET /Destiny2/Stats/Leaderboards/{membershipType}/{destinyMembershipId}/{characterId}/
PreviewApi getPublicVendors GET /Destiny2/Vendors/
PreviewApi insertSocketPlug POST /Destiny2/Actions/Items/InsertSocketPlug/
TokensApi applyMissingPartnerOffersWithoutClaim POST /Tokens/Partner/ApplyMissingOffers/{partnerApplicationId}/{targetBnetMembershipId}/
TokensApi claimPartnerOffer POST /Tokens/Partner/ClaimOffer/
TokensApi getPartnerOfferSkuHistory GET /Tokens/Partner/History/{partnerApplicationId}/{targetBnetMembershipId}/
TrendingApi getTrendingCategories GET /Trending/Categories/
TrendingApi getTrendingCategory GET /Trending/Categories/{categoryId}/{pageNumber}/
TrendingApi getTrendingEntryDetail GET /Trending/Details/{trendingEntryType}/{identifier}/
UserApi getAvailableThemes GET /User/GetAvailableThemes/
UserApi getBungieNetUserById GET /User/GetBungieNetUserById/{id}/
UserApi getCredentialTypesForTargetAccount GET /User/GetCredentialTypesForTargetAccount/{membershipId}/
UserApi getMembershipDataById GET /User/GetMembershipsById/{membershipId}/{membershipType}/
UserApi getMembershipDataForCurrentUser GET /User/GetMembershipsForCurrentUser/
UserApi getMembershipFromHardLinkedCredential GET /User/GetMembershipFromHardLinkedCredential/{crType}/{credential}/
UserApi searchUsers GET /User/SearchUsers/

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 user the partner offer api to claim rewards defined for a partner

Author

support@bungie.com