arienmalec / alexa_rust Goto Github PK
View Code? Open in Web Editor NEWImplements Rust-based Alexa Request/Response
License: MIT License
Implements Rust-based Alexa Request/Response
License: MIT License
It is common on failed matches for Alexa to send a request that looks like:
...
"resolutionsPerAuthority": [
{
"authority": "amzn1.er-authority.echo-sdk.amzn1.ask.skill....",
"status": {
"code": "ER_SUCCESS_NO_MATCH"
}
}
]
...
Attempting to deserialize this to the types in this crate will give the error:
Error("missing field `values`", line: 0, column: 0)
Thanks for the library. I'm new to Rust so forgive me if I'm missing something.
All the fields for all of the structs in response.rs are private, and none of the structs derive Eq
or PartialEq
. This makes it difficult to test functions that return Responses, e.g. attempting to test your example hello world function:
assert_eq!(Response::simple("hello", "hello world"), handle_hello().unwrap())
Fails with "error[E0369]: binary operation ==
cannot be applied to type alexa_sdk::Response
"
and
assert_eq!("hello world", &handle_hello().unwrap().body.output_speech.unwrap().text.unwrap());
fails with "error[E0616]: field body
of struct alexa_sdk::Response
is private".
Since all of these structs are expected to be constructed by the user code, and are directly serialized into stable Alexa API response types. I would expect the fields to be public. It would also be a nice convenience if they derived Eq
.
Hi, according to https://developer.amazon.com/it/docs/custom-skills/request-and-response-json-reference.html#request-locale there are some other locale that are currently not present in the crate.
Hello,
As of version 0.3.0 of lambda_runtime, its lambda! macro no longer exists. This means that the example code in README.md no longer works. Please could you update it to be compatible with the latest version of lambda_runtime? Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.