module Redd::Clients::Base::None

Methods that don't require any scope.

Public Instance Methods

captcha_url(iden) click to toggle source

@param iden [String] The captcha identifier. @return The url for the captcha image.

# File lib/redd/clients/base/none.rb, line 21
def captcha_url(iden)
  "http://www.reddit.com/captcha/#{iden}.png"
end
needs_captcha?() click to toggle source

@return [Boolean] Whether a captcha is required for some API methods.

# File lib/redd/clients/base/none.rb, line 7
def needs_captcha?
  get('/api/needs_captcha.json').body
end
new_captcha() click to toggle source

Create a new captcha identifier. @return [String] The identifier. @todo Maybe create some kind of set_captcha!(…) method for the

client to send automatically with the next response.
# File lib/redd/clients/base/none.rb, line 15
def new_captcha
  post('/api/new_captcha').body[:json][:data][:iden]
end