Giter Site home page Giter Site logo

stoiveyp / alexa.net.requesthandlers Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 53 KB

A small library to help maintain clean code within a skill. Replicates the Request and Response Handler approach given in the ASK SDK for Node, as well as the concept of Request and Error Interceptors. For more information look at the docs or github links.

License: MIT License

C# 100.00%

alexa.net.requesthandlers's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

snahdul

alexa.net.requesthandlers's Issues

Access Handlers from Interceptor

Hi @stoiveyp Is it possible to get access to the selected handler from the interceptor?

E.g.

Interceptor1

Handler1
Handler2

When Interceptor is called, I assume the correct handler is already selected as the delegate to call Handle is passed to the Intercept method. Is it possible to get access to and instance of the selected handler?

I have a scenario where the interceptor needs to query the handler to get some information and then work on that information. I don't want to store that information in the interceptor as that would break the abstraction.

Thanks

Update readme.md

The sample in the readme.md is wrong and should be updated

`public class LaunchRequestHandler:IAlexaRequestHandler
{
public bool CanHandle(AlexaRequestInformation information)
{
return information.SkillRequest.Request is LaunchRequest;
}

public Task<SkillResponse> Handle(AlexaRequestInformation<TSkillRequest> information){
    return ResponseBuilder.Ask("hello, what should I call you?");
}

}changed to:public class LaunchRequestHandler:IAlexaRequestHandler
{
public bool CanHandle(AlexaRequestInformation information)
{
return information.SkillRequest.Request is LaunchRequest;
}

public Task<SkillResponse> Handle(AlexaRequestInformation<TSkillRequest> information){
    return Task.FromResult(ResponseBuilder.Tell("hello, what should I call you?"));
}

}`

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.