PrePAN

Sign in to PrePAN

WebService::Dataworld PROPOSAL: A wrapper around the data.world APIs

Author
GeekRuthie@twitter
Date
URL
Status
In Review
Good

Synopsis

Description

data.world has JSON APIs for both query and maintenance of large public and non-public datasets. There are some fiddly bits to the API; first thing I noticed is that querying and maintenance happen at different URLs. Additionally, some of the returns are not yet consistent; sometimes you'll get a message and other data, sometimes just a message; there's no "truthy on success" code that would be useful to "try" blocks, etc. I propose a simple wrapper around the complexities, an API object that just takes care of those details for the user, validates inputs, and deals with returns in a way to make them more consistent.

Thoughts?

Comments

Consider renaming it. API is strongly discouraged in the namespace. Look at other similar modules to get an idea of how to properly name the module. I'd suggest Webservice::Dataworld or WWW::Dataworld, depending upon if the underlying access is a proper api, or if you're scraping the site. Here's the reference link to cpan module naming policy: https://pause.perl.org/pause/query?ACTION=pause_namingmodules#Avoid_API_Interface_and_the_like
I had seen that document, and had mulled that over. There are a *whole lot* of very similar constructs already in the API space, though, and to be honest, I somehow missed the Webservice:: space in my noodling around. Thanks for the suggestion; I have changed the proposed name.
the convention is WebService, not Webservice.
Now that's just mean! You typed it Webservice in your first comment, then it appears *both* ways in CPAN. Geez. But If that's the biggest nit there is to pick on this, I'll take it.
calm down, a typo doesn't indicate malice. and i did point you to the link that should have clarified the issue. also note that WebService appears in cpan modules almost 20x more often than Webservice.

Please sign up to post a review.