Class: Talkable::API::Person

Inherits:
Base
  • Object
show all
Defined in:
lib/talkable/api/person.rb

Class Method Summary collapse

Methods inherited from Base

get, post, put

Class Method Details

.anonymize(email_or_username) ⇒ Object



19
20
21
# File 'lib/talkable/api/person.rb', line 19

def anonymize(email_or_username)
  post "/people/#{email_or_username}/anonymize"
end

.find(email_or_username) ⇒ Object



5
6
7
# File 'lib/talkable/api/person.rb', line 5

def find(email_or_username)
  get "/people/#{email_or_username}"
end

.personal_data(email_or_username) ⇒ Object



23
24
25
# File 'lib/talkable/api/person.rb', line 23

def personal_data(email_or_username)
  get "/people/#{email_or_username}/personal_data"
end

.unsubscribe(email_or_username) ⇒ Object



15
16
17
# File 'lib/talkable/api/person.rb', line 15

def unsubscribe(email_or_username)
  post "/people/#{email_or_username}/unsubscribe"
end

.update(email_or_username, params) ⇒ Object



9
10
11
12
13
# File 'lib/talkable/api/person.rb', line 9

def update(email_or_username, params)
  put "/people/#{email_or_username}", {
    data: params
  }
end