camaraproject / DeviceLocation

Repository to describe, develop, document and test the DeviceLocation API family
Apache License 2.0
20 stars 33 forks source link

feat: add an example for creating a geofence based on a Circle-Area #165

Closed maxl2287 closed 4 months ago

maxl2287 commented 4 months ago

What type of PR is this?

Add one of the following kinds:

What this PR does / why we need it:

Adds a valid example for POST /subscriptions where the area-object is filled.

{
  "webhook": {
    "notificationUrl": "https://application-server.com",
    "notificationAuthToken": "c8974e592c2fa383d4a3960714"
  },
  "subscriptionDetail": {
    "device": {
      "phoneNumber": 4912345678912,
      "networkAccessIdentifier": "123456789@domain.com",
      "ipv4Address": {
        "publicAddress": "84.125.93.10",
        "publicPort": 59765
      },
      "ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
    },
    "area": {
      "areaType": "CIRCLE",
      "center": {
        "latitude": 50.735851,
        "longitude": 7.10066
      },
      "radius": 2000
    },
    "type": "org.camaraproject.geofencing.v0.area-entered"
  },
  "subscriptionExpireTime": "2024-03-22T05:40:58.469Z"
}

Which issue(s) this PR fixes:

Fixes #164

maxl2287 commented 4 months ago

@bigludo7 @jlurien I was unsure about the version, because it's more a fix then a feature, but I am using currently 0.2.0-wip. wdyt?

Best regards Max

maxl2287 commented 4 months ago

I have updated the description / header to be an enhancement.

bigludo7 commented 4 months ago

Thanks As we fix the example should we keep phoneNumber, ipv4, ipv6 and networkAccessIdentifier all valued? It could provide the (wrong) interpretation that all these must be valued.

For me only providing the phoneNumber for an example is fine.