Class: Localytics::Profile
- Inherits:
-
Object
- Object
- Localytics::Profile
- Defined in:
- lib/localytics/profile.rb
Class Attribute Summary collapse
-
.app_id ⇒ Object
Returns the value of attribute app_id.
Class Method Summary collapse
- .create(customer_id, params = {}, app_id = nil, api_key = nil, api_secret = nil) ⇒ Object
- .delete(customer_id, app_id = nil, api_key = nil, api_secret = nil) ⇒ Object
- .profiles(customer_id, api_key = nil, api_secret = nil) ⇒ Object
- .profiles_by_email(customer_email, api_key = nil, api_secret = nil) ⇒ Object
- .show(customer_id, app_id = nil, api_key = nil, api_secret = nil) ⇒ Object
- .update(customer_id, params = {}, app_id = nil, api_key = nil, api_secret = nil) ⇒ Object
Class Attribute Details
.app_id ⇒ Object
Returns the value of attribute app_id.
4 5 6 |
# File 'lib/localytics/profile.rb', line 4 def app_id @app_id end |
Class Method Details
.create(customer_id, params = {}, app_id = nil, api_key = nil, api_secret = nil) ⇒ Object
7 8 9 |
# File 'lib/localytics/profile.rb', line 7 def self.create(customer_id, params={}, app_id=nil, api_key=nil, api_secret=nil) Localytics.request api_base, :post, url(customer_id, app_id), api_key, api_secret, params end |
.delete(customer_id, app_id = nil, api_key = nil, api_secret = nil) ⇒ Object
19 20 21 |
# File 'lib/localytics/profile.rb', line 19 def self.delete(customer_id, app_id=nil, api_key=nil, api_secret=nil) Localytics.request api_base, :delete, url(customer_id, app_id), api_key, api_secret end |
.profiles(customer_id, api_key = nil, api_secret = nil) ⇒ Object
23 24 25 |
# File 'lib/localytics/profile.rb', line 23 def self.profiles(customer_id, api_key=nil, api_secret=nil) Localytics.request api_base, :get, "/customers/#{customer_id}", api_key, api_secret end |
.profiles_by_email(customer_email, api_key = nil, api_secret = nil) ⇒ Object
27 28 29 |
# File 'lib/localytics/profile.rb', line 27 def self.profiles_by_email(customer_email, api_key=nil, api_secret=nil) Localytics.request api_base, :get, "/customers?email=#{customer_email}", api_key, api_secret end |
.show(customer_id, app_id = nil, api_key = nil, api_secret = nil) ⇒ Object
15 16 17 |
# File 'lib/localytics/profile.rb', line 15 def self.show(customer_id, app_id=nil, api_key=nil, api_secret=nil) Localytics.request api_base, :get, url(customer_id, app_id), api_key, api_secret end |
.update(customer_id, params = {}, app_id = nil, api_key = nil, api_secret = nil) ⇒ Object
11 12 13 |
# File 'lib/localytics/profile.rb', line 11 def self.update(customer_id, params={}, app_id=nil, api_key=nil, api_secret=nil) Localytics.request api_base, :patch, url(customer_id, app_id), api_key, api_secret, params end |