# @ulms/profile

> JavaScript API-client for Profile service

Latest version **0.3.1** (published 2022-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ulms/profile
pnpm add @ulms/profile
yarn add @ulms/profile
bun add @ulms/profile
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2022-04-27 |
| First published | 2019-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 30.9 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | foxford |
| Maintainers | alexkonst, dkvovik, flyer3d |

## Links

- npm: https://www.npmjs.com/package/@ulms/profile
- Repository: https://github.com/foxford/ulms-profile-js
- Homepage: https://github.com/foxford/ulms-profile-js#readme
- Issues: https://github.com/foxford/ulms-profile-js/issues
- npm.io page: https://npm.io/package/@ulms/profile

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ~4.17.21
- [p-queue](https://npm.io/package/p-queue.md) ~7.1.0

## Recent versions

- 0.3.1 (latest) — 2022-04-27
- 0.3.1-dev.1 (dev) — 2024-05-07
- 0.3.1-dev.0 — 2022-04-22
- 0.3.0 — 2021-09-06
- 0.3.0-dev.1 — 2021-09-02
- 0.3.0-dev.0 — 2021-09-01
- 0.2.1 — 2019-02-27
- 0.2.0 — 2019-02-05
- 0.1.2 — 2019-01-31

## README

# ProfileJS
JavaScript API-client for Profile service

## Installation

```sh
npm install --save @ulms/profile
```

## Example

```js
import {
  FetchHttpClient,
  SimpleTokenProvider,
  HttpProfileResource
} from '@ulms/profile'

const TOKEN = 'jwt-token'
const id = '123'
const ids = ['123', '456', '789']
const scope = '456'

const profile = new HttpProfileResource(
  'https://example.com',
  'api/v1/profile',
  new FetchHttpClient(),
  new SimpleTokenProvider(TOKEN)
)

// retrieving profile data
profile.getProfile(id, scope)
  .then((response) => {
    console.log('[response]', response)
  })
  .catch((error) => {
    console.log('[error]', error)
  })

// retrieving list of profiles
profile.listProfiles(ids, scope)
  .then((response) => {
    console.log('[response]', response)
  })
  .catch((error) => {
    console.log('[error]', error)
  })
  
// updating some attributes
profile.updateAttributes(id, scope, {role: 'user'})
  .then((response) => {
    console.log('[response]', response)
  })
  .catch((error) => {
    console.log('[error]', error)
  })
```

---
_Source: https://npm.io/package/@ulms/profile · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
