On-trip planner (p:ontrip-planner)

http//profiles.goabout.com/ontrip-planner

The On-trip planner resource enables the client to create Trip in progress (p:trip-in-progress) resources.

This can be used to retrieve updates about the journey which the end-user is currently partaking in. Posting to On-trip planner (p:ontrip-planner) resource will provide the Client with a Trip in progress (p:trip-in-progress), which contains information about the trip that will be taken shortly. This means that the post to On-trip planner (p:ontrip-planner) should take place only shortly before the actual trip will be taken.

Example

$ curl -v -d'{"toHref":"https://api.goabout.com/location/address/bac9b24d"}' -H'Authorization: Bearer UArtDY9Bpo9Whga2mfd7nIK6vENxp2twtnH7RvPC6xj0jy6' -H'Content-Type: application/json' 'https://api.goabout.com/ontrip-planner'
[ SSL HANDSHAKE CUT OUT ]
> POST /ontrip-planner HTTP/1.1
> Host: api.goabout.com
> User-Agent: curl/7.32.0
> Accept: */*
> Authorization: Bearer UArtDY9Bpo9Whga2mfd7nIK6vENxp2twtnH7RvPC6xj0jy6
>
< HTTP/1.1 201 CREATED
< Server: nginx/1.4.4
< Location: /trip-in-progress/16
< Date: Fri, 20 Dec 2013 11:06:33 GMT
< Content-Type: application/json
< Content-Length: 476
< Connection: keep-alive
< Cache-Control: private, no-cache, no-storage
{
  "toHref" : "https://api.goabout.com/location/address/bac9b24d",
  "_links": {
    "self" : {
      "href" : "https://api.goabout.com/trip-in-progress/16"
    },
    "http://rels.goabout.com/infocards" : {
      "href" : "https://api.goabout.com/trip-in-progress/16/infocards"
    },
    "http://rels.goabout.com/trip-registration" : {
      "href" : "https://api.goabout.com/trip-registration/37"
    },
    "http://rels.goabout.com/floating-data" : {
      "href" : "https://api.goabout.com/trip-registration/37/floating-data"
    }
  }
}

Reference

POST

When posting to this resource, a new Trip in progress (p:trip-in-progress) will be created for the [UNDOC]`/relations/authenticated-user`. Not that any User MAY have one trip-in-progress only. This resource SHALL delete any existing trip-in-progress and return a new one.

The profile of resource returned is Trip in progress (p:trip-in-progress).

Properties

destiationHref:URI The href for the location that should be the destination. This can be any href retrieved by usage of the Geocoder (r:geocoder), the Reverse geocoder (r:gedeocoder) or a geo-uri.