User talk:Bwinton/Account Provisioner API

From MozillaWiki
Jump to: navigation, search

Account Provisioner API Feedback

Hey Blake,

this looks great! Nice API and approach.

A few smaller suggestions:

  • I am assuming this APi exists once per provider, thus there's no need to tell suggestFromName whether to allow domains or just usernames.
  • Include .name in the domain suggestions :)
  • Return XML (E4X!) instead of JSON
  • Only one pref for all functions. You're defining the whole API, so you just define that they need to provide these functions as these names (with these params and this result etc.). Makes usage easier, because you need to change only 1 pref when changing from dev to production server.
  • you don't want to return "error1234", do you? In server APIs, it's best to return both an error number (so machine error handling or client-side error text override is possible) and an user-readable, localized error string (so that server and client can't get out of sync wrt to errors).