class Obutts::Client

Constants

DOMAIN

Public Instance Methods

butts(start = 0, count = 1, order = 'id') click to toggle source
# File lib/obutts/client.rb, line 8
def butts(start = 0, count = 1, order = 'id')
  get "/butts/#{start}/#{count}/#{order}"
end
by_id(id) click to toggle source
# File lib/obutts/client.rb, line 12
def by_id(id)
        get "/butts/get/#{id}"
end
count() click to toggle source
# File lib/obutts/client.rb, line 16
def count
  get "/butts/count"
end

Private Instance Methods

get(path) click to toggle source
# File lib/obutts/client.rb, line 22
def get(path)
        ::JSON.parse RestClient.get("#{DOMAIN}#{path}").body
end