[gnome-software] snap: Use /v2/find API instead of obsolete /v2/snaps API for searching



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

    snap: 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 bfcc204..00341ef 100644
--- a/src/plugins/gs-plugin-snap.c
+++ b/src/plugins/gs-plugin-snap.c
@@ -194,9 +194,11 @@ get_apps (GsPlugin *plugin,
                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]