I will post on Qiita for the first time.
This article is intended for: --Inexperienced in programming ――I want to develop a Pepper app --I want to use an external Web API I will explain for those who apply to the above. I think there will be some points that are difficult to understand, but I would appreciate it if you could ask in the comments. Also, if there are any deficiencies, we would appreciate it if you could point them out in the comments.
This time, I will introduce how to use WebAPI in Pepper application. So, if you read this article, I think that even those who have recently started to touch Pepper will be able to acquire knowledge so that they can link with WebAPI. If you need a detailed explanation of terms, I think that this article will be easier to read if you visit the following reference site.
Use Requests for Pepper HTTP communication http://qiita.com/bugcloud/items/6631b2a534446393e214 [Pepper] Cooperation with weather API http://qiita.com/yamarobo/items/e57cb2e3f5ac21464bfa
I referred to the above site. In addition, I will use the article by yamarobo in this article, and I will explain it for the target audience.
Mac OS X El capitan 10.11.1 Choregraphe 2.4.2 Python 2.7.10
Open Weather Map API
It refers to the rules for handling other services on the Web. Basically, we provide data and services. It is a mechanism that sends a request to the server and sends back the result (Response) obtained by processing the request. Basically, the format of the request and the result is fixed, each request is REST, and the result is handled in JSON or XML.
WebAPI can be used in many computer programs, including platforms such as various operating systems such as Android, iOS, and Windows, and robot-embedded programs.
There are quite a few Web APIs currently available. For example, various Web APIs are provided, such as weather forecasts, disaster information, and article searches. All of the Web APIs listed above can be used. (Although some require you to get a key to access, called an API key. By using these, not only the Pepper app but also the apps you create will be richer.
Combining the above-mentioned API and platform-side program is called API linkage. Combining APIs with each other is also called a mashup. You can easily make up for parts that are difficult to realize or express with that platform alone by using APIs.
Originally, in order to use Pepper as a platform, you need to understand the following. --API access method --Choregraphe box operation --About the Python box in Choregraphe --How to generate HTTP request by Python
There are no restrictions such as API access must always be done when the app is launched. Therefore, you can access the API at any time within the app and bring in the necessary data. For example, if you take the application created on yamarobo's site as an example, you can see that the flow is as follows.
Also, Choreograph can be seen as the flow of the application by connecting the boxes. Unlike programs, I think that you can visually and intuitively check the transition of the application. For example, if you borrow a program from yamarobo and create an app that is more user-friendly and has a Pepper feel, the flow will be as follows. The image will be the image of the app you actually created.
This time I wrote about API cooperation using Pepper. We hope that you will read this article and increase the number of Pepper application developers and developers. Also, if anyone is interested, I would like you to work on it. In addition to this article, various people are explaining the contents explained this time. If you are not satisfied with the content explained this time, or if you would like to see explanations using various APIs, please see Qiita and various sites. I think it was a long sentence and it was difficult to understand, but thank you for staying with us until the end. Finally, I pray from the bottom of my heart for your success and development.
December 17, 2015
Recommended Posts