CommcareAPI.FakeCommcare.add_contact

You're seeing just the function add_contact, go back to CommcareAPI.FakeCommcare module for more information.

Specs

add_contact(binary()) :: :ok

Adds a contact in XML form to the server state.

Example

iex> CommcareAPI.FakeCommcare.start_link("path/to/state.json")
iex> xml = "<?xml version="1.0" ?>
  <data>
  ...
  </data>"
iex> CommcareAPI.FakeCommcare.add_contact(xml)
:ok
iex> CommcareAPI.FakeCommcare.get_json()
"{ json with the XML as contact }"