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



commit 3804ac87bbc00ef58784ced014940ceba4731945
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-snappy.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-snappy.c b/src/plugins/gs-plugin-snappy.c
index 87fb1aa..fb84629 100644
--- a/src/plugins/gs-plugin-snappy.c
+++ b/src/plugins/gs-plugin-snappy.c
@@ -189,9 +189,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]