BackType API
A simple Ruby wrapper for the BackType API.
Warning, Warning, Warning
This is a work-in-progress. The entire BackType API is not yet supported. There is little error handling in place. Tests are non-existent. A gem has not yet been compiled and pushed to a repository.
Installation
To install as a Gem:
sudo gem install backtyper
Authentication
Authentication is necessary for all actions.
BackTyper.authenticate "api_key"
Rate Limit
Check the rate limit status.
BackTyper::Client.rate_limit
Tweet examples
- Documentation - BackTyper::Tweets
# Authenticate with BackType
BackTyper.authenticate "ABC123"
# Retrieve the number of tweets that link to a particular URL.
BackTyper::Tweets.count('http://www.google.com')
# Retrieve filtered tweets that link to a given URL with both shortened and unshortened links.
# This returns a subset of Tweets by URL, but it filters tweets linking to a URL for quality.
# This skips all the tweets that only contain the page title, etc.
BackTyper::Tweets.good('http://www.google.com')
Comment examples
- Documentation - BackTyper::Comments
# Authenticate with BackType
BackTyper.authenticate "ABC123"
# Retrieve all conversations related to a given URL.
BackTyper::Comments.connect('http://www.google.com')
# Retrieve statistics on the conversations related to a given URL.
BackTyper::Comments.connect_stats('http://www.google.com')
Note on Patches/Pull Requests
- Fork the project.
- Make your feature addition or bug fix.
- Start a feature/bugfix branch
- Commit and push until you are happy with your contribution
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
- Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
- Send me a pull request. Bonus points for topic branches.
Author & Contributors
Copyright
Copyright (c) 2011 Justin Britten. See LICENSE.txt for details.