import twitter
from credentials import consumer_key, consumer_secret, access_key, access_secret

api= twitter.Twitter(
		        auth = twitter.OAuth(access_key, access_secret, consumer_key, consumer_secret))

#-----------------------------------------------------------------------
# perform a basic search 
# Twitter API docs:
# https://dev.twitter.com/docs/api/1/get/search
#-----------------------------------------------------------------------
query = api.search.tweets(q = "webdev")

#-----------------------------------------------------------------------
# How long did this query take?
#-----------------------------------------------------------------------
print "Search complete (%.3f seconds)" % (query["search_metadata"]["completed_in"])

#-----------------------------------------------------------------------
# Loop through each of the results, and print its content.
#-----------------------------------------------------------------------
for result in query["statuses"]:
	print "(%s) @%s %s" % (result["created_at"], result["user"]["screen_name"], result["text"])

from pprint import pprint
import twitter
from credentials import consumer_key, consumer_secret, access_key, access_secret

api= twitter.Twitter(
		        auth = twitter.OAuth(access_key, access_secret, consumer_key, consumer_secret))

def get_users(topic_str):
	results = api.users.search(q = topic_str)
	IDs = [ user["id"] for user in results ]
	return IDs

add first real method