UNPKG

baasic-sdk-angularjs

Version:

AngularJS SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).

79 lines (49 loc) 1.86 kB
# baasicRegisterService Baasic Register Service provides an easy way to consume Baasic Application Registration REST API end-points. * * * ### baasicRegisterService.create() Returns a promise that is resolved once the register create has been performed. This action will create a new user if completed successfully. Created user is not approved immediately, instead an activation e-mail is sent to the user. **Example**: ```js baasicRegisterService.create({ activationUrl : '<activation-url>', challengeIdentifier : '<challenge-identifier>', challengeResponse : '<challenge-response>', confirmPassword : '<confirm-password>', email : '<email>', password : '<password>', username : '<username>' }) .success(function (data) { // perform success actions here }) .error(function (data, status) { // perform error handling here }) .finally (function () {}); ``` ### baasicRegisterService.activate() Returns a promise that is resolved once the account activation action has been performed; this action activates a user account and success response returns the token resource. **Example**: ```js baasicRegisterService.activate({ activationToken : '<activation-token>' }) .success(function (data) { // perform success actions here }) .error(function (data, status) { // perform error handling here }) .finally (function () {}); ``` ### baasicRegisterService.routeService() Provides direct access to route definition. **Example**: ```js baasicRegisterService.routeService.get('<id>', expandObject); ``` * * * **Notes:** - Refer to the [Baasic REST API](http://dev.baasic.com/api/reference/home) for detailed information about available Baasic REST API end-points. - All end-point objects are transformed by the associated route service.