-1

I am using the following query: https://api.github.com/search/repositories?q=mysql&created:%3C2009-04-11&order=asc

and see the same results as: https://api.github.com/search/repositories?q=mysql&created:%3E=2013-04-11&order=asc

Looks the created is not taking into effect. can you please help me if I am missing anything in the query?

user826407
  • 159
  • 1
  • 8
  • 1
    I think there was a similar question here -https://stackoverflow.com/questions/45990626/github-api-call-filter-by-committer-date/45990853#45990853 . i.e. Try changing `&` to `+` and `=` to `:`. – Poonacha Sep 14 '17 at 08:55
  • If you have problems for my answer yet, feel free to tell me. I would like to study to solve your problems. – Tanaike Sep 26 '17 at 04:01
  • some how it is stil not working. – user826407 Sep 26 '17 at 13:39
  • I tried -curl https://api.github.com/search/repositories?q=python+created:>2009-04-11&;page=1 -otest. but its giving a Error. when I try the same command on browser it works. I get the error-'page' is not recognized as an internal or external command, operable program or batch file. – user826407 Sep 26 '17 at 13:41
  • @user826407 I'm sorry for the inconvenience. I updated my answer. Please confirm it. – Tanaike Sep 26 '17 at 23:25
  • @user826407 Did you try my updated answer? If my updated answer didn't work at your environment, feel free to tell me. I would like to think of it. – Tanaike Sep 27 '17 at 23:13

1 Answers1

1

At document of REST API v3, parameters are added using +. So how about the following modification?

From :

https://api.github.com/search/repositories?q=mysql&created:<2009-04-11&order=asc
https://api.github.com/search/repositories?q=mysql&created:>=2013-04-11&order=asc

To :

https://api.github.com/search/repositories?q=mysql+created:<2009-04-11&order=asc
https://api.github.com/search/repositories?q=mysql+created:>=2013-04-11&order=asc

If I misunderstand your question, I'm sorry.

Edit :

When you want to retrieve the data using curl, please use as follows. In this case, please enclose the URL using double quotations. The URL in this sample is from your comments.

curl "https://api.github.com/search/repositories?q=python+created:%3E2009-04-11&page=1"

or

curl "https://api.github.com/search/repositories?q=python+created:>2009-04-11&page=1"
Tanaike
  • 181,128
  • 11
  • 97
  • 165