Class: Splitwise::Friends

Inherits:
Object
  • Object
show all
Defined in:
lib/splitwise/friends.rb

Class Method Summary collapse

Class Method Details

.create(data) ⇒ Object



21
22
23
24
# File 'lib/splitwise/friends.rb', line 21

def create(data)
  params = "create_friend"
  request.update(params, data)
end

.create_friendsObject



26
27
28
# File 'lib/splitwise/friends.rb', line 26

def create_friends
  # to do
end

.friend_info(id) ⇒ Object



16
17
18
19
# File 'lib/splitwise/friends.rb', line 16

def friend_info(id)
  params = "get_friend/" + id
  request.fetch(params)
end

.list_friendsObject



11
12
13
14
# File 'lib/splitwise/friends.rb', line 11

def list_friends
  params = "get_friends"
  request.fetch(params)
end

.requestObject



7
8
9
# File 'lib/splitwise/friends.rb', line 7

def request
  Splitwise::Request.new
end

.unfriend(id) ⇒ Object



30
31
32
33
# File 'lib/splitwise/friends.rb', line 30

def unfriend(id)
  params = "delete_friend/" + id
  request.update(params, nil)
end