Module: GrowthPush::API
- Included in:
- Clients, Events, Notifications, Tags
- Defined in:
- lib/growth_push/api.rb,
lib/growth_push/api/tags.rb,
lib/growth_push/api/events.rb,
lib/growth_push/api/clients.rb,
lib/growth_push/api/notifications.rb
Defined Under Namespace
Classes: Clients, Events, Notifications, Tags
Instance Method Summary
collapse
Instance Method Details
#endpoint_for_class_name ⇒ Object
14
15
16
|
# File 'lib/growth_push/api.rb', line 14
def endpoint_for_class_name
self.name.match(/::([a-zA-Z]+)$/)[1].downcase
end
|
#request(verb, params = {}, endpoint = nil) ⇒ Object
8
9
10
11
12
|
# File 'lib/growth_push/api.rb', line 8
def request(verb, params={}, endpoint=nil)
return nil if params.delete(:dummy_access) == true
endpoint = endpoint_for_class_name if endpoint.nil?
Client.send(verb, endpoint, params)
end
|