onadata.apps.restservice.services package¶
Submodules¶
onadata.apps.restservice.services.f2dhis2 module¶
Formhub/Ona Data to DHIS2 service - push submissions to DHIS2 instance.
- class onadata.apps.restservice.services.f2dhis2.ServiceDefinition¶
Bases:
RestServiceInterface
Post submission to DHIS2 instance.
- id = 'f2dhis2'¶
- send(url, data=None)¶
Post submission to DHIS2 instance.
- verbose_name = 'Formhub to DHIS2'¶
onadata.apps.restservice.services.generic_json module¶
Post submisison JSON data to an external service that accepts a JSON post.
- class onadata.apps.restservice.services.generic_json.ServiceDefinition¶
Bases:
RestServiceInterface
Post submisison JSON data to an external service that accepts a JSON post.
- id = 'json'¶
- send(url, data=None)¶
Post submisison JSON data to an external service that accepts a JSON post.
- verbose_name = 'JSON POST'¶
onadata.apps.restservice.services.generic_xml module¶
Post submisison XML data to an external service that accepts an XML post.
- class onadata.apps.restservice.services.generic_xml.ServiceDefinition¶
Bases:
RestServiceInterface
Post submisison XML data to an external service that accepts an XML post.
- id = 'xml'¶
- send(url, data=None)¶
Post submisison XML data to an external service that accepts an XML post.
- verbose_name = 'XML POST'¶
onadata.apps.restservice.services.textit module¶
Post submission data to a textit/rapidpro server.
- class onadata.apps.restservice.services.textit.ServiceDefinition¶
Bases:
RestServiceInterface
Post submission data to a textit/rapidpro server.
- clean_keys_of_slashes(record)¶
Replaces the slashes found in a dataset keys with underscores :param record: list containing a couple of dictionaries :return: record with keys without slashes
- id = 'textit'¶
- send(url, data=None)¶
Sends the submission to the configured rest service :param url: :param data: :return:
- verbose_name = 'TextIt POST'¶