UNPKG

instagram-graph-api

Version:

A library to help perform requests to the Instagram Graph API.

39 lines (38 loc) 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetHashtagIdRequest = void 0; const AbstractRequest_1 = require("../../AbstractRequest"); const GetHashtagIdResponse_1 = require("./GetHashtagIdResponse"); /** * A request that gets the id of an hashtag. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.4.0 */ class GetHashtagIdRequest extends AbstractRequest_1.AbstractRequest { /** * The constructor * * @param accessToken the access token. * @param userId the id of the user making the request * @param hashtag the hashtag. */ constructor(accessToken, userId, hashtag) { super(accessToken); this.params.q = hashtag; this.params.user_id = userId; } /** * @inheritdoc */ parseResponse(response) { return new GetHashtagIdResponse_1.GetHashtagIdResponse(response.data); } /** * @inheritdoc */ url() { return '/ig_hashtag_search'; } } exports.GetHashtagIdRequest = GetHashtagIdRequest;