Protocols/WebAPI/Reference/Methods/Location

From NINA Wiki
Jump to navigation Jump to search
WebAPI Protocol
Basic
Introduction
Clients
Whimsicals
Host Interaction
Flow
Authentication
Client
WebApp
Other Services
Foodgroups

This page is about WebAPI location methods, in a series for the WebAPI reference manual.

googleEarth.kml

A Google Earth Network Link that contains all different items supported

URL: GET http://api.oscar.nina.bz/location/googleEarth.kml

Common Status Codes

Status Code Description
200 Success
460 Missing required parameter
462 Parameter error

getRankedUsersLocations.kml

A Google Earth Network Link that displays the locations of AIM Fight ranked users.

URL: GET http://api.oscar.nina.bz/location/getRankedUsers.kml

Common Status Codes

Status Code Description
200 Success
460 Missing required parameter
462 Parameter error

getRankedUsersLocations

Return the locations of AIM Fight ranked users. The format parameter f=kml is also supported for Google Earth output

URL: GET http://api.oscar.nina.bz/location/getRankedUsers

Input Parameters

Type Field Description
Format f [Required] The format of the data returned
String c JSONP callback
String r Request id
String k [Required] the AIM Web Key from http://dev.nina.bz/aim - use the same key for all calls
Integer maxLocations Max number of locations returned, locations are sorted by number of users
String boundingBox [bboxWest],[bboxSouth],[bboxEast],[bboxNorth] - Return only items inside the bounding box

Output Fields

Type Field Description
Array of RankedUsersLocation locations Ranked Users Locations

Common Status Codes

Status Code Description
200 Success
460 Missing required parameter
462 Parameter error

Sample JSON Output

{"response":{
    "statusCode":200,
    "statusText":"Ok",
    "requestId":"123",
    "data":{
      "locations":[
      {
        "name":"washington, dc",
        "count":100,
        "lat":38.910,
        "lon":-77.018
      }
      ]
    }
  }
}

Sample XML Output

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <statusCode>200</statusCode>
  <statusText>Ok</statusText>
  <requestId>123</requestId>
  <data>
    <locations>
    <location>
      <name>washington, dc</name>
      <count>100</count>
      <lat>38.910</lat>
      <lon>-77.018</lon>
    </location>
    </locations>
  </data>
</response>

getIMConversationsLocations.kml

A Google Earth Network Link that displays IM conversations initiated in the last minute. The conversations are aged out over time.

URL: GET http://api.oscar.nina.bz/location/getIMConversations.kml

Common Status Codes

Status Code Description
200 Success
460 Missing required parameter
462 Parameter error

getIMConversationsLocations

Return the locations for recently intiated IM conversations. The conversations are aged out over time.

URL: GET http://api.oscar.nina.bz/location/getIMConversations

Input Parameters

Type Field Description
Format f [Required] The format of the data returned
String c JSONP callback
String r Request id
String k [Required] the AIM Web Key from http://dev.nina.bz/aim - use the same key for all calls
Integer maxLocations Max number of locations returned, locations are sorted by age and number of users
String boundingBox [bboxWest],[bboxSouth],[bboxEast],[bboxNorth] - Return only items where one of the two points are inside the bounding box

Output Fields

Type Field Description
Array of IMConversationLocation locations IM Conversation Locations

Common Status Codes

Status Code Description
200 Success
460 Missing required parameter
462 Parameter error

Sample JSON Output

{"response":{
    "statusCode":200,
    "statusText":"Ok",
    "requestId":"123",
    "data":{
      "locations":[
      {
        "name":"washington, dc - los angeles, ca",
        "count":10,
        "age":0,
        "lat1":38.910,
        "lon1":-77.018,
        "lat2":33.973,
        "lon2":-118.249
      }
      ]
    }
  }
}

Sample XML Output

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <statusCode>200</statusCode>
  <statusText>Ok</statusText>
  <requestId>123</requestId>
  <data>
    <locations>
    <location>
      <name>washington, dc - los angeles, ca</name>
      <count>10</count>
      <age>0</age>
      <lat1>38.910</lat1>

      <lon1>-77.018</lon1>
      <lat2>33.973</lat2>
      <lon2>-118.249</lon2>
    </location>
    </locations>
  </data>
</response>