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

Question about the allocation format #121

Closed
idancali opened this issue Apr 2, 2014 · 2 comments
Closed

Question about the allocation format #121

idancali opened this issue Apr 2, 2014 · 2 comments

Comments

@idancali
Copy link

idancali commented Apr 2, 2014

Is there's a discrepancy between your posted definition of the JSON format and the
simple example or am I missing something?

In the example, I'm making this request:

http://picky-simple-example.heroku.com/search/full?query=pinchn~&offset=0

And I get this back:

{"duration":0.00101,"total":1,"offset":0,"allocations":[["books",6.0,1,[["title","pinchn~","pynchon"]],[],["<div class='book'><p>\"The Self-Conscious Novel: Artifice in Fiction from Joyce to Pynchon\", by Stonehill, Brian</p><p>1988, University of Pennsylvania Press, 9780812280982</p><p>Fiction & Literature; Reference & Languages</p></div>"]]]}

The discrepancy is in the empty array after the search terms:

... [["title","pinchn~","pynchon"]],[], ....

Where did that come from? It doesn't match with your original description of the JSON format.

Once again, am I missing something?

Thanks,
--Dan.

@floere
Copy link
Owner

floere commented Apr 2, 2014

It's the array of ids, see the example on https://github.com/floere/picky/wiki/Results-format-and-structure#the-structure:

["books", 7.39, 1, [["title", "Pinchn~", "pynchon"], ["title", "Novel", "novel"]], [27]]

However, in the simple example, the ids are not provided (man, that example is old – I need to retire it). A better example is perhaps: http://search.cocoapods.org/api/v1/pods.picky.ids.json?query=author:eloy
(with strings as ids).

Cheers!

@idancali
Copy link
Author

idancali commented Apr 2, 2014

I see, I've looked at the CocoaPods api and that makes sense. Thanks.

BTW, I'm working on a Picky iOS kit. The initial version just made it as a cocoapod in the master repo.

PS. cool stuff on Picky overall, I'm planning to play around with the Ruby server itself when I get a chance

--Dan.

@idancali idancali closed this as completed Apr 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants