tweeter
Version, currently master branch1 version
- master branchlatestMar 4, 2018
github.com/watzon/tweeter
Twitter API wrapper for Crystal
Installation
# Add this to your shard.yml
dependencies:
tweeter:
github: watzon/tweeter
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.24.1- License
- MIT
- Author
- Chris Watson
Dependencies
Runtime Dependencies
- halite*github: icyleaf/halite
- easy_oauth*github: watzon/easy_oauth
Development Dependencies
- spec2*github: watzon/spec2.cr, branch: masterdev
- timecop*github: TobiasGSmollett/timecop.crdev
- webmock*github: manastech/webmock.cr, branch: masterdev
README
Tweeter
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
- [x] Authentication
- [x] Cursor Support
- [ ] Streaming Client
- [ ] REST Client
- [x] Direct Messages (sending not working yet)
- [x] Favorites
- [x] Friends and Followers
- [x] Help
- [ ] Lists
- [x] OAuth
- [ ] Places and Geo
- [ ] Saved Searches
- [x] Search
- [ ] Spam Reporting
- [ ] Suggested Users
- [x] Timelines
- [x] Trends
- [x] Tweets
- [x] Undocumented Endpoints
- [x] 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.
- Fork it ( https://github.com/watzon/tweeter/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- watzon Chris Watson - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Mar 4, 2018
- Crystal
0.24.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/watzon/tweeter
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1