Coder Social home page Coder Social logo

p2k2's Introduction

P2000 v2

This is a improved and user-friendly version of the P2000 notifications.

Development

To install all dependencies run:

yarn install

To start the development server run:

yarn dev

Rough notes about the API

The Api is at https://webservice-v3.112-nederland.nl and accepts POST requests and returns JSON.

Headers

POST /api/PushMessageCache/GetP2000Messages HTTP/2
Host: webservice-v3.112-nederland.nl
Content-Type: application/json; charset=utf-8
User-Agent: okhttp/3.10.0

The Content-Type should be application/json but doesn't need the charset.

The User-Agent can be faked with the same structure, like: z0mg/0.1.

Payload

{
  "ccs": [],
  "dd": "OS: 5.10.101-genymotion+-ab74, SDK: 31, Device: vbox86p Google Pixel 3 XL Genymobile",
  "l": false,
  "ls": [
    {
      "ln": 4.9,
      "lt": 52.378,
      "mp": 3,
      "r2": true,
      "ra": true,
      "rb": true,
      "rn": false,
      "ro": true,
      "rp": true,
      "st": 20
    }
  ],
  "rid": "dyrC8w...:...AqDEfp"
}

ccs

Array with CAP codes to filter on.

dd

A string containing device information, like OS version, SDK version and Device name / version etc.

l

A Boolean value indicating SubscribedToLifeLiners, trauma helicopters.

ls

An array with objects of the DeviceLocationSettings type.

DeviceLocationSettings type:

  • ln: (integer) getLongitude
  • lt: (integer) getLatitude
  • mp: (integer) getMinPrio
  • r2: (boolean) createBasicDeviceLocationRegistration => true : createBasicNewsOnlyDeviceLocationRegistration -> false
  • ra: (boolean) getSubscribedToAmbulance
  • rb: (boolean) getSubscribedToBrandweer
  • rn: (boolean) isNewsTabEnabled
  • ro: (boolean) getSubscribedToAnders
  • rp: (boolean) getSubscribedToPolitie
  • st: (integer) radius in kilometers (getActualLocationStraal)

rid

A string with a (FCM) token (https://firebase.google.com/docs/cloud-messaging/manage-tokens), this is a required field but can contain any string.

public class DeviceRegistrationSentRecord {
    public String hash;
    public List<LocationData> locations;
    public Long timestamp;
}

Attribution

Icons by SVG Repo.

p2k2's People

Contributors

ex-it avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.