Hardware Reference
In-Depth Information
Your Hotshot objectives
In this project, we will discuss the following examples:
F Improving your vocabulary using the Raspberry Pi
F Raspberry Pi and Khan Academy
F Building a science fair exhibit using the Raspberry Pi
Improving your vocabulary using the
Raspberry Pi
As an example of self-improvement using the Raspberry Pi, we will implement an example
that retrieves the word of the day using the Wordnik API ( https://www.wordnik.com/ ) .
Prepare for lift off
We need to install the Wordnik Python client (distributed under the Apache License)
available as a Python package:
sudo pip install wordnik
The next step is to obtain an API key to make use of the API. This can be obtained by
registering for an account with Wordnik and requesing an API key ( http://developer.
wordnik.com/ ).
Once the installaion is complete, it is ime to review the example.
The Wordnik API is merely being demonstrated as an example.
Refer to the API terms of agreement to determine how the API
can be used in a commercial applicaion.
Engage thrusters
1.
Let's review an example that fetches the word of the day using the Wordnik API.
The first step is to import the Wordnik Python client:
from wordnik import *
2. The next step is to create a client that iniializes the API to access the word list:
url='http://api.wordnik.com/v4'
key='API Key'
client=swagger.ApiClient(key,url)
 
Search WWH ::




Custom Search