WebNumbr API
Simply change the url you use to access your numbr and you can do neat things.
- All commands are seperated by .
- All parameters are wrapped by ()
- You can read the plugin sources
- Order of operations (all selectors, "do SQL", all operations, all formats, "do output")
Operations: These are evaluated in order and are chained together.
name |
params |
doc |
example |
average |
points=24 |
Smooths the numbers by summing adjacent points. Useful after a derivative
|
webnumbrs.derivative.average(6)
|
count |
|
Simply counts the number of data points
|
webnumbrs.all.count.text
|
debug |
|
Turns on debug information. Changes return structure to {"debug":{},"data":[]}
|
webnumbrs.debug.print_r
|
derivative |
numtimes=1 |
Performs the discrete derivative on the data. Good for seeing change in the data
|
webnumbrs.all.derivative.graph
|
join |
|
Takes current data and creates array(name => data, param1_name = param1_data, ...)
|
.join(dji-nyse.all,nasdaq.all,yhoo.all).graph
|
max |
num=91 |
Only return values under (and including) this amount. (Use this instead of below() when you already did some processing on the data, like a derivative).
|
webnumbrs.max(200)
|
min |
num=-5 |
Only return values over (and including) this amount. (Use this instead of above() when you already did some processing on the data, like a derivative).
|
webnumbrs.min(900)
|
normalize |
max=10 |
Normalizes the values from 0 to 1.
|
webnumbrs.derivative.normalize.min(0.05)
|
numbr |
|
Shows all the numbr information.Changes return structure to {"numbr":{},"data":[]}
|
webnumbrs.numbr.print_r
|
remote |
url=http://webnumbr.com/numbrPlugins/operation/remote/remote_example.txt |
Remote plugins. 3 inputs are passed in "c, data, params". Expects string for "data" or 2 outputs in json "c, data". Allowed params are url (the remote endpoint), and url_encoded (a percent encoded url if needed, which takes precedence). {"data":3.14159,"c":{"key":"value"}}
|
webnumbrs.remote(http://webnumbr.com/numbrPlugins/operation/remote/remote_example.txt)
|
sum |
numtimes=1 |
Sums up the numbers.
|
slashdot-poll-votes.sum
|