New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

NeonRAW

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

NeonRAW

  • 0.1.7
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

NeonRAW

NeonRAW is an API wrapper for Reddit written in Ruby.

Installation

Add this line to your application's Gemfile:

gem 'NeonRAW'

And then execute:

$ bundle

Or install it yourself as:

$ gem install NeonRAW

Usage

Just require the gem at the top of your file.

require 'NeonRAW'

Samples

# Make a web app.
client = NeonRAW.web('client_id', 'secret', 'redirect_uri', user_agent: 'test')
url = client.auth_url('state', ['identity', 'read'], 'permanent')
puts "Go to #{url} and enter the code below: "
code = gets.chomp
client.authorize! code

# Make a script app. Script apps automatically authorize themselves for you.
client = NeonRAW.script('username', 'password', 'client_id',
                        'secret', user_agent: 'test')

# Fetch some submissions from /r/programming's hot queue.
subreddit = client.subreddit 'programming'
submissions = subreddit.hot limit: 10

submissions.each_with_index do |submission, i|
  puts "#{i + 1}: #{submission.title}"
end

# Fetch a user and message them if they're a friend.
user = client.user 'SirNeon'
user.message 'Hi.', "How's it going?" if user.friend?

# Fetch yourself and check your orangereds if you have mail.
myself = client.me
new_messages = myself.inbox limit: myself.inbox_count if myself.mail?

Contributing

See here.

FAQs

Package last updated on 08 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc