Reader small image

You're reading from  Kivy - Interactive Applications and Games in Python

Product typeBook
Published inJun 2015
Reading LevelBeginner
Publisher
ISBN-139781785286926
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Roberto Ulloa
Roberto Ulloa
author image
Roberto Ulloa

Roberto Ulloa has a diverse academic record in multiple disciplines within the field of computer science. Currently, he is working with artificial societies as part of his PhD thesis at the University of Western Ontario. He obtained an MSc degree from the University of Costa Rica and taught programming and computer networking there. He has earned a living as a web developer, working with Python/Django and PHP/Wordpress. He collaborates with various researchers while also working on his own projects, including his blog (http://robertour.com). He constantly worries that the Internet has already become aware of itself and that we are not able to communicate with it because of the improbability of it being able to speak any of the 6,000-plus odd human languages that exist on the planet.
Read more about Roberto Ulloa

Right arrow

Search – query the TED Developer API


This final section will introduce a few changes to the code so that we can search the TED site.

Tip

The first thing you need to do is to get an API key from the TED site using the following link:

http://developer.ted.com/member/register.

A TED API key is an alphanumeric number (something like '1a3bc2') that allows you to query the TED website directly, and get requests in the JSON format we have been using throughout the last section. Once you receive your API key in your e-mail account, you can modify kivyplayer.py and put it in an _api global variable. For now, we can use a placeholder like this in the kivyplayer.py file:

_api = 'YOUR_API_KEY_GOES_HERE'

Also, in kivyplayer.py, we need to introduce a global variable that contains the search template (_search), and replace the content of the _meta global variable:

_search = 'https://api.ted.com/v1/search.json?q=%s&categories=talks&api-key=%s'
_meta = 'https://api.ted.com/v1/talks/%s.json?api-key=%s...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Kivy - Interactive Applications and Games in Python
Published in: Jun 2015Publisher: ISBN-13: 9781785286926

Author (1)

author image
Roberto Ulloa

Roberto Ulloa has a diverse academic record in multiple disciplines within the field of computer science. Currently, he is working with artificial societies as part of his PhD thesis at the University of Western Ontario. He obtained an MSc degree from the University of Costa Rica and taught programming and computer networking there. He has earned a living as a web developer, working with Python/Django and PHP/Wordpress. He collaborates with various researchers while also working on his own projects, including his blog (http://robertour.com). He constantly worries that the Internet has already become aware of itself and that we are not able to communicate with it because of the improbability of it being able to speak any of the 6,000-plus odd human languages that exist on the planet.
Read more about Roberto Ulloa