Class: AngelList::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/angel_list/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auth) ⇒ Base

Returns a new instance of Base.



5
6
7
# File 'lib/angel_list/base.rb', line 5

def initialize(auth)
  self.auth = auth
end

Instance Attribute Details

#authObject

Returns the value of attribute auth.



3
4
5
# File 'lib/angel_list/base.rb', line 3

def auth
  @auth
end

Instance Method Details

#delete(url, options = {}) ⇒ Object



21
22
23
# File 'lib/angel_list/base.rb', line 21

def delete(url, options={})
  parse(self.auth.token.delete(url, options))
end

#get(url, options = {}) ⇒ Object



13
14
15
# File 'lib/angel_list/base.rb', line 13

def get(url, options={})
  parse(self.auth.token.get(url, options))
end

#parse(r) ⇒ Object



9
10
11
# File 'lib/angel_list/base.rb', line 9

def parse(r)
  AngelList::Response.new(r).content
end

#post(url, options = {}) ⇒ Object



17
18
19
# File 'lib/angel_list/base.rb', line 17

def post(url, options={})
  parse(self.auth.token.post(url, options))
end