Пример #1
0
        public async Task <TranslationReturningResponse> AddTranslation(TranslationRecord record)
        {
            InsertTranslationQuery query = new InsertTranslationQuery(record);
            var data    = JsonConvert.SerializeObject(query);
            var content = new StringContent(data, Encoding.UTF8, "application/json");

            Debug.WriteLine("Content");
            Debug.WriteLine(data);
            var response = await client.PostAsync(Endpoint.QUERY_URL, content);

            Debug.WriteLine(response);
            var result = JsonConvert.DeserializeObject <TranslationReturningResponse>(response.Content.ReadAsStringAsync().Result);

            return(result);
        }
Пример #2
0
 public InsertTranslationQuery(TranslationRecord record)
 {
     args         = new Args();
     args.objects = new List <TranslationRecord>();
     args.objects.Add(record);
 }