tyrbo/tunefish — pull request #16 by wfro (2014-11-03 17:14:48+00:00)
Title: Twitter

Wrapper class for the twitter api client. Right now we can find tweets based on a twitter username. This works for now, but it really brittle in the long run I think. It seems like the best option is to store the oauth token/secret that comes back with the omniauth hash, and twitter will allow you to make requests on the behalf of that user. It's tricky because to store those in the database we probably need two-way AES encyrption, and I want to make sure that's what we want before we go down that rabbit hole.

The general structure is instantiate our TwitterAPI class (with the oauth token/secret I'm really not sure what's going on here, in the tests I was able to use blank strings and still make the request successfully), pass in a twitter username and parse tweets for the hashtag tl, and then make individual requests to get the oembed html.