Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

6.3 #85

Merged
merged 25 commits into from
Aug 19, 2014
Merged

6.3 #85

merged 25 commits into from
Aug 19, 2014

Conversation

toddtreece
Copy link
Contributor

Adds:

  • New query string options that can be combined and used with any output format (including single field output)
    • Limit results to number: ?limit=10
    • Output every Nth record: ?sample=4
    • Start output at offset: ?offset=2
  • Latest record: /output/PUBLICKEY/latest in all formats
  • Return only output for one field: /output/PUBLICKEY/FIELDNAME
  • Return only latest value of field: /output/PUBLICKEY/FIELDNAME/latest
  • Atom 1.0 feed output
  • MySQL output
  • PostgreSQL output

Examples:

Here's the full data set for the test stream: http://phantmqtt.sparkfun.com/output/BDPQQyM6pvf73kaRE2Ppc6z2Mwg?page=1

Query String Additions

Single Field Output

New Formats

Latest record or field

toddtreece added a commit that referenced this pull request Aug 19, 2014
@toddtreece toddtreece merged commit ec19a6f into master Aug 19, 2014
@toddtreece toddtreece deleted the 6.3 branch August 19, 2014 01:50
@brennen
Copy link
Contributor

brennen commented Aug 19, 2014

lib/field_stream.js

Hehe.

@toddtreece toddtreece mentioned this pull request Aug 21, 2014
@liudr
Copy link

liudr commented Oct 29, 2014

This is great! Thanks for the hard work!

@liudr
Copy link

liudr commented Nov 4, 2014

I know this is a closed issue. I tested, the limit works as long as it is 20 or larger. If you go to 19 or less, the server times out.

@liudr
Copy link

liudr commented Nov 4, 2014

I was doing some test at night (11/03-11/04 2014). The sparkfun server wasn't responding every time I did json query on my web page. Sometimes it responds slowly after a few seconds and sometimes it responds quickly then other times there were no responses. I was sending the same commands by hand multiple times inside IE 11 (hate its cheesy F12 interface). Wondering if there were some server maintenance or maybe there are too much traffic.

@toddtreece
Copy link
Contributor Author

Yeah. I was working on the servers until late last night. Things should have stabilized a bit by ~11pm EST.

@liudr
Copy link

liudr commented Nov 4, 2014

Thanks! It's working now. I emptied my test stream thinking maybe the problems were caused by the fact that the stream was full. Well, I'll fill it up in a few days ;)
FYI, I was building google chart with selections of range of time to graph and density of data points to plot. It works nicely with the gte and lte.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants