Class: Userlist::Push::Client
- Inherits:
-
Object
- Object
- Userlist::Push::Client
- Includes:
- Logging
- Defined in:
- lib/userlist/push/client.rb
Instance Method Summary collapse
- #delete(endpoint) ⇒ Object
- #get(endpoint) ⇒ Object
-
#initialize(config = {}) ⇒ Client
constructor
A new instance of Client.
- #post(endpoint, payload = nil) ⇒ Object
- #put(endpoint, payload = nil) ⇒ Object
Methods included from Logging
Constructor Details
Instance Method Details
#delete(endpoint) ⇒ Object
27 28 29 |
# File 'lib/userlist/push/client.rb', line 27 def delete(endpoint) request(Net::HTTP::Delete, endpoint) end |
#get(endpoint) ⇒ Object
15 16 17 |
# File 'lib/userlist/push/client.rb', line 15 def get(endpoint) request(Net::HTTP::Get, endpoint) end |
#post(endpoint, payload = nil) ⇒ Object
19 20 21 |
# File 'lib/userlist/push/client.rb', line 19 def post(endpoint, payload = nil) request(Net::HTTP::Post, endpoint, payload) end |
#put(endpoint, payload = nil) ⇒ Object
23 24 25 |
# File 'lib/userlist/push/client.rb', line 23 def put(endpoint, payload = nil) request(Net::HTTP::Put, endpoint, payload) end |