Skip to content

Latest commit

 

History

History
273 lines (174 loc) · 7.22 KB

UserApi.md

File metadata and controls

273 lines (174 loc) · 7.22 KB

destiny2_api.api.UserApi

Load the API package

import 'package:destiny2_api/api.dart';

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

Method HTTP request Description
userGetAvailableThemes GET /User/GetAvailableThemes/
userGetBungieNetUserById GET /User/GetBungieNetUserById/{id}/
userGetMembershipDataById GET /User/GetMembershipsById/{membershipId}/{membershipType}/
userGetMembershipDataForCurrentUser GET /User/GetMembershipsForCurrentUser/
userGetPartnerships GET /User/{membershipId}/Partnerships/
userSearchUsers GET /User/SearchUsers/

userGetAvailableThemes

InlineResponse2004 userGetAvailableThemes()

Returns a list of all available user themes.

Example

import 'package:destiny2_api/api.dart';

var api_instance = new UserApi();

try { 
    var result = api_instance.userGetAvailableThemes();
    print(result);
} catch (e) {
    print("Exception when calling UserApi->userGetAvailableThemes: $e\n");
}

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse2004

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

userGetBungieNetUserById

InlineResponse2002 userGetBungieNetUserById(id)

Loads a bungienet user by membership id.

Example

import 'package:destiny2_api/api.dart';

var api_instance = new UserApi();
var id = 789; // int | The requested Bungie.net membership id.

try { 
    var result = api_instance.userGetBungieNetUserById(id);
    print(result);
} catch (e) {
    print("Exception when calling UserApi->userGetBungieNetUserById: $e\n");
}

Parameters

Name Type Description Notes
id int The requested Bungie.net membership id.

Return type

InlineResponse2002

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

userGetMembershipDataById

InlineResponse2005 userGetMembershipDataById(membershipId, membershipType)

Returns a list of accounts associated with the supplied membership ID and membership type. This will include all linked accounts (even when hidden) if supplied credentials permit it.

Example

import 'package:destiny2_api/api.dart';

var api_instance = new UserApi();
var membershipId = 789; // int | The membership ID of the target user.
var membershipType = 56; // int | Type of the supplied membership ID.

try { 
    var result = api_instance.userGetMembershipDataById(membershipId, membershipType);
    print(result);
} catch (e) {
    print("Exception when calling UserApi->userGetMembershipDataById: $e\n");
}

Parameters

Name Type Description Notes
membershipId int The membership ID of the target user.
membershipType int Type of the supplied membership ID.

Return type

InlineResponse2005

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

userGetMembershipDataForCurrentUser

InlineResponse2005 userGetMembershipDataForCurrentUser()

Returns a list of accounts associated with signed in user. This is useful for OAuth implementations that do not give you access to the token response.

Example

import 'package:destiny2_api/api.dart';
// TODO Configure OAuth2 access token for authorization: oauth2
//destiny2_api.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';

var api_instance = new UserApi();

try { 
    var result = api_instance.userGetMembershipDataForCurrentUser();
    print(result);
} catch (e) {
    print("Exception when calling UserApi->userGetMembershipDataForCurrentUser: $e\n");
}

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse2005

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

userGetPartnerships

InlineResponse2006 userGetPartnerships(membershipId)

Returns a user's linked Partnerships.

Example

import 'package:destiny2_api/api.dart';

var api_instance = new UserApi();
var membershipId = 789; // int | The ID of the member for whom partnerships should be returned.

try { 
    var result = api_instance.userGetPartnerships(membershipId);
    print(result);
} catch (e) {
    print("Exception when calling UserApi->userGetPartnerships: $e\n");
}

Parameters

Name Type Description Notes
membershipId int The ID of the member for whom partnerships should be returned.

Return type

InlineResponse2006

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

userSearchUsers

InlineResponse2003 userSearchUsers(q)

Returns a list of possible users based on the search string

Example

import 'package:destiny2_api/api.dart';

var api_instance = new UserApi();
var q = q_example; // String | The search string.

try { 
    var result = api_instance.userSearchUsers(q);
    print(result);
} catch (e) {
    print("Exception when calling UserApi->userSearchUsers: $e\n");
}

Parameters

Name Type Description Notes
q String The search string. [optional]

Return type

InlineResponse2003

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]