diff --git a/fbchat/client.py b/fbchat/client.py index e6e04fc..de5ca09 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -502,7 +502,7 @@ class Client(object): return users - def searchForUsers(self, name, limit=1): + def searchForUsers(self, name, limit=10): """ Find and get user by his/her name @@ -517,7 +517,7 @@ class Client(object): return [graphql_to_user(node) for node in j[name]['users']['nodes']] - def searchForPages(self, name, limit=1): + def searchForPages(self, name, limit=10): """ Find and get page by its name @@ -531,7 +531,7 @@ class Client(object): return [graphql_to_page(node) for node in j[name]['pages']['nodes']] - def searchForGroups(self, name, limit=1): + def searchForGroups(self, name, limit=10): """ Find and get group thread by its name @@ -546,7 +546,7 @@ class Client(object): return [graphql_to_group(node) for node in j['viewer']['groups']['nodes']] - def searchForThreads(self, name, limit=1): + def searchForThreads(self, name, limit=10): """ Find and get a thread by its name diff --git a/fbchat/graphql.py b/fbchat/graphql.py index 8fc8b6e..510e93b 100644 --- a/fbchat/graphql.py +++ b/fbchat/graphql.py @@ -477,7 +477,7 @@ class GraphQL(object): """ SEARCH_USER = """ - Query SearchUser( = '', = 1) { + Query SearchUser( = '', = 10) { entities_named() { search_results.of_type(user).first() as users { nodes { @@ -489,7 +489,7 @@ class GraphQL(object): """ + FRAGMENT_USER SEARCH_GROUP = """ - Query SearchGroup( = '', = 1, = 32) { + Query SearchGroup( = '', = 10, = 32) { viewer() { message_threads.with_thread_name().last() as groups { nodes { @@ -501,7 +501,7 @@ class GraphQL(object): """ + FRAGMENT_GROUP SEARCH_PAGE = """ - Query SearchPage( = '', = 1) { + Query SearchPage( = '', = 10) { entities_named() { search_results.of_type(page).first() as pages { nodes { @@ -513,7 +513,7 @@ class GraphQL(object): """ + FRAGMENT_PAGE SEARCH_THREAD = """ - Query SearchThread( = '', = 1) { + Query SearchThread( = '', = 10) { entities_named() { search_results.first() as threads { nodes {