[libRETS-users] LibRets GetObjctRequest
Keith T. Garner
kgarner at crt.realtors.org
Thu Feb 22 14:13:10 CST 2007
Vincent Blain wrote:
> I'm trying to get just one image to come back when I try the link using
> a browser it works perfect,
Follow you so far...
> I use the same property and I get all images
> back for the specified MLS.
I'm not sure what you mean by that. There is no way in RETS to get every
photo in the MLS. There is a way to get every photo for the MLS for a
specific property though. I'm going to assume you mean that.
> Why would this not work
It comes down to, you are using AddAllObject wrong. You're passing the line
from a URL, but in this case you're dealing with an API, not a web browser.
> Dim objRequest As librets.GetObjectRequest
> objRequest = New GetObjectRequest("PROPERTY", "Photo")
> objRequest.AddAllObjects("1234567:0:1&Location=1")
To retrieve all objects for a property, you probably want something like:
Dim objRequest As librets.GetObjectRequest
objRequest.AddAllObjects("1234567")
objRequest.SetLocation(true)
What you have above is only asking for images 0 and 1 (which could be the same
image, depending on the RETS server.) That code would be something like:
Dim objRequest As librets.GetObjectRequest
objRequest.AddObject("1234567", 0)
objRequest.AddObject("1234567", 1)
objRequest.SetLocation(true)
Keith
--
Keith T. Garner - Managing Director - Center for REALTOR® Technology
kgarner at realtors.org - 312-329-3294 - http://blog.realtors.org/crt
More information about the libRETS-users
mailing list