- Source:
Methods
(inner) genAndPostSubmissionToOna(convo, extraFields, url) → {promise}
Generate a submission and POST it to Ona We only need this function for its side effects therefore it lacks a return statemnt.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
convo |
object
|
A conversation object generated by botkit. |
extraFields |
object
|
Object containing {name, idString} name - Space seperated name of the respondent e.g John Doe idString - Ona form idString other fields thay you want in your submission |
url |
string
|
change the URL for testing |
Returns:
- Type:
-
promise
a promise holding the request response
(inner) postSubmissionToOna(payload, url) → {promise}
send a POST to Ona's submission endpoint. We only need this function for its side effects therefore it lacks a return statemnt.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
payload |
object
|
|
url |
string
|
change the URL for testing |
Returns:
- Type:
-
promise
a promise holding the request response