Class: Splitwise::Friends
- Inherits:
-
Object
- Object
- Splitwise::Friends
- Defined in:
- lib/splitwise/friends.rb
Class Method Summary collapse
- .create(data) ⇒ Object
- .create_friends ⇒ Object
- .friend_info(id) ⇒ Object
- .list_friends ⇒ Object
- .request ⇒ Object
- .unfriend(id) ⇒ Object
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_friends ⇒ Object
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_friends ⇒ Object
11 12 13 14 |
# File 'lib/splitwise/friends.rb', line 11 def list_friends params = "get_friends" request.fetch(params) end |
.request ⇒ Object
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 |