Sha256: 0229665ab14a05c83865b486c1dd3cb1bf0046a38630ee22eb1fb436dbaedb3e

Contents?: true

Size: 430 Bytes

Versions: 11

Compression:

Stored size: 430 Bytes

Contents

module Redd
  module Client
    class Unauthenticated
      module Captcha
        def needs_captcha?
          get "/api/needs_captcha.json"
        end

        def new_captcha
          response = get "/api/new_captcha", api_type: "json"
          response[:json][:data][:iden]
        end

        def captcha_url(identifier)
          "http://www.reddit.com/captcha/#{identifier}.png"
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
redd-0.4.3 lib/redd/client/unauthenticated/captcha.rb
redd-0.4.2 lib/redd/client/unauthenticated/captcha.rb
redd-0.4.1 lib/redd/client/unauthenticated/captcha.rb
redd-0.4.0 lib/redd/client/unauthenticated/captcha.rb
redd-0.3.0 lib/redd/client/unauthenticated/captcha.rb
redd-0.2.0 lib/redd/client/unauthenticated/captcha.rb
redd-0.1.6 lib/redd/client/unauthenticated/captcha.rb
redd-0.1.5 lib/redd/client/unauthenticated/captcha.rb
redd-0.1.4 lib/redd/client/unauthenticated/captcha.rb
redd-0.1.3 lib/redd/client/unauthenticated/captcha.rb
redd-0.1.2 lib/redd/client/unauthenticated/captcha.rb