I've been thinking about this skill for a while and how it might be useful. I learned about account linking and decided to move forward with the idea.
My main problem, given only a day, was to get the basic plumbing in place. By mid-day, I was able to determine that my skill was invoking my lambda function and that account linking was not working properly. I had help from an Amazonian to set up a proxy (https://developer.amazon.com/public/community/post/TxQN2C04S97C0J/How-to-Set-up-Amazon-API-Gateway-as-a-Proxy-to-Debug-Account-Linking ). In the afternoon, I was able to test the lambda function, inserting an access token acquired during account linking testing to verify the lambda function was able to communicate with my github account and pull information.
Returning to the skills room, I was informed Alexa had a problem decoding the JSON containing the token, but it wasn't encoded in JSON! Sebastien showed me how to add an Accept header into the proxy he setup in the API Gateway and that allowed account linking to work. I'll have a chat with github folks to see if they can fix this on their end which will let me eliminate the proxy.
Before and after dinner, I was able focus on the interaction model and data that github provided. I ended up implementing 4 requests and 1 of those uses the session to provide paged results.
I could not find a way to enter this video link elsewhere as it wasn't being accepted, so here is my demo of the function.
https://www.youtube.com/watch?v=62IVI2zXShM
The skill is: amzn1.ask.skill.22aa563e-b45a-43ac-ae2b-4d266e597872
The lambda function used is: arn:aws:lambda:us-east-1:721404732763:function:github-skill
It is written in Python and code is checked into the repo linked in this submission. I have a deployment script checked in which made it very easy to check changes. Given more time, I would set up local lambda execution and testing, and configure travis-ci to automate test/deploy. I would really like the ability to push skill configuration changes programatically. That way, I can completely automate skill deployment. I didn't include a diagram because the connections are nothing complicated and what any linked account service would be doing.
There are things I did not have time to explore. I wanted to have more variable inputs, so I could ask for information about specific, say, pull requests. Since I use github daily, I intend to find out what would help me next and that likely revolves around pull requests and notifications.
Comments