Confirmed users
99
edits
(thrash out send()) |
(add "validation" as an error result) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 11: | Line 11: | ||
To be implemented by the app (ie, APIs called by F1) | To be implemented by the app (ie, APIs called by F1) | ||
=== link.send. | === link.send.getCharacteristics() === | ||
Get enough metadata about the application so the necessary UI for the service can be dynamically built. This is similar to the current F1 "services" global, and allows F1 to offer "send to wall" for facebook versus "send to my contacts" for linkedin. | Get enough metadata about the application so the necessary UI for the service can be dynamically built. This is similar to the current F1 "services" global, and allows F1 to offer "send to wall" for facebook versus "send to my contacts" for linkedin. | ||
| Line 70: | Line 70: | ||
=== link.send.send(credentials_blob, data) === | === link.send.send(credentials_blob, data) === | ||
NOTE: The OWA spec defines that this method should be called ''confirm'' - | |||
this needs to be clarified. | |||
Send an item as described by "data" - ie, perform the actual share. | Send an item as described by "data" - ie, perform the actual share. | ||
| Line 84: | Line 87: | ||
==== error result ==== | ==== error result ==== | ||
If an error occurs, it will be reported via the normal jschannel error callback (ie, with ''error'' and ''message'' parameters, where the content of ''message'' will depend on the value of ''error''. The following error values are supported: | If an error occurs, it will be reported via the normal jschannel error callback (ie, with ''error'' and ''message'' parameters, where the content of ''message'' will depend on the value of ''error''. All strings which will be displayed to the user should be localized. The following error values are supported: | ||
;authentication: Indicates the message failed due to an authentication problem (eg, the cookie expired). Authentication will be re-performed and the user will be given the opportunity of retrying the error. ''message'' will be null. | ;authentication: Indicates the message failed due to an authentication problem (eg, the cookie expired). Authentication will be re-performed and the user will be given the opportunity of retrying the error. ''message'' will be null. | ||
;validation: Indicates validation of the data failed for some reason. ''message'' will be an object with properties ''name'' (the name of the field in the send data which failed validation) and ''reason'' (the reason the field is invalid). The F1 UI will display the error and focus the appropriate field so the user can fix it and retry. | |||
;http_error: Indicates a HTTP error occurred sending the item. ''message'' will be the http error code. This would be an appropriate error if a back-end server returned a 500 error (eg, twitter was down), but is '''not''' appropriate for a 401 error - the service should translate a 401 to an ''authentication'' error if re-authentication is necessary. | ;http_error: Indicates a HTTP error occurred sending the item. ''message'' will be the http error code. This would be an appropriate error if a back-end server returned a 500 error (eg, twitter was down), but is '''not''' appropriate for a 401 error - the service should translate a 401 to an ''authentication'' error if re-authentication is necessary. | ||