UNPKG

node-groupme

Version:

The only GroupMe API library that isn't a million years old.

20 lines 799 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const __1 = require(".."); class RelationshipManager extends __1.BaseManager { constructor(client) { super(client, __1.Relationship); } async fetch(id, includeBlocked = true) { const query = { include_blocked: includeBlocked }; let response; do { response = await this.client.rest.api('GET', 'relationships', { query }, { version: 'v4' }); response.forEach(data => this._upsert(new __1.Relationship(this.client, data))); query.since = response[response.length - 1]?.updated_at_iso8601; } while (response.length); return this.cache; } } exports.default = RelationshipManager; //# sourceMappingURL=RelationshipManager.js.map