-
Notifications
You must be signed in to change notification settings - Fork 2
API Details
mjy edited this page Apr 27, 2012
·
27 revisions
The plugin is intended to work with any application, client or server side, that can respond to an request using the following variables.
Prefix variables with "&", postfix with "=", see examples.
Variables prefaced with ?? are under discussion. [???] Indicates that some controlled vocabulary of options needs to be determined.
?? on_click_action - [???] - have the API return the name of a javascript method to call on click of a cell value
?? radar - [true/false] - response should return only a 0/1 based presence/absence representation of the data
row_labels - [(true)/false] - return row labels for window requested, true when not provided
column_labels - [(true)/false] - return column labels for window request, true when not provided
x1 - [positive integer] - row/upper left co-ordinate
y1 - [positive integer] - column/upper left co-ordinate
x2 - [positive integer] - row range/bottom right co-ordinate
y2 - [positive integer] - column range/bottom left co-ordinate
For each request one of the following window defining patterns must be met:
x1 -> return all cells in this row
x1,x2 -> return the rows in range x1-x2 (inclusive)
y1 -> return all cells in this column
y1,y2 -> return the columns in range y1-y2
x1,y1 -> return the cell at x1,y1
x1,y1,x2,y2 -> return the cells bound by (x1,y1), (x2,y2)
?? layer -> [integer] the layer to which the request should be rendered, is repeated
in response (might not be needed)
?? metadata_type -> [???] a list of
All responses are in JSON. ** Examples **
**http://foo.org/path/to/api_action/&x1=1 **
?? this needs work, the basic response should be an [x][y] Array of Arrays with the value being a hash
{ "cells":
[
1:
[0:{"values":[value1, value2...value n]}],
[1:{...}],
]
}