private static string GetExtraFields(ExtraFields extraFields, Params param)
 {
     var url = "";
     if (extraFields == ExtraFields.NoExtraField) return url;
     param.ExtraField = extraFields;
     url += "&&extra_fields=" + param.ToString(param.ExtraFields);
     return url;
 }
 public async Task<IEnumerable<ListPrinter>> ListPrintersAsync(string proxy,
     ExtraFields extraFields = ExtraFields.NoExtraField)
 {
     var param = new Params {Proxy = new List<string> {proxy}};
     var client = GetClient();
     var url = $"{Url}list?proxy=" + param.ToString(param.Proxy);
     url += GetExtraFields(extraFields, param);
 
     var result = await client.GetStringAsync(url);
     var obj = JsonConvert.DeserializeObject<PrinterListResult>(result);
     return obj.Printers;
 }
        public async Task<IEnumerable<SearchPrinter>> SearchPrintersAsync(ExtraFields extraFields = ExtraFields.NoExtraField)
        {
            var client = GetClient();
            var param = new Params();
        
            var url = $"{Url}list?search";
            url += GetExtraFields(extraFields, param);

            var result = await client.GetStringAsync(url);
            var obj = JsonConvert.DeserializeObject<PrinterSearchResult>(result);
            return obj.Printers;
        }
        public async Task<IEnumerable<LookupPrinter>> LookupPrintersAsync(string printerId, ExtraFields extraFields = ExtraFields.NoExtraField)
        {
            var param = new Params {PrinterId = new List<string> {printerId}};
            var client = GetClient();

            var url = $"{Url}printer?printerId=" + param.PrinterId;
            url += GetExtraFields(extraFields, param);

            var result = await client.GetStringAsync(url);
            var obj = JsonConvert.DeserializeObject<PrinterLookupResult>(result);
            return obj.Printers;
;        }