Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
GET /loans/search - partial result-set?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
thepip3r  
View profile  
 More options Aug 15 2012, 1:08 pm
From: thepip3r <cameron.wils...@gmail.com>
Date: Wed, 15 Aug 2012 10:08:04 -0700 (PDT)
Local: Wed, Aug 15 2012 1:08 pm
Subject: GET /loans/search - partial result-set?

is GET /loans/search supposed to only return a partial result-set?  if not,
there is a bug where it does not return information like occupation,
loan_count, invite_count, etc.  if it is designed to only return this
partial data, is there a way to request a change that might support the use
of a parameter to return the entire data-set?  This change would make
querying lender data so much more efficiently.  Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Butt  
View profile  
 More options Aug 15 2012, 2:19 pm
From: Martin Butt <mar...@kiva.org>
Date: Wed, 15 Aug 2012 11:19:30 -0700
Local: Wed, Aug 15 2012 2:19 pm
Subject: Re: GET /loans/search - partial result-set?

Hi Cameron,

http://api.kivaws.org/v1/loans/search.json is paginated, so returns one
page at a time. There have recently been discussions about adding a
?page=all option to the loans page, but that is still in its infancy. You
can also use the snapshots for a relatively recent data dump.

Regards,
    Martin

On 15 August 2012 10:08, thepip3r <cameron.wils...@gmail.com> wrote:

--

*Martin Butt | Software Engineer
*

*Kiva <http://www.kiva.org/> **– Loans that Change Lives
Join us on Twitter <http://twitter.com/#%21/kiva>,
**Facebook<http://www.facebook.com/kiva>
** and LinkedIn <http://www.linkedin.com/groups?home=&gid=2606>!*


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
thepip3r  
View profile  
 More options Aug 16 2012, 8:03 am
From: thepip3r <cameron.wils...@gmail.com>
Date: Thu, 16 Aug 2012 05:03:34 -0700 (PDT)
Local: Thurs, Aug 16 2012 8:03 am
Subject: Re: GET /loans/search - partial result-set?

Hi Martin,

To start, this is supposed to cover the 'lender' portion of the api, not
the loans.  And if by paginated, you mean that the results are returned in
pages or chunks, that's fine.  I really have no problem with that at all.  
My problem with search.json is that the all of the fields are NOT
returned.  As an example, if I run this:

http://api.kivaws.org/v1/lenders/thewilsons.json, I get this

{"lenders":[{"lender_id":"thewilsons","name":"Cameron &
Michelle","image":{"id":281368,"template_id":1},"whereabouts":"Spokane
WA","country_code":"US","uid":"thewilsons","member_since":"2009-02-17T07:01 :15Z","personal_url":"
www.argumentforatheism.org","occupation":"Enterprise IT Engineer &
Insurance Underwriter","loan_because":"the concept behind this site is
fantastic -- we love being able to directly make a positive impact on other
peoples' lives in ways not previously
possible.","occupational_info":"Cameron works with large computer
systems.\r\n\r\nMichelle researches and provides commercial insurance to
businesses.\r\n\r\n\r\n","loan_count":231,"invitee_count":2,"inviter_id":0} ]}

If I run, http://api.kivaws.org/v1/lenders/search.json, I only get back the
lender_id, name, whereabouts, country_code, and uid -- only a fraction of
the fields.  As it stands, the only way I can see to get all of the lender
data (besides using the old data dumps (back in April)), is to query
search.json to get all the users and then run the same queries over again
for groups of users to get all of their fields using the
http://api.kivaws.org/v1/lenders/lender1,lender2,lender3,....json method.  

Is anyone familiar with a more efficient way to acquire this information?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Ericksen  
View profile  
 More options Aug 16 2012, 2:00 pm
From: Paul Ericksen <liquidmon...@gmail.com>
Date: Thu, 16 Aug 2012 11:00:54 -0700
Local: Thurs, Aug 16 2012 2:00 pm
Subject: Re: GET /loans/search - partial result-set?

There is a summary view and a detailed view to various entities, loans,
lenders, etc. I agree that it would be nice to be able to specify detail
levels... KivaLens first pages through every fundraising loan and if
there's a new one it has to request the detail page separately to get the
repayment info and store it in my DB. Being able to just get a list of IDs
as the most basic result all the way up to full details included in a
result would be quite handy.

Martin misunderstood what was meant by "partial results."

Paul

--
Sent from my computer. No excuses for misspellings or missing words.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
thepip3r  
View profile   Translate to Translated (View Original)
 More options Aug 16 2012, 3:22 pm
From: thepip3r <cameron.wils...@gmail.com>
Date: Thu, 16 Aug 2012 12:22:02 -0700 (PDT)
Local: Thurs, Aug 16 2012 3:22 pm
Subject: Re: GET /loans/search - partial result-set?

 Thanks for the help Martin and Paul.  I'm sorry about incorrectly posting
the title to indicate this was for loans.  And yes, the reason for my
question is that the script I wrote to sync my DB with Kivas is to use
search.json to essentially get back a page of lenders, grab their lender
ids, and construct a new URL with each lender_id comma-separated to requery
Kiva's DB for the full dataset.  This seems rather inefficient to me but I
don't see another way around the problem and from what you're saying, it
sounds like there isn't an answer to the problem as the api currently
stands.

Thanks all,

Cameron


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Ericksen  
View profile   Translate to Translated (View Original)
 More options Aug 16 2012, 3:23 pm
From: Paul Ericksen <liquidmon...@gmail.com>
Date: Thu, 16 Aug 2012 12:23:45 -0700
Local: Thurs, Aug 16 2012 3:23 pm
Subject: Re: GET /loans/search - partial result-set?

That's correct, that's what you'll have to do to sync.

Paul

On Thu, Aug 16, 2012 at 12:22 PM, thepip3r <cameron.wils...@gmail.com>wrote:

--
Sent from my computer. No excuses for misspellings or missing words.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »