baasic-sdk-angularjs

2.0.0 • Public • Published

Baasic AngularJS SDK

Baasic AngularJS library provides integration access to Baasic REST API core end-points.

Dependencies

Baasic AngularJS library has the following dependencies:

Usage

This section will describe how to add the Baasic AngularJS library to your project. It's important to know that Baasic AngularJS SDK uses HAL+JSON format for the back-end communication. You can find out more about HAL format here.

Adding the library to your project

Please add the following lines of code after the AngularJS include:

<script src='/js/hal-parser.js'></script>
<script src='/js/uritemplate-min.js'></script>
<script src='/js/baasic-sdk-javascript-2.0.1.min.js'></script>
<script src='/js/baasic-sdk-angularjs-2.0.0.min.js'></script>

Note: Baasic JavaScript SDK uses jQuery for http communication only if JavaScript SDK is used as stand-alone library, inside the AngularJS SDK $http service is used.

Initialization

To be able to use the library you will need to add the Baasic (baasic.api) dependency to your AngularJS module.

angular.module('my-module', ["baasic.api"])

Application Configuration

Baasic AngularJS library allows you to use multiple Baasic applications in your AngularJS modules. To initialize a Baasic application you will need to add the following code to you module configuration:

module.config(["baasicAppProvider",
    function (baasicAppProvider) {
        var app = baasicAppProvider.create("<api-key>", {
            apiRootUrl: "api.baasic.com",
            apiVersion: "<version>"
        });
    }]);

Note: To obtain a Baasic Application Identifier please create your application on Baasic Registration page.

Baasic Modules

Baasic back-end contains various built-in modules that can be easily consumed through the Baasic AngularJS library. Baasic Developer Center contains detailed information about all the core modules supported by the AngularJS library.

Build Process

  1. Install NodeJs
  2. Open Shell/Command Prompt in the Baasic AngularJS folder
  3. Run npm install
  4. Install gulp globally: npm install -g gulp
  5. Run gulp

Contributing

Pull requests are always welcome

We appreciate pull requests you make, and we'll do our best to process them as quickly as we can. Even if it's just a typo you found or any small or large issue you fixed - please do it! It will help us a lot.

If your pull request is not accepted on your first try, don't be discouraged! If there's a problem with your implementation, hopefully you received feedback on what to improve.

Issue reporting

Before you create a new issue, please make sure it hasn't already been reported. In case it already exists simply add a quick "+1" or "I have the same problem" to the existing issue thread.

Other
  • Pull requests are always welcome
  • Please report any issues you might have found
  • Help us write the documentation
  • Create interesting apps using SDK
  • Looking for something else to do? Get in touch ...

Package Sidebar

Install

npm i baasic-sdk-angularjs

Weekly Downloads

8

Version

2.0.0

License

none

Last publish

Collaborators

  • baasic