Module: Emma::API::Fields

Included in:
Client
Defined in:
lib/emma/api/fields.rb

Instance Method Summary collapse

Instance Method Details

#add_field(params = {}) ⇒ Object

Create a new field



17
18
19
# File 'lib/emma/api/fields.rb', line 17

def add_field(params = {})
  post("/fields", params)
end

#get_field_by_id(id, params = {}) ⇒ Object

Gets the detailed information about a particular field.



12
13
14
# File 'lib/emma/api/fields.rb', line 12

def get_field_by_id(id, params = {})
  get("/fields/#{id}", params)
end

#my_fields(params = {}) ⇒ Object

Gets a list of this account’s defined fields.



7
8
9
# File 'lib/emma/api/fields.rb', line 7

def my_fields(params = {})
  get("/fields", params)
end

#remove_field(id) ⇒ Object

Delete a field



22
23
24
# File 'lib/emma/api/fields.rb', line 22

def remove_field(id)
  delete("/fields/#{id}")
end

#remove_member_data_for_field(id) ⇒ Object

Clear the member data for the specified field.



27
28
29
# File 'lib/emma/api/fields.rb', line 27

def remove_member_data_for_field(id)
  post("/fields/#{id}/clear")
end

#update_field(id, params = {}) ⇒ Object

Updates an existing field.



32
33
34
# File 'lib/emma/api/fields.rb', line 32

def update_field(id, params = {})
  put("/fields/#{id}", params)
end