jimmoores / quandl4j

Java wrapper for Quandl REST API

Home Page:quandl4j.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SearchRequest using database_code

hkothari opened this issue · comments

According to the docs here: https://www.quandl.com/docs/api#dataset-search we can use the search endpoint to get all the datasets within a database by hitting something like datasets.csv?database_code=WIKI. I'd like to submit a pull request enabling this functionality, unfortunately with the current implementation, the Query parameter is required even though it's not required according to the docs. In order to enable the database only query we'd need the Query parameter to not be required.

I'm not sure if there's a nice way to enable this workflow with the exception of breaking backwards compatibility. What are your thoughts on doing that? I'm also happy to try something else if you have a better suggestion.

So the reason the current docs are different is that it's a different API
version being supported. I hit the v1 endpoints. We should move to v3
though (from what I can tell v2 was internal or something). My suggestion
to resolve this but retain compatibility is:

  • @deprecate the of(query) static factory.
  • Add a public no-arg constructor to the builder.
  • Add with() methods for query and database code to the builder.
  • Add appropriate optional handling of query and database code arguments to
    the request builder.
  • Make sure the request hits the v3 endpoint.
  • figure out what else needs updating and at least create issues.

If there's any of that you can put in a pull request, I'll happily review
it. If you do, it would be helpful if you could match the code style.

Have I missed anything?
Cheers,
Jim
On 1 Nov 2015 3:52 am, "hkothari" notifications@github.com wrote:

According to the docs here: https://www.quandl.com/docs/api#dataset-search
we can use the search endpoint to get all the datasets within a database by
hitting something like datasets.csv?database_code=WIKI. I'd like to submit
a pull request enabling this functionality, unfortunately with the current
implementation, the Query parameter is required even though it's not
required according to the docs. In order to enable the database only query
we'd need the Query parameter to not be required.

I'm not sure if there's a nice way to enable this workflow with the
exception of breaking backwards compatibility. What are your thoughts on
doing that? I'm also happy to try something else if you have a better
suggestion.


Reply to this email directly or view it on GitHub
#12.

First attempt at a PR here: #13

I've refactored the examples, javadocs and tutorial and added your github user to the contributors file. Let me know if your full name if you want that included.
Thanks again!
Jim

My full name is Hamel Ajay Kothari, I'll add it with my next PR whenever that comes around :)