Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby client for API #17

Open
dimus opened this issue Apr 28, 2015 · 21 comments
Open

Ruby client for API #17

dimus opened this issue Apr 28, 2015 · 21 comments

Comments

@dimus
Copy link

dimus commented Apr 28, 2015

I will try to make it happen before the hackathon

@sckott
Copy link
Member

sckott commented Apr 28, 2015

👍

@sckott sckott mentioned this issue Apr 28, 2015
@Biserkov
Copy link

Awesome! Let's create a repo

@gete76
Copy link

gete76 commented May 6, 2015

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

@dimus
Copy link
Author

dimus commented May 6, 2015

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

@Biserkov
Copy link

Biserkov commented May 7, 2015

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
Copy link

gete76 commented May 7, 2015

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
Copy link
Author

dimus commented May 7, 2015

I would just steal heavily from Python client

@gete76
Copy link

gete76 commented May 12, 2015

@dimus
Copy link
Author

dimus commented May 16, 2015

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

@gete76
Copy link

gete76 commented May 16, 2015

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

@gete76
Copy link

gete76 commented May 18, 2015

@dimus nice work!

@dimus
Copy link
Author

dimus commented May 18, 2015

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
Copy link
Author

dimus commented May 19, 2015

@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
Copy link

gete76 commented May 19, 2015

yeah, I can Hangout, whats your gmail address?

On Tue, May 19, 2015 at 1:42 PM, Dmitry Mozzherin [email protected]
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
#17 (comment)
.

@gete76
Copy link

gete76 commented May 19, 2015

mine is greg.traub at gmail

@gete76
Copy link

gete76 commented May 19, 2015

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

@dimus
Copy link
Author

dimus commented May 20, 2015

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

@gete76
Copy link

gete76 commented May 20, 2015

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
Copy link

gete76 commented May 21, 2015

@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
Copy link
Author

dimus commented May 21, 2015

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

@dimus
Copy link
Author

dimus commented May 21, 2015

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants