API Endpoints

myday

The myday functions will return data for populating myday views. This includes the journal entries, locations, map data, and other information as indicated below.

'nexttime' and 'prevtime' contain a formatted timestamp in UTC (including microseconds) of the next available location and previous location that are outside the range specified in the myday call. .

Method Description
/me/myday return myday information for today for authenticated user
/me/myday?start=TIMESTAMP&duration=SECONDS return myday information for authenticated user from start and duration. If no duration is specified, 24hrs is the default
/USERID/myday return today's myday information for specified user
/USERID/myday?range=week return week information

Example1: GET /me/myday

GET http://api.hipgeo.com/me/myday?access_token=TOKENVALUE

Returns:
{
  "start":"2011-08-29 07:00:00",
  "duration":86400,
  "shareable":1,
  "journal":{
    "count":2,
    "data":[
      {
        "id":"j_37541",
        "from":{
          "id":"u_7777",
          "name":"john",
          "shareable":1,
          "pingable":1,
          "fullname":"John Smith",
          "photo":"http:\/\/img.hipgeo.com\/4c0fae4ffdb3c15ea72a5f0ee8fb58_b?3667"
        },
        "type":2,
        "when":"2011-08-29 19:21:52",
        "privacy":7,
        "shareable":1,
        "location":{
          "id":"l_492903",
          "shareable":1,
          "canmerge":1,
          "title":"Fullerton, CA",
          "duration":0,
          "duration_sec":0,
          "hidestats":1,
          "uid":"u_7777",
          "type":1,
          "coord":{
            "lat":33.5543,
            "lon":-117.449,
            "radius":0
          }
        },
        "commentcount":0,
        "mediacount":0
      },
      {
        "id":"j_37550",
        "from":{
          "id":"u_7777",
          "name":"john",
          "shareable":1,
          "pingable":1,
          "fullname":"John Smith",
          "photo":"http:\/\/img.hipgeo.com\/4c0faecffdb3c15ea72a5f0ee8fb58_b?3667"
        },
        "type":3,
        "when":"2011-08-29 19:21:52",
        "privacy":7,
        "shareable":1,
        "travel":{
          "id":"t_49432",
          "shareable":1,
          "canmerge":0,
          "uid":"u_7777",
          "beginname":"Diamond Bar, CA",
          "endname":"Fullerton, CA",
          "duration":476747,
          "duration_sec":476747,
          "distance":16571.36,
          "hidestats":1,
          "type":2
        },
        "commentcount":0,
        "mediacount":0
      }
    ]
  },
  "locations":{
    "count":1,
    "data":[
      {
        "id":"l_44334",
        "shareable":1,
        "canmerge":1,
        "title":"Fullerton, CA",
        "duration":0,
        "duration_sec":0,
        "hidestats":1,
        "uid":"u_7777",
        "type":1,
        "coord":{
          "lat":33.8843,
          "lon":-117.939,
          "radius":0
        }
      }
    ]
  },
  "mapdata":{
    "markers":[
      {
        "type":0,
        "label":"A",
        "id":"l_44334",
        "title":"Fullerton, CA",
        "desc":"0 mins, 0 secs",
        "time":"16 minutes ago",
        "points":[
          [
            33.8843,
            -117.939,
            1.314645712e+15
          ]
        ]
      }
    ],
    "lines":[
      {
        "type":0,
        "points":[
          [
            33.443369,
            -117.816588,
            1.314168965e+15
          ],
          [
            33.5543,
            -117.939,
            1.314645712e+15
          ],
          [
            33.5543,
            -117.939,
            1.314645712e+15
          ]
        ]
      }
    ],
    "circles":[
      
    ],
    "zoom":null,
    "center":null
  },
  "prevtime":"2011-08-24 06:56:05.35",
  "result":"success"
} 
Error Code Possible Errors
3
  1. Invalid date or time string [xxxx]
400
  1. Requires an ID
401
  1. Authentication failed
  2. Token expired
  3. 'me' requires authentication
404
  1. Bad ID
405
  1. Not User ID
  2. You cannot view this user's day

Example2: GET /me/myday&start=TIMESTAMP&duration=SECONDS

GET http://api.hipgeo.com/me/myday?start=2011-07-13%2008:00:00&duration=7200&access_token=TOKENVALUE

Returns:
{
  "start":"2011-07-13 08:00:00",
  "duration":"7200",
  "shareable":1,
  "journal":{
    "count":1,
    "data":[
      {
        "id":"j_267955",
        "from":{
          "id":"u_7777",
          "name":"john",
          "shareable":1,
          "pingable":1,
          "fullname":"John Smith",
          "photo":"http:\/\/img.hipgeo.com\/4c0faeccfdb3c15ea72a5f0ee8fb58_b?3667"
        },
        "type":2,
        "when":"2011-07-13 14:15:50",
        "privacy":7,
        "shareable":1,
        "location":{
          "id":"l_38955",
          "shareable":1,
          "canmerge":1,
          "name":"John's House",
          "title":"John's House, Brea, CA",
          "duration":38076,
          "duration_sec":38076,
          "hidestats":0,
          "uid":"u_7777",
          "type":1,
          "coord":{
            "lat":33.4434,
            "lon":-117.6628,
            "radius":0
          },
          "pid":"p_8806"
        },
        "commentcount":0,
        "mediacount":0
      }
    ]
  },
  "locations":{
    "count":1,
    "data":[
      {
        "id":"l_38955",
        "shareable":1,
        "canmerge":1,
        "name":"John's House",
        "title":"John's House, Brea CA",
        "duration":38076,
        "duration_sec":38076,
        "hidestats":0,
        "uid":"u_7777",
        "type":1,
        "coord":{
          "lat":33.44,
          "lon":-117.945783,
          "radius":0
        },
        "pid":"p_8806"
      }
    ]
  },
  "mapdata":{
    "markers":[
      {
        "type":0,
        "label":"A",
        "id":"l_38955",
        "title":"John's House",
        "desc":"Brea, CA for 10 hrs, 34 mins",
        "time":"8:41pm Tuesday July 12th",
        "points":[
          [
            33.4345,
            -117.84595,
            1.31056655e+15
          ]
        ]
      }
    ],
    "lines":[
      {
        "type":0,
        "points":[
          [
            33.4445,
            -117.84595,
            1.310528474e+15
          ]
        ]
      }
    ],
    "circles":[
      
    ],
    "zoom":null,
    "center":null
  },
  "nexttime":"2011-07-13 14:36:56.996",
  "prevtime":"2011-07-13 03:28:43.870",
  "result":"success"
} 
Error Code Possible Errors
3
  1. Invalid date or time string [xxxx]
400
  1. Requires an ID
401
  1. Authentication failed
  2. Token expired
  3. 'me' requires authentication
404
  1. Bad ID
405
  1. Not User ID
  2. You cannot view this user's day
HipGeo Icon