@microsoft/teams.api
Version: 
<p> <a href="https://www.npmjs.com/package/@microsoft/teams.api" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.api/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.api?activeTab=code" t
44 lines (42 loc) • 1.1 kB
JavaScript
import { Client } from '@microsoft/teams.common/http';
class ConversationMemberClient {
  serviceUrl;
  get http() {
    return this._http;
  }
  set http(v) {
    this._http = v;
  }
  _http;
  constructor(serviceUrl, options) {
    this.serviceUrl = serviceUrl;
    if (!options) {
      this._http = new Client();
    } else if ("request" in options) {
      this._http = options;
    } else {
      this._http = new Client(options);
    }
  }
  async get(conversationId) {
    const res = await this.http.get(
      `${this.serviceUrl}/v3/conversations/${conversationId}/members`
    );
    return res.data;
  }
  async getById(conversationId, id) {
    const res = await this.http.get(
      `${this.serviceUrl}/v3/conversations/${conversationId}/members/${id}`
    );
    return res.data;
  }
  async delete(conversationId, id) {
    const res = await this.http.delete(
      `${this.serviceUrl}/v3/conversations/${conversationId}/members/${id}`
    );
    return res.data;
  }
}
export { ConversationMemberClient };
//# sourceMappingURL=member.mjs.map
//# sourceMappingURL=member.mjs.map