Mission Objective: Complete Misty’s Intro to 3rd Party API Integration Tutorial
Mission Type: Training
Proof of Completion:* Share your code in the Misty Skills category
Est. Time to Complete: 1 - 2 hours
Launch Date: 10/4/2019
End Date: Ongoing
For this mission, we’d like you to exercise Misty’s ability to request data from external web APIs. We think Misty’s developers will rely heavily on this functionality, and we want to gather feedback from developers who use who it in their code.
You might try using this mission to write a skill that has Misty send a request to a weather API, so you can code Misty to react with unique, emotive responses to different types of weather. Or, you might integrate Misty with a cloud service provider like Microsoft Azure to give Misty text-to-speech capabilities (see the tutorial on this functionality for more details). But don’t let our suggestions bound your imagination – the sky’s the limit!
Misty’s API includes a command for sending HTTP requests to external web APIs. You can call this command in an on-robot skill by using the misty.SendExternalRequest() method. You can also call the REST API endpoint for the command to write an external application that has Misty send a request.
You can configure the SendExternalRequest command to automatically save image and audio file return types to Misty’s system. If your request returns another data type, you’ll need to pass the response data into another function and write the code that describes what Misty should do with it.
When you call the misty.SendExternalRequest() method from an on-robot skill, you can use the misty.Debug() method to print response data to the Skill Runner web console. This is a great way to dig into the response data and understand how to use what Misty receives from the resource at any given URI.
Our goal with this mission is to see how easy it is for developers to integrate Misty with web APIs and cloud services. We’d like to hear your feedback on developing skills with Misty’s SDK, and we’re interested to hear your suggestions on how we can improve Misty’s tutorials and developer documentation.
When you complete the mission, we encourage you to share your skill with other developers by posting it here in the Misty Community Forums. If you film your interactions with Misty, please share your videos here, too – we’d love to see them!
If you get stuck, check out the External Requests tutorial in Misty’s developer documentation. Please leave a comment here or post in the MistyCommunity Slack if you have any questions or run into issues. Take notes on your experience, and let us know when you run into roadblocks. We look forward to hearing about your progress!
What good is a robot if it can’t make a decision?
Even a simple yes or no would be helpful in situations like - Should I eat out or in? Should I quit or stay? Does he/she love me or not?
In this awesome “yes or no” skill you’ll query an API and then have Misty do something (like play a different sound or wave her arms or move or something cool) to signal Yes or No, Yay or Nay, loves me or loves me not.
You’ll need some way to trigger the API call like maybe recognize a face? Or have someone tap her bumper sensor or maybe have someone touch her head.
I know what you are thinking… Why connect to a web API to get a yes/no answer when any simple random method would suffice? The question is why not…?
Connect Misty to one of the simplest REST APIs out there
Yes Or No? yesno.wtf — foolproof™ decision-making (api available) simple returns either a yes or no.
Let us know you’ve completed these activities by responding to this thread. Then, check out the competitive 3rd Party Integration to see how you can earn a community badge and get a chance to win some sweet Misty swag!
Share the mission in the community forums, in the Misty Skills category
Here’s what you’ll need to complete this mission:
- a Misty II robot, connected to your local Wi-Fi network
- code editing software (like Visual Studio Code, Sublime, or Atom)
- Check out this tutorial on sending an external request if you need help
- Look at the Misty docs for more information on the external request method
- Or use the REST API endpoint if you prefer to do it that way.
Hit a roadblock? Find a bug? Have feedback? Let us know! As Misty’s earliest developers, you are the real superstars on the journey to making personal robots a reality. Your creativity makes all this possible, and we’re eager to hear your feedback. Reply to this post to start a conversation with a member of the Misty team.