class Nimbu::Endpoints::Sites
Public Instance Methods
get(*args)
click to toggle source
# File lib/nimbu-api/endpoints/sites.rb, line 17 def get(*args) require_authentication arguments(args, :required => [:site_id]) get_request("/sites/#{site_id}", arguments.params) end
Also aliased as: find
list(*args) { |el| ... }
click to toggle source
# File lib/nimbu-api/endpoints/sites.rb, line 7 def list(*args) require_authentication arguments(args) response = get_request("/sites", arguments.params) return response unless block_given? response.each { |el| yield el } end
Also aliased as: all
Private Instance Methods
require_authentication()
click to toggle source
# File lib/nimbu-api/endpoints/sites.rb, line 28 def require_authentication raise ArgumentError, 'You need to be authenticated to access the sites' unless authenticated? end