3.11.0 • Published 4 years ago

@ask-utils/service-client v3.11.0

Weekly downloads
13
License
MIT
Repository
github
Last release
4 years ago

ASK-Utils / ServiceClient alternative

npm version License: MIT Maintainability Test Coverage Build Status

logo

https://ask-utils.dev

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

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

Usage

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

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

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

3.11.0

4 years ago

3.9.0

4 years ago

3.8.0

4 years ago

3.6.0

4 years ago

3.5.0

4 years ago

3.4.0

4 years ago

3.3.4

4 years ago

3.2.2

4 years ago

3.1.2

5 years ago

3.0.7

5 years ago

3.0.6

5 years ago

3.0.5

5 years ago