instagram-graph-api
Version:
A library to help perform requests to the Instagram Graph API.
36 lines (35 loc) • 890 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetMeRequest = void 0;
const AbstractRequest_1 = require("../../AbstractRequest");
const GetMeResponse_1 = require("./GetMeResponse");
/**
* A Get request to obtain information about the user making it.
*
* @author Tiago Grosso <tiagogrosso99@gmail.com>
* @since 0.3.0
*/
class GetMeRequest extends AbstractRequest_1.AbstractRequest {
/**
* The constructor.
*
* @param accessToken the access token.
*/
constructor(accessToken) {
super(accessToken);
this.params.fields = 'instagram_business_account';
}
/**
* @inheritdoc
*/
parseResponse(response) {
return new GetMeResponse_1.GetMeResponse(response.data);
}
/**
* @inheritdoc
*/
url() {
return '/me';
}
}
exports.GetMeRequest = GetMeRequest;