2.0.3 • Published 4 years ago

google_subscriptions v2.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Number Formatter

A small library that allows to retrieve the expiration date of a purchase subscription

Installation

npm install google_subscriptions --save

Usage

	import * as Express                   from "express"
	import { GoogleSubscription }         from "google_subscriptions"

	let app = Express()

	//Check the expiration date of a given subscription
	let googleSubscription = new GoogleSubscription(process.env.PACKAGE_NAME ,
				process.env.PRODUCT_ID, 
				process.env.SECRET_FILE_PATH,
				process.env.CLIENT_KEY,
				process.env.SERVICE_ACCOUNT_EMAIL );


	googleSubscription.checkExpire(token, ( err, res_t ) => {
				if (err) {
					console.log("error : " + err);
					res.json({"error : " :  err});
				}else{
					console.log("token expire" + res_t);
					res.json({"expiryTimeMillis" : res_t });
				}
			});
	// OR 
	app.use("/subscription", googleSubscription.router())
	// http://www.example.com/subscription/expire/{token}	
	// result
	// {"expiryTimeMillis":1528337069881}
	```
## Tests

  `npm test`

## Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.	
2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.9

7 years ago

1.3.8

7 years ago

1.3.7

7 years ago

1.3.6

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago