Project

read_it

0.0
No commit activity in last 3 years
No release in over 3 years
A very simple wrapper for the reddit api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0
>= 0
>= 0

Runtime

>= 0.8.7
 Project Readme

ReadIt

A very simple, read-only wrapper for the reddit api

Installation

Add this line to your application's Gemfile:

gem 'read_it'

And then execute:

$ bundle

Or install it yourself as:

$ gem install read_it

Usage

gifs = ReadIt::Sub.new 'gifs'   # => #<ReadIt::Sub:0x007f837c168530 @name="/r/gifs">
random_post = gifs.sample       # => #<ReadIt::Post:0x007f837c08b770...>
random_post.title               # => "It was the best gif I'd seen all day"
random_post.image?              # => true
random_post.nsfw?               # => false
random_post.url                 # => "http://i.imgur.com/D4LcGLt.gif"
ReadIt.sub('babyelephantgifs').recent.first.url # => "http://i.imgur.com/fogh8W4.gif"
ReadIt.sub('avocadosgonewild').sample.nsfw? # => true

Returns recent posts from the sub reddit that have images

ReadIt.sub('formula1').recent_images 

Contributing

  1. Fork it ( http://github.com/adamzaninovich/read_it/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 new Pull Request