Message from discussion
V1 API - CustomSearch controls mostly work but Image Search.SetRestrictions fail - what am I missing? (Code linked below)
Received: by 10.66.85.105 with SMTP id g9mr611780paz.18.1352907978184;
Wed, 14 Nov 2012 07:46:18 -0800 (PST)
X-BeenThere: google-ajax-search-api@googlegroups.com
Received: by 10.68.190.100 with SMTP id gp4ls2544746pbc.9.gmail; Wed, 14 Nov
2012 07:46:10 -0800 (PST)
Received: by 10.68.135.67 with SMTP id pq3mr7122378pbb.19.1352907970626;
Wed, 14 Nov 2012 07:46:10 -0800 (PST)
Date: Wed, 14 Nov 2012 07:46:10 -0800 (PST)
From: headtailgrep <stevehostov...@gmail.com>
To: google-ajax-search-api@googlegroups.com
Message-Id: <fcfb4ad8-3fb1-4c39-b7e8-960e52c9469f@googlegroups.com>
In-Reply-To: <ff06eaba-9b80-4860-a4ce-ca5e1c0c1dff@googlegroups.com>
References: <2cc0bca6-0bc8-4a48-85a5-3268c8a06a58@googlegroups.com>
<CAF4cwg-bstcHDZ1=VNpzjd0XJO5=mVOtBfXySrkNBacV7bG1bQ@mail.gmail.com>
<fa2e0a9b-4515-4912-8821-97d40c79396d@googlegroups.com>
<674d53b1-06e6-40a9-b9b4-29f618803295@googlegroups.com>
<ff06eaba-9b80-4860-a4ce-ca5e1c0c1dff@googlegroups.com>
Subject: Re: V1 API - CustomSearch controls mostly work but Image
Search.SetRestrictions fail - what am I missing? (Code linked below)
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_873_27337464.1352907970143"
------=_Part_873_27337464.1352907970143
Content-Type: multipart/alternative;
boundary="----=_Part_874_33483384.1352907970144"
------=_Part_874_33483384.1352907970144
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
On Wednesday, 14 November 2012 10:44:21 UTC-5, headtailgrep wrote:
>
> I've had no luck with controlling image size - It turns out the API allows
> DrawOptions as the second argument of Execute, but no other allowances are
> made. So my method is not correct as shown in Pastebin.
>
> Either way no permutations of how and when to call .SetRestriction
> and CustomSearchControl.draw have resulted in any image size controls.
>
> I get the impression that an ImageSearch object is to be treated
> differently and executed differently. I could be wrong on that point but
> that's how it seems to me :(
>
> CustomSearchControl.execute can also has three paramaters - 1) the query
> 2) page number, 3) additional arguments
>
> From the API it states for 3: "Specifies additional arguments to append to
> the URL. It is a one-time modification used only in this request."
>
> I have attempted to use Query arguments (such as imgsz=xxlarge or
> &imgsz=xxlarge) - I assume this may be what they mean, but it had no effect
> :)
>
> I am wondering if the Image Size options to not work in a CSE.
>
>
>
------=_Part_874_33483384.1352907970144
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<br>On Wednesday, 14 November 2012 10:44:21 UTC-5, headtailgrep wrote:<blo=
ckquote style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-=
color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid=
;" class=3D"gmail_quote"><div>I've had no luck with controlling image size =
- It turns out the API allows DrawOptions as the second argument of E=
xecute, but no other allowances are made. So my method is not correct =
as shown in Pastebin.</div><div> </div><div>Either way no permutations=
of how and when to call .SetRestriction and CustomSearchControl.draw =
have resulted in any image size controls.</div><div> </div><div>I get =
the impression that an ImageSearch object is to be treated differently and =
executed differently. I could be wrong on that point but that's how it seem=
s to me :(</div><div> </div><div>CustomSearchControl.execute can also =
has three paramaters - 1) the query 2) page number, 3) additional arguments=
</div><div> </div><div>From the API it states for 3: "Specifies additi=
onal arguments to append to the URL. It is a one-time modificati=
on used only in this request."</div><div> </div><div>I have attempted =
to use Query arguments (such as imgsz=3Dxxlarge or &imgsz=3Dxxlarge) - =
I assume this may be what they mean, but it had no effect :)</div><div>&nbs=
p;</div><div>I am wondering if the Image Size options to not work in a CSE.=
</div><div> </div><div> </div></blockquote>
------=_Part_874_33483384.1352907970144--
------=_Part_873_27337464.1352907970143--