JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q36307F
  • License MIT

alt service client for Alexa.

Package Exports

  • @ask-utils/service-client

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ask-utils/service-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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