Module: Kekeewin::RestAPI

Defined in:
lib/kekeewin.rb

Defined Under Namespace

Modules: Configuration Classes: Base

Class Method Summary collapse

Class Method Details

.chapters(options = {}) ⇒ Object



135
136
137
138
# File 'lib/kekeewin.rb', line 135

def chapters(options={})
  options.merge!({:basic_auth => {:username => Base.username, :password => Base.password}})
  HTTParty.get(Base.host + "/rest_api/chapters.json", options)
end

.configure(&block) ⇒ Object



116
117
118
# File 'lib/kekeewin.rb', line 116

def configure(&block)
  Kekeewin::RestAPI::Base.configure(&block)
end

.councils(options = {}) ⇒ Object



120
121
122
123
# File 'lib/kekeewin.rb', line 120

def councils(options={})
  options.merge!({:basic_auth => {:username => Base.username, :password => Base.password}})
  HTTParty.get(Base.host + "/rest_api/councils.json", options)
end

.districts(options = {}) ⇒ Object



125
126
127
128
# File 'lib/kekeewin.rb', line 125

def districts(options={})
  options.merge!({:basic_auth => {:username => Base.username, :password => Base.password}})
  HTTParty.get(Base.host + "/rest_api/districts.json", options)
end

.lodges(options = {}) ⇒ Object



130
131
132
133
# File 'lib/kekeewin.rb', line 130

def lodges(options={})
  options.merge!({:basic_auth => {:username => Base.username, :password => Base.password}})
  HTTParty.get(Base.host + "/rest_api/lodges.json", options)
end

.positions(options = {}) ⇒ Object



140
141
142
143
# File 'lib/kekeewin.rb', line 140

def positions(options={})
  options.merge!({:basic_auth => {:username => Base.username, :password => Base.password}})
  HTTParty.get(Base.host + "/rest_api/positions.json", options)
end