Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

newsuk/times-push-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Times Push Notifier

Send push notifications for exclusive articles on The Times' mobile apps via the command line.

How To Use

  1. install dependencies with npm install

  2. download a private key for the project that you want to notify:

    Select "Generate new private key" and download the json file. Rename it to serviceAccountKey.json and put it in the root of this project.

    DO NOT CHECK THIS PRIVATE KEY INTO ANY REPO OR YOU WILL BE FIRED.

  3. Send a notification with node index.js --title <str> --body <str> --article-url <url> --image-url [url]

Example

node index.js \
    --title "EXCLUSIVE: This is a notification" \
    --body "Here is some longer copy, usually a summary of the article" \
    --article-url https://www.thetimes.co.uk/article/58m-lottery-win-almost-in-tatters-0052w73vz \
    --image-url https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2Fefa6f8cc-9650-11e8-85e3-d844d3177259.jpg\?crop\=3499%2C1968%2C0%2C182\&resize\=2400

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •