Created
September 16, 2017 15:40
-
-
Save ypcode/375203333c57b43dc2e868793e5e09c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pnp from "pnp"; | |
pnp.sp.web.lists.getByTitle("testwebhook") | |
.subscriptions | |
.add("https://your-functions.azurewebsites.net/api/sample-webhook", "2017-12-01T00:00:00+00:00") | |
.then(r => console.log("Webhook added")) | |
.catch(r => console.log(r)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment