[libgdata] demos: Add a client ID to requests



commit 517e093df245e0fe83750dde9611705c4579fda2
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Jan 16 17:50:20 2011 +0000

    demos: Add a client ID to requests

 demos/scrapbook/scrapbook.c |    4 ++--
 demos/scrapbook/scrapbook.h |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/demos/scrapbook/scrapbook.c b/demos/scrapbook/scrapbook.c
index 08488e0..94a8980 100644
--- a/demos/scrapbook/scrapbook.c
+++ b/demos/scrapbook/scrapbook.c
@@ -608,7 +608,7 @@ main(int argc, char **argv)
 	/* create a new query, without any search text, starting at 0, and search only MAX_RESULTS results */
 	youtubeSearch->query = gdata_query_new_with_limits (NULL, 0, MAX_RESULTS);
 	/* create a new youtube service, giving it our developer key; google no longer uses client ids so we send in an empty string (NULL gives an error) */
-	scrapbook->youtube_service = gdata_youtube_service_new (DEVELOPER_KEY, "");
+	scrapbook->youtube_service = gdata_youtube_service_new (DEVELOPER_KEY, CLIENT_ID);
 	/* create a new list store and tree to show the user the results
 	 * it has three columns (two of which are displayed): a pixbuf for the thumbnail, the title, and the video data itself (as a gdata generic entry) */
 	youtubeSearch->lStore = gtk_list_store_new 	(N_COLS, GDK_TYPE_PIXBUF, G_TYPE_STRING, GDATA_TYPE_ENTRY);
@@ -617,7 +617,7 @@ main(int argc, char **argv)
 	scrapbook->p_search 		= picasaSearch;
 	picasaSearch->main_data 	= scrapbook;
 	picasaSearch->query 		= gdata_query_new_with_limits (NULL, 0, MAX_RESULTS);
-	scrapbook->picasaweb_service = gdata_picasaweb_service_new ("");
+	scrapbook->picasaweb_service = gdata_picasaweb_service_new (CLIENT_ID);
 
 	photoSearch					= g_slice_new (struct _ScrapPicSearch);
 	scrapbook->p_search->pic	= photoSearch;
diff --git a/demos/scrapbook/scrapbook.h b/demos/scrapbook/scrapbook.h
index bd51f21..6c95d0b 100644
--- a/demos/scrapbook/scrapbook.h
+++ b/demos/scrapbook/scrapbook.h
@@ -5,6 +5,7 @@
 #include <glib.h>
 #include <glib-object.h>
 #define DEVELOPER_KEY "AI39si5MkSF-0bzTmP5WETk1D-Z7inHaQJzX13PeG_5Uzeu8mz3vo40cFoqnxjejB-UqzYFrqzOSlsqJvHuPNEGqdycqnPo30A"
+#define CLIENT_ID "ytapi-GNOME-libgdata-444fubtt-0"
 #define THUMBNAIL_WIDTH 180
 #define MAX_RESULTS 	10
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]