Boston Python Workshop 5/Twitter handout: Difference between revisions

Content added Content deleted
imported>Jesstess3
(Created page with '===Twitter goals=== * practice for loops * practice using functions * practice implementing functions * see what it's like to use an API * have fun collecting data from Twitter …')
 
No edit summary
Line 122: Line 122:
the first argument and an upper bound as the second argument and
the first argument and an upper bound as the second argument and
returns a random integer between those bounds.
returns a random integer between those bounds.

===Python Twitter library functions we will use===

A library provides a collection of functions for you, and defines a contract for using those functions. Here are the functions in the python-twitter library that will be useful for the project:

<code>api.GetSearch(searchString)</code>

Given a string to search for, this function will return a list of tweets matching that search term.

<code>api.GetUserTimeline(username)</code>

Given a username, this function will return a list of tweets belonging to that username.