3.2.29 • Published 5 years ago

ramano-pkg v3.2.29

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Pushwoosh Web Push Notification SDK
=========================

GitHub release npm platforms

DownloadGuideSample

Integration

  • Download Pushwoosh Web Push SDK and unzip it. You should have the following files: manifest.json, pushwoosh-service-worker.js

  • Place all these files to top-level root of your website directory.

  • Open manifest.json and make the following changes:

    • Change name and short_name to the name of your website.
    • Change gcm_sender_id to your Sender ID. Please keep in mind that Sender ID is usually a 12-digit number, and it can't contain any letters.
  • Include manifest.json in <head>

<link rel="manifest" href="/manifest.json">

Installation

via npm

npm install web-push-notifications --save

via html

<script type="text/javascript" src="//cdn.pushwoosh.com/webpush/v3/pushwoosh-web-notifications.js" async></script>

Usage

import {Pushwoosh} from 'web-push-notifications';
const pwInstance = new Pushwoosh();
pwInstance.push(['init', {
    logLevel: 'info', // possible values: error, info, debug
    applicationCode: 'XXXXX-XXXXX', // you application code from Pushwoosh Control Panel
    safariWebsitePushID: 'web.com.example.domain', //  unique reverse-domain string, obtained in you Apple Developer Portal. Only needed if you send push notifications to Safari browser
    defaultNotificationTitle: 'Pushwoosh', // sets a default title for push notifications
    defaultNotificationImage: 'https://yoursite.com/img/logo-medium.png', // URL to custom custom notification image
    autoSubscribe: false, // or true. If true, prompts a user to subscribe for pushes upon SDK initialization
    subscribeWidget: {
      enabled: true
    },
    userId: 'user_id', // optional, set custom user ID
    tags: {
        'Name': 'John Smith'   	// optional, set custom Tags
    }
}]);

pwInstance.push(function(api) {
  console.log('Pushwoosh ready');
});
Chrome GuideFirefox GuideSafari GuideHTTP integration GuideSubscription Button Guide
3.2.29

5 years ago

3.2.28

5 years ago

3.2.27

5 years ago

3.2.26

5 years ago

3.2.25

5 years ago

3.2.24

5 years ago

3.2.24-beta

5 years ago

3.2.23-beta

5 years ago

3.2.22-beta

5 years ago

3.2.22

5 years ago

3.2.21

5 years ago

3.2.20

5 years ago

3.2.19

5 years ago

0.0.34

6 years ago

0.0.33

6 years ago

0.0.32

6 years ago

0.0.31

6 years ago

0.0.30

6 years ago

0.0.29

6 years ago

0.0.28

6 years ago

0.0.27

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.19

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago