Class: Preact::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/preact/client.rb

Instance Method Summary collapse

Instance Method Details

#create_event(person, event) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/preact/client.rb', line 7

def create_event(person, event)
	params = {
    :person => Preact.configuration.prepare_person_hash(person),
    :event => Preact.configuration.prepare_event_hash(event)
  }

  if params[:event][:account]
    params[:event][:account] = Preact.configuration.(params[:event][:account])
  end
  
  data = post_request("/events", params)
end

#update_account(account) ⇒ Object



28
29
30
31
32
33
34
35
# File 'lib/preact/client.rb', line 28

def ()

  params = {
    :account => Preact.configuration.()
  }

  data = post_request("/accounts", params)
end

#update_person(person) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/preact/client.rb', line 20

def update_person(person)
  params = {
    :person => Preact.configuration.prepare_person_hash(person)
  }

  data = post_request("/people", params)
end