[gnome-software/wip/ubuntu-xenial] Use /v2/find API instead of obsolete /v2/snaps API for searching



commit dec3bbd7583acffa2fed82dedf0005bd47106e26
Author: Robert Ancell <robert ancell canonical com>
Date:   Mon Jun 27 13:51:57 2016 +1200

    Use /v2/find API instead of obsolete /v2/snaps API for searching

 src/plugins/gs-plugin-snap.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-snap.c b/src/plugins/gs-plugin-snap.c
index bc6217a..91ed2a4 100644
--- a/src/plugins/gs-plugin-snap.c
+++ b/src/plugins/gs-plugin-snap.c
@@ -202,9 +202,11 @@ get_apps (GsPlugin *plugin, const gchar *sources, gchar **search_terms, GList **
                g_autofree gchar *query = NULL;
                query = g_strjoinv ("+", search_terms);
                g_ptr_array_add (query_fields, g_strdup_printf ("q=%s", query));
+               path = g_string_new ("/v2/find");
        }
+       else
+               path = g_string_new ("/v2/snaps");
        g_ptr_array_add (query_fields, NULL);
-       path = g_string_new ("/v2/snaps");
        if (query_fields->len > 1) {
                g_autofree gchar *fields = NULL;
                g_string_append (path, "?");


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