using the query = list in the GET() function to acquire API

The following code works for me

My_Data <- GET(url = ",CTY_NAME,ALL_VAL_MO&key=my_autho_key&YEAR=2017&MONTH=04")

I was wondering if there is anyway to acquire the above data by using the query = list in the GET() function. Any help or guidance would be appreciated.

Thanks, M

HI @mustafghan,
You can do this:

GET("", path = "search", query = list(q = "green eggs and ham"))

So, I assume that you could do something like this:

      query = list(key = "my_autho_key",
                   YEAR = "2017",
                   MONTH = "04"))

But, of course, I can't test it.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

I had tried something similar which didn't work. But thanks.