How are optional parameters passed in?

43 views
Skip to first unread message

Scott Chamberlain

unread,
May 28, 2013, 6:27:50 PM5/28/13
to gauge...@googlegroups.com
Hello, 

I am trying to use your API, but am having a bit of trouble. 

For GET requests, are the optional parameters appended to the URL as in http://stuff?date=xxxx or passed in with the -d flag?  Does the answer differ for POST requests? At least in the example, parameters were passed with the -d flag.

Also, the docs don't really say what the parameter date does. Does specifying a date mean that only data after that data are returned?

Thanks, Scott

John Nunemaker

unread,
May 28, 2013, 6:37:59 PM5/28/13
to gauge...@googlegroups.com
For get requests you can just add them in the query string, correct. The date parameter means return results for that date only.

--
You received this message because you are subscribed to the Google Groups "Gauges API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gauges-api+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Scott Chamberlain

unread,
May 28, 2013, 8:30:51 PM5/28/13
to gauge...@googlegroups.com
Thanks! But the following two calls with different dates return the same thing for me. Am I formatting these calls incorrectly?

John Nunemaker

unread,
May 29, 2013, 9:53:02 AM5/29/13
to gauge...@googlegroups.com
Can you provide the responses? Those look good. I am definitely not getting the exact same results for my gauges. 

Are you using curl directly or a library in some language?

Scott Chamberlain

unread,
May 29, 2013, 3:48:49 PM5/29/13
to gauge...@googlegroups.com
Thanks for your help!

I am building an R library to wrap your API, so am calling it from within R (here: https://github.com/ropensci/rgauges).

However, those curl calls were done in my terminal and I inspected data and got the same results for both calls. I tried it with a few different accounts and gauges, and same results. I'll try to figure it out - probably something on my end. 

-S
Reply all
Reply to author
Forward
0 new messages