# @ask-utils/service-client

> alt service client for Alexa.

Latest version **3.11.0** (published 2020-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ask-utils/service-client
pnpm add @ask-utils/service-client
yarn add @ask-utils/service-client
bun add @ask-utils/service-client
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.11.0 |
| Published | 2020-06-27 |
| First published | 2019-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 19.2 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Hidetaka Okamoto |
| Maintainers | hideokamoto |
| Keywords | alexa, ask-sdk, alexa-skill |

## Links

- npm: https://www.npmjs.com/package/@ask-utils/service-client
- Repository: https://github.com/ask-utils/ask-utils
- Homepage: https://github.com/ask-utils/ask-utils#readme
- Issues: https://github.com/ask-utils/ask-utils/issues
- npm.io page: https://npm.io/package/@ask-utils/service-client

## Dependencies (6)

- [axios](https://npm.io/package/axios.md) ^0.19.0
- [tslib](https://npm.io/package/tslib.md) ^2.0.0
- [ask-sdk](https://npm.io/package/ask-sdk.md) ^2.8.0
- [ask-sdk-core](https://npm.io/package/ask-sdk-core.md) ^2.8.0
- [ask-sdk-model](https://npm.io/package/ask-sdk-model.md) ^1.28.0
- [ask-sdk-runtime](https://npm.io/package/ask-sdk-runtime.md) ^2.8.0

## Recent versions

- 3.11.0 (latest) — 2020-06-27
- 3.9.0 — 2020-06-17
- 3.8.0 — 2020-06-07
- 3.6.0 — 2020-05-12
- 3.5.0 — 2020-05-10
- 3.4.0 — 2020-05-04
- 3.3.4 — 2020-04-10
- 3.2.2 — 2019-10-11
- 3.1.2 — 2019-07-25
- 3.0.7 — 2019-07-14
- 3.0.6 — 2019-07-12
- 3.0.5 — 2019-07-12

## README

# ASK-Utils / ServiceClient alternative
[![npm version](https://badge.fury.io/js/%40ask-utils%2Fservice-client.svg)](https://badge.fury.io/js/%40ask-utils%2Fservice-client)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Maintainability](https://api.codeclimate.com/v1/badges/c17851759423ce151b9e/maintainability)](https://codeclimate.com/github/ask-utils/ask-utils/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/c17851759423ce151b9e/test_coverage)](https://codeclimate.com/github/ask-utils/ask-utils/test_coverage)
[![Build Status](https://travis-ci.org/ask-utils/ask-utils.svg?branch=master)](https://travis-ci.org/ask-utils/ask-utils)

![logo](https://ask-utils.dev/static/9cbabc261164aba75a5d7e32d0e53371/8a651/youtube_profile_image.png)

https://ask-utils.dev

Simple Service Client package for Alexa APIs.
https://www.npmjs.com/package/@ask-utils/service-client

```bash
$ npm i -S @ask-utils/service-client
```

## Usage

```typescript
import { UserProfileAPIClient } from '@ask-utils/service-client'


const ExampleHandler = {
  ...,
  async handle(handlerInput: HanlderInput) {
    const client = new UserProfileAPIClient(handlerInput.requestEnvelope)
    const email = await client.getEmail()
    const profileName = await client.getProfileName()
    const givenName = await client.getGivenName()
    const {countryCode, phoneNumber} = await client.getMovileNumber()
    ...
  }
}
```

## Clients
### UserProfileAPIClient

```typescript
import { UserProfileAPIClient } from '@ask-utils/service-client'

const client = new UserProfileAPIClient(handlerInput.requestEnvelope)
const email = await client.getEmail()
const profileName = await client.getProfileName()
const givenName = await client.getGivenName()
const {countryCode, phoneNumber} = await client.getMovileNumber()
```

### SettingAPIClient

```typescript
import { SettingAPIClient } from '@ask-utils/service-client'

const client = new SettingAPIClient(handlerInput.requestEnvelope)
const timezone  = await client.getTimezone()
const tmpUnit = await client.getTempratureUnit()
const distUnit = await client.getDistanceUnits()
```

### ListManagementAPIClient


### ReminderAPIClient

### DeviceAPIClient

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