assaf / node-passbook

iOS Passbook for the Node hacker
MIT License
280 stars 73 forks source link

Adding locations Parameter to Pass is too static #6

Closed DoomyTheFroomy closed 10 years ago

DoomyTheFroomy commented 11 years ago

The locations Parameter is an Array so it would be better to use it with the add function. So dynamically locations can be added!

assaf commented 11 years ago

According to the spec, location is a top level field, not a structure field.

DoomyTheFroomy commented 11 years ago

That's right... so i have to change it, so that locations can be used with the add function without changing the structure...

tracy-e commented 11 years ago

If you only move "locations" from TOP_LEVEL to STRUCTURE_FIELDS, the pass.json like:

  "coupon" : {
    "locations" : [
    {
      "longitude" : -122.3748889,
      "latitude" : 37.6189722
    }
  ],
    "auxiliaryFields" : [
      {
        "key" : "expires",
        "label" : "EXPIRES",
        "value" : "2013-4-21"
      }
    ]
}

not added to the top level, but "To provide relevant locations, add the locations key at the top level of the pass."(PassKit_PG), so the locations may be invalid.