Giter Club home page Giter Club logo

aplhomecards's Introduction

APL Home Cards

A way to wrap the response builder to transparently send home card like responses to multimodal devices using APL

Node

  • Enable APL in the voice interaction model Interfaces section
  • Add aplcards.js to the project
  • Add a request interceptor like this: .addRequestInterceptors(require('./aplcard').APLHomeCardRequestInterceptor)
  • Just use home cards as usual! (withSimpleCard(), withStandardCard())
  • Recommended resolutions and size limitations for small and large images in home cards are described here
  • In the file aplcard.js you'll find the APL document that gets rendered. There's a default background image for simpple cards (where no images are passed as parameters). Please replace with your own default background

Java

  • Enable APL in the voice interaction model Interfaces section
  • Import the following dependency:
<dependency>
    <groupId>com.github.lucarosellini.alexa</groupId>
    <artifactId>apl-home-cards</artifactId>
    <version>1.0.0</version>
</dependency>
  • In you skill builder, add a request interceptor like this: .addRequestInterceptor(new APLHomeCardInterceptor())
  • Just use home cards as usual! (.withSimpleCard(...), .withStandardCard(...))

Python

  • Enable APL in the voice interaction model Interfaces section.

  • Add APLHomeCard.py to the project.

  • Add an APL Document to the project directory.

  • Add the following import:

     from APLHomeCard import add_apl_home_card
    
  • Add a response interceptor that calls:

     add_apl_home_card(handler_input, response, images, apl_document_name)
    

    where:

    • images is a dictionary that contains the URLS of each image size of each card type you would like to display. Recommended resolutions and size limitations for small and large images in home cards are described here.

    • apl_document_name is the path and filename of the APL Document JSON you would like to use.

  • Just use home cards as usual! (.set_card(SimpleCard(…)), .set_card(StandardCard(…))).

aplhomecards's People

Contributors

germanviscuso avatar frivas avatar

Stargazers

 avatar Marcelo Rabelo avatar  avatar Jeff Nunn avatar adrianalic avatar Nieves Ábalos avatar Jose Fortes avatar

Watchers

Jose Fortes avatar  avatar Luca Rosellini avatar  avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.