email
password
More API calls and documentation coming soon! Be sure to check back regularly.

service_collection_widget

Returns Javascript that renders the service collection widget.

When included as Javascript, this call renders the service collection widget (see the example below). The widget makes it easy to collect a user's public identifiers. Additionally, if display_sync is set to "TRUE" the widget makes it easy to allow the user to sync with DandyID and thus subsequently "cross-pollinate" their data. Depending on how the user interacts with the widget it will attempt to locate and call one of two javascript call back functions.

Request URL: GET

http://www.dandyId.org/api/service_collection_widget/{api_key}/{user_identifier}/{display_sync}


GET Request parameters


Parameter Type Description
api_key string (required) Your api key
user_identifier string (required) Can be either an MD5 hashed email address or dandyId user id
display_sync string (required) Hides the widget's sync features if set to "FALSE". Can either be"TRUE" or "FALSE"

Call Back Functions

The service_collection_widget will attempt to locate and call the following javascript functions depending on the user's action.

note: You must manually code these functions into the document if you would like the widget to call them.

service_change_callback_dandyid

When the user either adds, updates or deletes a service the widget will attempt to call this function and pass into it the parameters listed below.

note: service_change_callback_dandyid is intended to be used in conjunction with the API call "update_service." However, for security purposes, please be advised that "update_service" must only ever be called from your server and NOT in the call back function itself!


Parameter Type Description
user_identifier string The user_identifier originally passed to the widget when it was called.
svcId string Id of the service on dandyId (one word all lowercase).
svcDisplay string Displayable name of the service (i.e. Twitter, LinkedIn, etc).
usrSvcId string Username or other identifier of the user on the corresponding service. IF BLANK THE USER HAS REMOVED THE SERVICE.
svcUrl string Url to the user's public profile on the corresponding service (i.e. http://www.twitter.com/sara6633).

init_sync_user_dandyid

When the user attempts to sync with DandyID the widget will attempt to call this function and pass into it the parameters listed below.

note: init_sync_user_dandyid is intended to be used in conjunction with the API call "sync_user." However, for security purposes, please be advised that "sync_user" must only ever be called by your server and NOT in the call back function itself!


Parameter Type Description
user_identifier string The user_identifier originally passed to the widget when it was called.
email string Email address associated with the DandyID account that the user it attempting to sync with.
password string Password associated with the DandyID account that the user it attempting to sync with.

Example

The following is an example of the widget. Try adding a service and/or view the source for more info.