# ng-api-handler

> An AngularJS module for use all Google Apis and your Google Cloud Endpoints (Google App Engine) Using angular gapi, For Encapsulation

Latest version **1.0.2** (published 2016-06-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install ng-api-handler
pnpm add ng-api-handler
yarn add ng-api-handler
bun add ng-api-handler
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-06-30 |
| First published | 2016-06-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+10 in 1 direct dependencies) |
| Install scripts | no |
| Author | Theophilus Omoregbee |
| Maintainers | theo4u |
| Keywords | angular, gapi, ngApiHandler, google-appengine, google, api, google, app, engine, gae, google, cloud, endpoints, angular.js |

## Links

- npm: https://www.npmjs.com/package/ng-api-handler
- Repository: https://github.com/theo4u/ngApiHandler
- Homepage: https://github.com/theo4u/ngApiHandler#readme
- Issues: https://github.com/theo4u/ngApiHandler/issues
- npm.io page: https://npm.io/package/ng-api-handler

## Dependencies (2)

- [angular](https://npm.io/package/angular.md) ^1.5.7
- [angular-google-gapi](https://npm.io/package/angular-google-gapi.md) ^1.0.0

## Recent versions

- 1.0.2 (latest) — 2016-06-30
- 1.0.1 — 2016-06-30

## README

# ngApiHandler
 
An **AngularJS** module for use all Google Apis and your Google Cloud Endpoints (Google App Engine) Using   [angular gapi](https://github.com/maximepvrt/angular-google-gapi) , For Encapsulation.


## Requirements

- [Angular.js](http://angularjs.org)
- [angular-google-gapi](https://github.com/maximepvrt/angular-google-gapi)

## Installation
### Add library
This module is available as bower package, install it with this command:

```bash
bower install ng-api-handler
```

and it's available too as npm package, install it with this command:

```bash
npm install ng-api-handler
```

or you may download the [latest release](https://github.com/theo4u/ngApiHandler/releases)

### Include library
```html
<script type="text/javascript" src="/ng-api-handler/dist/angular-google-gapi.min.js"></script>
```
### Add dependency

```javascript
var app = angular.module('myModule', ['ngApiHandler']);
```

## Configuration
### without Google Auth

add run in root module

```javascript
app.run(['ApiHandler',
  function(ApiHandler) {
   ApiHandler.connectApi('myApiName','v1');//calling this for access to get all method from the myApiName class api
     }
          ]);
```

## Use

### Execute our api 

```javascript
app.controller('myController', ['$scope', 'ApiHandler',
    function myController($scope, ApiHandler) {
    param={};//or {item:value[,item1:value1]}
      	ApiHandler.callService('myApiName', 'you.api.method.name',param}).then( function(resp) {
               //success
                console.info(resp);
	}, function(err) {
	//failure
		console.error(err);
	});
    }
]);
```

---
_Source: https://npm.io/package/ng-api-handler · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
