Implements Amazon Alexa Skill request/response structs following the Alexa skill specifications, including Serde JSON serialization/deserialization with some helpers to extract data from requests and format responses.
These structs can be used as the request and response using the Rust AWS Lambda runtime to implement the skill.
Simplest possible Alexa "Hello, World" skill:
```rust extern crate lambdaruntime as lambda; extern crate alexasdk;
use lambda::{lambda, Context, error::HandlerError}; use alexa_sdk::{Request,Response}; use std::error::Error;
fn myhandler(req: Request, _ctx: Context) -> Result
fn main() -> Result<(), Box
Ok(())
} ```
A more complete skill, handling multiple locales and a slot:
```rust extern crate lambdaruntime as lambda; extern crate alexasdk;
use lambda::{lambda, Context, error::HandlerError}; use alexasdk::{Request,Response}; use alexasdk::request::{IntentType, Locale}; use std::error::Error;
fn handlehelp(req: &Request) -> Result
fn handlehello(req: &Request) -> Result
fn handlecancel(req: &Request) -> Result
fn myhandler(req: Request, _ctx: Context) -> Result
fn main() -> Result<(), Box
Ok(())
} ```