UNPKG

@bunq-community/bunq-js-client

Version:

[![NPM Version](https://img.shields.io/npm/v/@bunq-community/bunq-js-client.svg) ](https://github.com/@bunq-community/bunq-js-client) [![NPM Downloads](https://img.shields.io/npm/dt/@bunq-community/bunq-js-client.svg) ](https://www.npmjs.com/package/@bun

21 lines (20 loc) 696 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class Avatar { /** * @param {ApiAdapter} ApiAdapter */ constructor(ApiAdapter) { this.ApiAdapter = ApiAdapter; this.Session = ApiAdapter.Session; } async post(attachmentUuid, options = {}) { const limiter = this.ApiAdapter.RequestLimitFactory.create("/avatar", "POST"); // do the actual call const response = await limiter.run(async (axiosClient) => this.ApiAdapter.post(`/v1/avatar`, { attachment_public_uuid: attachmentUuid }, {}, {}, axiosClient)); return response.Response[0].Uuid.uuid; } } exports.default = Avatar;