0

I have specific requirement like i have to create API in php that will fetch instruction from alexa skills for e.g i will speck to amazon echo device "Alexa, Can you please find company name of Mr.X" then echo will send some variable or text of my speech as return value of my php API.

After then i will find company name from my own database and i need to send company name to amazon echo as reply for question asked by user...

Step by step:

  1. Fetch instructions from Echo.
  2. Sends the instruction to my database and search for asked thing(Comnay name of mr x)
  3. Database returns the answer to my API (e.g Stackoverflow is company of mr x).
  4. our API sends it back to Echo for playback(Echo says: Mr.x is employee of stackoverflow).

So, can someone let me know does above flow is possible with amazon echo using PHP or any other way to fulfill above requirement? .

I did goggle it but didn't found any particular help so please provide some more support on it.

Micho
  • 3,929
  • 13
  • 37
  • 40
Test
  • 11
  • 1
  • Improved formatting using a list – Micho Jun 21 '16 at 09:23
  • Thanks for your formatting. i am new at stack overflow. – Test Jun 21 '16 at 09:28
  • Welcome to SO :-) I think your question is too broad. It's not something that can be properly answered in a post. Get as far as you can and when you need help with a specific step, share your work and explain what you're trying to do at that step. Example of a specific question: "here is what my API receives from Echo, and here is how I try to query the DB. The query doesn't return what I expect. What's wrong with this query?" – BeetleJuice Jun 21 '16 at 09:43
  • -Patrick still you haven't get my point or my question.. i am discussing requirement and i am on requirement analysis stage. so how can i show or ask by code at analysis stage ? :) – Test Jun 21 '16 at 09:52

2 Answers2

0

Your question is very broad. The best place to get an overview of Alexa's architecture and capabilities is Amazon's "Getting Started" guide.

Once you have mastered the basics, and want to get on to advanced design, project planning and business development, there is also this book. (Disclaimer: I wrote it. But it is the only book on programming Alexa out there.)

Joseph Jaquinta
  • 2,118
  • 17
  • 15
  • Thanks Joseph. actually i already study all basic guide like what is alexa skills how to write it and the use of lambda function.i have downloaded basic module from amazon alexa from this link https://github.com/amzn/alexa-skills-kit-js – Test Jun 21 '16 at 12:39
  • cont on above.. but after i study all this document i will be on conclusion that static information can be manage easily by using lambda function. but as i have asked few specific question like fetch instruction from amazon echo to my web app and search data from my local database and return output to echo device.. can you please provide advance information that such a things can be possible and do you have any references for similar code with php ? – Test Jun 21 '16 at 12:39
  • The guide explains the capabilities of the service. Everything else is just software engineering. Give you are using such phrases as "fetch instruction from amazon echo to my web app" indicates you haven't read it in detail. Alexa is more than just the Echo, and it always initiates invocation of your web service. So your understanding is kind of mixed up. – Joseph Jaquinta Jun 21 '16 at 13:34
  • For a fully worked example of an advanced skill, including thousands of words of documentation in 45 minutes of videos, that demonstrates all of the above, you might see my winning entry into a recent Alexa contest: https://github.com/jjaquinta/EchoSubWar It's in Java, but the principle is the same. – Joseph Jaquinta Jun 21 '16 at 13:37
  • - Joseph where i can see 45 minutes videos? thanks for your EchoSubWar repository but i will not able to got those code due to java. do you know more application which is same like my requirement either in node js or in php ? – Test Jun 22 '16 at 06:22
  • Video link below. Logic is logic. It's the same for all languages. If you can't follow the logic of code in one example and apply it to another language, you aren't ready yet for this level of programming. https://www.youtube.com/watch?v=lboatie5brk – Joseph Jaquinta Jun 22 '16 at 11:47
  • - Joseph thank you so much for your support. i bit not more strong to capture the developed thing by you. Anyways i am believed that by doing more R & D may be i found more help with node js and php. Thanks Joseph – Test Jun 23 '16 at 10:46
0

I agree with Joseph, your question is a bit broad. You might try going through the Big Nerd Ranch training series. I've also put together a video on how to implement the code from that series, which you can find here. Though they are in node.js and you asked for PHP, they should help you get started with the concepts of how Alexa and the Echo work.

Brad Irby
  • 2,397
  • 1
  • 16
  • 26