This package has been deprecated

    Author message:

    Thank you to everyone who used alexaplusunity! I have been hard at work creating a new version that is much more robust than this project. It is not released quite yet, but in then mean time, I am discontinuing support for alexaplusunity.

    alexaplusunity

    0.0.9 • Public • Published

    Games SDK for Alexa NPM version

    The Games SDK for Alexa was built to help with the expansion of Amazon’s Alexa into video games, bringing a whole new layer of immersion into gaming.

    Ready to get started? Follow the guides here to start!

    Installation

    $ npm install alexaplusunity

    Usage

    Create instance:

    1. Require module:
    var alexaPlusUnityClass = require('alexaplusunity');
    1. Create instance of class:
    var alexaPlusUnity = alexaPlusUnityClass("<YOUR_PUBNUB_PUB_KEY>", "<YOUR_PUBNUB_SUB_KEY>", true); //Third parameter enables verbose logging

    Avaliable methods:

    /**
     * Create new GamesSDK Instance.
     * @constructor
     * @param {string} publishKey - Your PubNub publish key.
     * @param {string} subscribeKey - Your PubNub subscribe key.
     * @param {bool} [debug=false] - True to enable detailed logs.
     */
    constructor(publishKey, subscribeKey, debug)
    /**
    * Enable/Disable detailed logs.
    @param {bool} debug - True to enable detailed logs.
    */
    setDebug(debug)
    /**
     * Update PubNub instance.
     * @param {string} publishKey - Your PubNub publish key.
     * @param {string} subscribeKey - Your PubNub subscribe key.
     */
    updatePubNub(publishKey, subscribeKey)
    /**
     * Add channel to channel group.
     * @param {string} channel - Channel to add.
     * @param {string} channelGroup - Group to add channel to.
     * 
     * @returns {Promise} 
     */
    addChannelToGroup(channel, channelGroup)
    /**
     * Publish message to Game Engines.
     * @param {string} message - Message to send.
     * @param {string} channel - Channel to send message over.
     * 
     * @returns {Promise} 
     */
    publishMessage(message, channel)
    /**
     * Publish message to Unity and listen for response.
     * @param {string} message - Message to send.
     * @param {string} channel - Channel to send message over.
     * @param {number} [timeout=1000] - Listener timeout in milliseconds.
     * 
     * @returns {Promise} 
     */
    publishMessageAndListenToResponse(message, channel, timeout = 1000)
    /**
     * List channels in channel group.
     * @param {string} channelGroup - Channel group to find channels in.
     * 
     * @returns {Promise} 
     */
    listChannels(channelGroup)
    /**
     * Create and add new unique channel to channel group.
     * @param {string} channelGroup - Channel group create new, unique channel in.
     * 
     * @returns {string} 
     */
    uniqueQueueGenerator(channelGroup)
    /**
     * Make new 5 charecter ID.
     * @returns {string} 
     */
    makeId()

    License

    MIT © Austin Wilson

    Keywords

    none

    Install

    npm i alexaplusunity

    DownloadsWeekly Downloads

    1

    Version

    0.0.9

    License

    MIT

    Unpacked Size

    13.1 kB

    Total Files

    4

    Last publish

    Collaborators

    • mathwuy