Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public InsertTranslationQuery(TranslationRecord record)
 {
     args         = new Args();
     args.objects = new List <TranslationRecord>();
     args.objects.Add(record);
 }