idigbio-api-hackathon / HackathonCentral

Command center for iDigBio API Hackathon participants to share ideas, coordinate teams, develop projects and access all logistics information.
6 stars 1 forks source link

Ruby client for API #17

Open dimus opened 9 years ago

dimus commented 9 years ago

I will try to make it happen before the hackathon

sckott commented 9 years ago

:+1:

Biserkov commented 9 years ago

Awesome! Let's create a repo

gete76 commented 9 years ago

Have either you made any headway on this ? I've started to writing a client too

dimus commented 9 years ago

I did not start working on it yet, my plan was to procrastinate until May 15 :flushed:

Biserkov commented 9 years ago

Hi, I'm on a workshop in Lithuania until the 15th.

My Ruby is not great, but I can help. Perhaps discuss the structure? Or are you doing a port of one of the existing clients?

gete76 commented 9 years ago

It will probably take the form of something similar to the Python client. Though I don't mind discussing structure as you guys are more likely users of the client. Any thoughts?

dimus commented 9 years ago

I would just steal heavily from Python client

gete76 commented 9 years ago

a start to the client https://github.com/idigbio-api-hackathon/idigbio-ruby-client

dimus commented 9 years ago

@gete76 I am trying to gemify the client this weekend -- https://github.com/GlobalNamesArchitecture/idigbio-ruby-client

gete76 commented 9 years ago

Ok, though its not complete and we would probably want the listed gem to point to the idigbio organization for the client

gete76 commented 9 years ago

@dimus nice work!

dimus commented 9 years ago

While doing refactoring I found that gem moved away so much that I decided to rewrite it from scratch https://github.com/GlobalNamesArchitecture/idigbio_client

So far it is still pretty much the same functionlaity that Greg put together, but broken into 4 distinct groups -- search, show, inpect and stats. Now I am figuring out what happened with code climate, it did have glitches last few months, and it suddently changed rating from 4 to 1 ;D

dimus commented 9 years ago

@gete76, I can move gem to iDigBio, let me know what do you guys want, I also do have a few questions if you can have a quick Google Hangout or something

gete76 commented 9 years ago

yeah, I can Hangout, whats your gmail address?

On Tue, May 19, 2015 at 1:42 PM, Dmitry Mozzherin notifications@github.com wrote:

@gete76 https://github.com/gete76, I can move gem to iDigBio, let me know what do you guys want, I also do have a few questions if you can have a quick Google Hangout or something

— Reply to this email directly or view it on GitHub https://github.com/idigbio-api-hackathon/HackathonCentral/issues/17#issuecomment-103611230 .

gete76 commented 9 years ago

mine is greg.traub at gmail

gete76 commented 9 years ago

@dimus, API now supports view/[UUID] endpoint for object discovery with top level key "type"

dimus commented 9 years ago

I announced first release of the iDigBio client Ruby gem: https://globalnamesarchitecture.github.io/idigbio/api/2015/05/20/idigbio-client.html

gete76 commented 9 years ago

Great! Looks like its already gotten some downloads.
Dan added it to our wiki too https://www.idigbio.org/wiki/index.php/IDigBio_API#Client_Libraries

gete76 commented 9 years ago

@dimus I noticed your explanation for Offset param is incorrect

'# setting offset: will return only 5 records, assuming 10 were done before' params = { rq: { genus: "acer" }, limit: 15, offset: 10 } IdigbioClient.search(params: params)

if there are more then 25 total records matching the 'rq' param then it would return 15. Offset is just where to start counting from. So in this case it would return records 11-25 in the result set that matches 'rq'

dimus commented 9 years ago

This explanation describes current behavior, let me change the behavior then

dimus commented 9 years ago

I published v0.1.2 which does:

# setting offset: will start count for 15 records from 11th result
params = { rq: { genus: "acer" }, limit: 15, offset: 10 }
IdigbioClient.search(params: params)