base-api

0.0.3 • Public • Published

Base-Api

An api written in Javascript for centrallizing Ajax calls and returning response via Promise Object. This API is compliant with ECMA 2015 new features and syntaxs and is transpiled to ECMA 5 via Babel.

How to install

npm install base-api

Dependencies

Angular for ng-base-api.js
JQuery for amd-base-api.js

How to use

Include the files(as per your project requirement/technologies) and inject the module into your js files.

Eg.

For Project based on AngularJS Framework
angular.module('Module1').controller('DummyController', ['BaseApiFactory', function(baseApiFactory){
   baseApiFactory.get(...);
   baseApiFactory.post(...);
   baseApiFactory.put(...);
}]);

For Project based on AMD pattern
define(['amd-base-api-es5'], function(baseApiFactory){
   baseApiFactory.get(...);
   baseApiFactory.post(...);
   baseApiFactory.put(...);
});

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i base-api

      Weekly Downloads

      2

      Version

      0.0.3

      License

      MIT

      Last publish

      Collaborators

      • drapal