Skip to content

niwasawa/twitter-rss-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TwitterRSS: Twitter RSS feed Ruby gem library

Gem Version

This library is under development and unstable.

Installation

Add this line to your application's Gemfile:

gem 'twitter_rss'

And then execute:

$ bundle

Or install it yourself as:

$ gem install twitter_rss

Usage

require 'twitter_rss'

# create a instance of TwitterRSS
tr = TwitterRSS.new({
  :consumer_key => 'YOUR_CONSUMER_KEY',
  :consumer_secret => 'YOUR_CONSUMER_SECRET',
  :token => 'YOUR_ACCESS_TOKEN',
  :token_secret => 'YOUR_ACCESS_SECRET'
})

# get RSS feed (GET statuses/user_timeline)
rss = tr.statuses_user_timeline({
  'screen_name' => 'YOUR_SCREEN_NAME',
  'count' => '20',
  'tweet_mode' => 'extended'
},{
  'channel' => {
    'title' => 'Your RSS feed title',
    'description' => 'Your RSS feed title',
    'link' => 'https://twitter.com/YOUR_SCREEN_NAME'
  },
})
puts rss

# get RSS feed (GET favorites/list)
rss = tr.favorites_list({
  'screen_name' => 'YOUR_SCREEN_NAME',
  'count' => '20',
  'tweet_mode' => 'extended'
},{
  'channel' => {
    'title' => 'Your RSS feed title',
    'description' => 'Your RSS feed title',
    'link' => 'https://twitter.com/YOUR_SCREEN_NAME/likes'
  },
})
puts rss

# get RSS feed (Standard search API)
rss = tr.search_tweets({
  'q' => 'SEARCH_QUERY',
  'count' => '20',
  'tweet_mode' => 'extended'
},{
  'channel' => {
    'title' => 'Your RSS feed title',
    'description' => 'Your RSS feed title',
    'link' => 'https://twitter.com/search?q=SEARCH_QUERY'
  },
})
puts rss

Documentation

Development

$ rake -T
rake build            # Build twitter_rss-X.X.X.gem into the pkg directory
rake clean            # Remove any temporary products
rake clobber          # Remove any generated files
rake install          # Build and install twitter_rss-X.X.X.gem into system gems
rake install:local    # Build and install twitter_rss-X.X.X.gem into system gems without network access
rake release[remote]  # Create tag vX.X.X and build and push twitter_rss-X.X.X.gem to Rubygems
rake spec             # Run RSpec code examples

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/niwasawa/twitter-rss-ruby.

License

The gem is available as open source under the terms of the MIT License.

About

TwitterRSS: Twitter RSS feed Ruby gem library

Resources

License

Stars

Watchers

Forks

Packages

No packages published