python
import rainbowstream
API_KEY = "your_api_key"
API_SECRET_KEY = "your_api_secret_key"
ACCESS_TOKEN = "your_access_token"
ACCESS_TOKEN_SECRET = "your_access_token_secret"
rainbowstream.init(API_KEY, API_SECRET_KEY, ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
timeline = rainbowstream.user_timeline()
for tweet in timeline:
print(tweet['user']['screen_name'], ": ", tweet['text'])
rainbowstream.tweet(text)
rainbowstream.reply(reply_tweet_id, reply_text)
trends = rainbowstream.trends()
for trend in trends:
print(trend['name'])
rainbowstream.exit()