# maygaserver

> A nodejs wrapper for mayga messaging API to enable in app messaging

Latest version **0.0.3** (published 2014-09-10) · 0 weekly downloads

## Install

```sh
npm install maygaserver
pnpm add maygaserver
yarn add maygaserver
bun add maygaserver
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2014-09-10 |
| First published | 2014-09-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Prabhu Velayutham |
| Maintainers | pvela |
| Keywords | messaging, mayga |

## Links

- npm: https://www.npmjs.com/package/maygaserver
- Repository: https://github.com/pvela/maygaserver-nodejs
- Homepage: http://mayga.me
- Issues: https://github.com/pvela/maygaserver-nodejs/issues
- npm.io page: https://npm.io/package/maygaserver

## Recent versions

- 0.0.3 (latest) — 2014-09-10
- 0.0.2 — 2014-09-10
- 0.0.1 — 2014-09-10

## README

maygaserver-nodejs
==================
A nodejs wrapper for mayga (mayga.me) messaging API to enable in app messaging

Installation Instructions :
===========================

Download and Install lib/maygaserver.js in your lib

or

use "npm install maygaserver -g"

Usage :
=======
if installed by downloading the file

	var maygaserver = require('./lib/maygaserver');

for NPM based install

	var maygaserver = require('maygaserver');

	maygaserver.initialize(credentials, options);

(required) credentials :
        (required) clientId from mayga.me
        (required) clientSecret from mayga.me

(optional) options :
	(optional) debugOn = true / false
        (optional) server = restify or express server object
        (optional) endpoint = endpoint url to expose this api default : /integration/mayga/getToken/:userEmail

List of API's supported by the library.
=======================================

###Add a new User

        maygaserver.addNewAppUser(userEmail,callback)

###Get Authroization Token for server side integration

        maygaserver.getAuthToken(callback);


###Get Authroization Token on behalf of the user for client side integration

        maygaserver.getUserToken(email, callback);

###Example :

	maygaserver.initialize({clientId:"abcdeg",clientSecret:"qwerty"},{debugOn:true});
	maygaserver.addNewAppUser("welcometomayga@mayga.me",function(err,user) {
        	console.dir(user);
        	mayga.getUserToken("welcometomayga@mayga.me",function(err,token) {
                	console.dir(token);
        	});
	});

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