UNPKG

quria

Version:

A user-friendly Destiny 2 API Wrapper written with TypeScript and approved by -Axis Minds- Oryx.

56 lines (53 loc) 3.78 kB
import { ITokens, APIResponse, BungieFriendListResponse, BungieFriendRequestListResponse, PlatformFriendType, PlatformFriendResponse } from "../../types"; export declare class Social { private url; private headers; constructor(url: string, headers: Record<string, string>); /** * Returns your Bungie Friend list * @returns Returns your Bungie Friend list */ GetFriendList(tokens?: ITokens): Promise<APIResponse<BungieFriendListResponse>>; /** * Returns your friend request queue. * @returns Returns your friend request queue. */ GetFriendRequestList(tokens?: ITokens): Promise<APIResponse<BungieFriendRequestListResponse>>; /** * Requests a friend relationship with the target user. Any of the target user's linked membership ids are valid inputs. * @param membershipId The membership id of the user you wish to add. * @returns Requests a friend relationship with the target user. Any of the target user's linked membership ids are valid inputs. */ IssueFriendRequest(membershipId: string, tokens?: ITokens): Promise<APIResponse<boolean>>; /** * Accepts a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not. * @param membershipId The membership id of the user you wish to accept. * @returns Accepts a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not. */ AcceptFriendRequest(membershipId: string, tokens?: ITokens): Promise<APIResponse<boolean>>; /** * Declines a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not. * @param membershipId The membership id of the user you wish to decline. * @returns Declines a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not. */ DeclineFriendRequest(membershipId: string, tokens?: ITokens): Promise<APIResponse<boolean>>; /** * Remove a friend relationship with the target user. The user must be on your friend list, though no error will occur if they are not. * @param membershipId The membership id of the user you wish to remove. * @returns Remove a friend relationship with the target user. The user must be on your friend list, though no error will occur if they are not. */ RemoveFriend(membershipId: string, tokens?: ITokens): Promise<APIResponse<boolean>>; /** * Remove a friend relationship with the target user. The user must be on your outgoing request friend list, though no error will occur if they are not. * @param membershipId The membership id of the user you wish to remove. * @returns Remove a friend relationship with the target user. The user must be on your outgoing request friend list, though no error will occur if they are not. */ RemoveFriendRequest(membershipId: string, tokens?: ITokens): Promise<APIResponse<boolean>>; /** * Gets the platform friend of the requested type, with additional information if they have Bungie accounts. Must have a recent login session with said platform. * @param friendPlatform The platform friend type. * @param page The zero based page to return. Page size is 100. * @returns Gets the platform friend of the requested type, with additional information if they have Bungie accounts. Must have a recent login session with said platform. */ GetPlatformFriendList(friendPlatform: PlatformFriendType, page: string, tokens?: ITokens): Promise<APIResponse<PlatformFriendResponse>>; }