getDestinyEntityDefinition function

Future<ServerResponse<DestinyDefinition>> getDestinyEntityDefinition (HttpClient http, GetDestinyEntityDefinitionParams params)

Returns the static definition of an entity of the given Type and hash identifier. Examine the API Documentation for the Type Names of entities that have their own definitions. Note that the return type will always inherit from DestinyDefinition, but the specific type returned will be the requested entity type if it can be found. Please don't use this as a chatty alternative to the Manifest database if you require large sets of data, but for simple and one-off accesses this should be handy.

Implementation

Future<ServerResponse<DestinyDefinition>> getDestinyEntityDefinition(HttpClient http, GetDestinyEntityDefinitionParams params) {
  return http.request(new HttpClientConfig(
    'GET',
    "https://www.bungie.net/Platform/Destiny2/Manifest/${params.entityType}/${params.hashIdentifier}/",
    null,
    null
    ));
}