Skip to content

watzon/tweeter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tweeter

Travis Dependencies Github search hit counter license

Tweeter is a Crystal interface to the Twitter API and is heavily based off the wonderfully thurough Twitter Ruby Gem by sferik.

Installation

Add this to your application's shard.yml:

dependencies:
  tweeter:
    github: watzon/tweeter

Usage

Make sure to include the tweeter gem at the root of your application or wherever you need to access it's functionality.

require "tweeter"

Configuration

Configuration for Tweeter is very similar to that of the Twitter Ruby Gem. The Twitter API requires authentication via OAuth, so you'll first need to register your application with Twitter to receive a consumer_key and consumer_secret. You can also authenticate your current user to get an access_token and access_token_secret. Make sure you set the correct access level.

You can pass the values you receive as a block to Tweeter::REST::Client.new.

client = Tweeter::REST::Client.new do |config|
  config.consumer_key        = "YOUR_CONSUMER_KEY"
  config.consumer_secret     = "YOUR_CONSUMER_SECRET"
  config.access_token        = "YOUR_ACCESS_TOKEN"
  config.access_token_secret = "YOUR_ACCESS_SECRET"
end

Usage Examples

The project is still in development and until it has a stable API I will refrain from listing usage examples here. Feel free to look in the specs directory to see how things are done in the tests that have been written so far.

Development

v1.0.0 Progress

  • Authentication
  • Cursor Support
  • Streaming Client
  • REST Client
    • Direct Messages (sending not working yet)
    • Favorites
    • Friends and Followers
    • Help
    • Lists
    • OAuth
    • Places and Geo
    • Saved Searches
    • Search
    • Spam Reporting
    • Suggested Users
    • Timelines
    • Trends
    • Tweets
    • Undocumented Endpoints
    • Users
  • Complete Specs

Contributing

Please make sure you have the latest version of Crystal installed before doing any development. As of now this shard is updated to work with Crystal 0.24.1. Please also run crystal tool format & crystal spec before commiting.

  1. Fork it ( https://github.com/watzon/tweeter/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • watzon Chris Watson - creator, maintainer