
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
cnn-antools-push-api
Advanced tools
Node wrapper for interacting with the Apple News Push API, a.k.a, pApi
A package designed to wrap Apple News's Push API
Read these "requirements" as "only tested with".
$ npm install --save --save-exact cnn-antools-push-api
The --save-exact
is up to you. We recommend saving exact versions.
I will be requeired that the calling application have the apple ruby papi client installed
This is intended to be used as a dependency in a larger application. Refer to
the the below example and the real example.js, that you
can run with node example/example.js
.
'use strict';
const PushApi = require('cnn-antools-push-api'),
pushApi = new PushApi('<channelId>', '<apiKeyId>', '<apiKeySecret>', 'https://news-api.apple.com', '</path/to/papi/>'),
articleData = {
articleId: 'articleId of existing article or undefined',
revision: 'revision id is this is update or undefined',
articleStatus: '<add or update>',
savePath: '<local directory Path for folder that holds the article.json>',
sectionIds: '<sectionId>,<sectionId>,...',
isCandidateToBeFeatured: false,
isDevelopingStory: false
};
pushApi.sendArticle(articleData)
.then((stdout) => {
console.log(`This is the published article ${stdout}`);
})
.catch((err) => {
console.log(`some Problem happened: ${err}`);
});
pushApi.deleteArticle('<articleId').then((result) => {
console.log(`Article deleted: ${result}`);
}).catch((result) => {
console.error(`DELETE article error: ${JSON.stringify(result.error)}`);
console.error(`DELETE article body: ${result.body}`);
});
});
You can generate and view the docs locally with the commands below. The open
command will only work on MacOS.
$ npm run generate-docs
$ open docs/index.html
generate-authors
- Generates AUTHORS.md.generate-changelog
- Generates output to put in CHANGELOG.md.generate-coverage
- Generates a code coverage report in /coverage
.generate-docs
- Generates ESDoc documentation in /docs
.test
- Runs all tests.update-apply
- Updates package.json with dependency updates.update-check
- Outputs if any dependency updates are needed.DEBUG=cnn-antools-push-api:*
- Set to enable visible
debug logging to console.Always develop on the node version specified in the .nvmrc file.
If nvm is used typing nvm install
in the terminal will insure the correct version is used.
Contributors should be familiar with the Contributors Guide
Collaborators should be familiar with the Collaborator Guide
The current Project Owner (PO) of this project is Alex Sover (@dsover).
See LICENSE.md for details.
♥︎ Make good art - Neil Gaiman
FAQs
Node wrapper for interacting with the Apple News Push API, a.k.a, pApi
The npm package cnn-antools-push-api receives a total of 4 weekly downloads. As such, cnn-antools-push-api popularity was classified as not popular.
We found that cnn-antools-push-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.