예제 #1
0
 public async Task <JToken> graphql_request(GraphQL query)
 {
     /*
      * Shorthand for `graphql_requests(query)[0]`
      * :raises: Exception if request failed
      */
     return((await this.graphql_requests(new[] { query }.ToList()))[0]);
 }
예제 #2
0
        public async Task <List <JToken> > graphql_requests(List <GraphQL> queries)
        {
            /*
             * :param queries: Zero or more dictionaries
             * :type queries: dict
             * : raises: FBchatException if request failed
             * : return: A tuple containing json graphql queries
             * :rtype: tuple
             * */
            var data = new Dictionary <string, object>()
            {
                { "method", "GET" },
                { "response_format", "json" },
                { "queries", GraphQL.queries_to_json(queries) }
            };

            return((List <JToken>) await this._post("/api/graphqlbatch/", data, as_graphql : true));
        }