amp-url
1.0.2 • Public • Published node-amp-url
Accelerated Mobile Pages (AMP) URL API node.js library.
It is necessary to enable API on Google Cloud Platform and obtain API key.
Install
npm install --save amp-url
Use
const AmpUrl = require('amp-url');
const ampUrl = new AmpUrl(GOOGLE_API_KEY);
ampUrl.batchGet('https://example.com/01.html').then((cdnAmpUrl) => {
});
Method
batchGet(urls)
- urls
array|string
- Target URL.
const AmpUrl = require('amp-url');
const ampUrl = new AmpUrl(GOOGLE_API_KEY);
ampUrl.batchGet([
'https://example.com/01.html',
'https://example.com/02.html',
'https://example.com/03.html'
]).then((cdnAmpUrl) => {
});
License
MIT License.
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 1.0.2
2
Version History
Package Sidebar
Install
Weekly Downloads