In the case of a standalone application's HTTP Referer header it is
strongly recommended that you create a static webpage with information
about your app, including your contact information, so that Google may
contact you if it should have need. You would then include the URL of that
page as the HTTP Referer.

As for the jar files issue, I'm not a Java dev, so I'll let someone else
speak into that matter.

jg





On Mon, Jul 28, 2014 at 10:45 PM, Pedro Guillermo Feijóo García <
pg.feijo...@gmail.com> wrote:

> Greetings,
>
> For acadmic purposes, I want to create a standalone app which can search
> and find web images with word keys.
>
> Im using this code, which is shown in this link:
> https://developers.google.com/image-search/v1/jsondevguide?csw=1#json_snippets_java
>
> Code:
>
> URL url = new URL("https://ajax.googleapis.com/ajax/services/search/images?"; +
>
>                   "v=1.0&q=barack%20obama&userip=INSERT-USER-IP");
> URLConnection connection = url.openConnection();
>
> connection.addRequestProperty("Referer", /* Enter the URL of your site here 
> */);
>
> String line;
> StringBuilder builder = new StringBuilder();
> BufferedReader reader = new BufferedReader(new 
> InputStreamReader(connection.getInputStream()));
> while((line = reader.readLine()) != null) {
>
>  builder.append(line);
> }
>
> JSONObject json = new JSONObject(builder.toString());
>
> I have the following questions, in base of this code:
>
> 1) Which library (jar file) should I use of JSON? (The page recomended in the 
> Google example doesn't show libraries or jars)
>
> 2) If I'm writing a standalone application, what should I put in the /*Enter 
> the URL of your site here*/ thing?
>
> Thank you a lot :)
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Google AJAX APIs" group.
> To post to this group, send email to
> google-ajax-search-api@googlegroups.com
> To unsubscribe from this group, send email to
> google-ajax-search-api+unsubscr...@googlegroups.com
> To view this message on the web, visit
>
> https://groups.google.com/d/msgid/google-ajax-search-api/9a1bb579-ca73-4cb4-bb06-b72f10631cf7%40googlegroups.com
> <https://groups.google.com/d/msgid/google-ajax-search-api/9a1bb579-ca73-4cb4-bb06-b72f10631cf7%40googlegroups.com?utm_medium=email&utm_source=footer>
> For more options, visit this group at
> http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Google AJAX APIs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-ajax-search-api+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan
Church!
http://www.debraheightswesleyan.org

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax-search-api@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-search-api+unsubscr...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/CAF4cwg9CesAL6C0JvZzZn2JhVqSQxq2rP%3DTbY5MtQBwqq4V5%2Bw%40mail.gmail.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-ajax-search-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to