DaData.ApiClient
1.1.50
See the version list below for details.
dotnet add package DaData.ApiClient --version 1.1.50
NuGet\Install-Package DaData.ApiClient -Version 1.1.50
<PackageReference Include="DaData.ApiClient" Version="1.1.50" />
paket add DaData.ApiClient --version 1.1.50
#r "nuget: DaData.ApiClient, 1.1.50"
// Install DaData.ApiClient as a Cake Addin #addin nuget:?package=DaData.ApiClient&version=1.1.50 // Install DaData.ApiClient as a Cake Tool #tool nuget:?package=DaData.ApiClient&version=1.1.50
Описание
Этот проект представляет из себя .Net реализацию клиента для работы с сервисом DaData.ru
С ним вы сможете очень быстро начать работать с API DaData, без лишних затрат времени.
Есть полная поддержка .Net Core и .Net Standart 1.3+
На данный момент полностью реализованы все методы для работы с API:
RoadMap
- Добавить возможность автоматических уведомлений о превышении минимального, установленного вами лимита баланса
- Добавить возможность включать автоматический контроль за ограничениями на количество сообщений в секунду (очереди сообщений с балансировщиком), с минимальными задержками на отправку сообщений
Установка
1) Подключить клиент к проекту через Nuget (Gui менеджер или CLI). Подробнее тут.
ps:
Install-Package DaData.ApiClient
Примечание:
Пакет требует следующие зависимости: -Newtonsoft.Json (nuget)
2) Получить API ключи (токены) на сайте сервиса
Использование:
//token - это Token из личного кабинета
//secret - это Secret из личного кабинета. Он нужен для некоторых методов
var client = new ApiClient(token, secret);
//Или
var client = new ApiClient(new ApiClientOptions()
{
LimitQueries = Your Limit,
Secret = Your Secret,
Token = Your Token
});
//Пример вызова метода стандартизации адреса
var response = await client.StandartizationQueryAddress(new[]
{
"address1",
"address2"
});
//Или
var response = await client.StandartizationQueryAddress(new AddressRequest()
{
Queries = new List<string>()
{
"address1",
"address2"
}
});
//вернет модель
//Аналогично происходят обращения и к другим методам API
Дополнительно:
Стоит заметить, что в проекте присутствуют интерфейсы для использования (и реализации) клиента(ов) со следующими наборами методов:
- Подсказок
- Стандартизации
- Дополнительными
Которые удобно использовать например для DI. Есть поддержка исключений, соответствующих кодам ошибок из документации
Для связи:
Писать на xambey@yandex.ru или в телеграм @xambey.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 is compatible. netcoreapp1.1 was computed. netcoreapp2.0 is compatible. netcoreapp2.1 is compatible. netcoreapp2.2 is compatible. netcoreapp3.0 is compatible. netcoreapp3.1 is compatible. |
.NET Standard | netstandard1.3 is compatible. netstandard1.4 is compatible. netstandard1.5 is compatible. netstandard1.6 is compatible. netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 1.0
- Microsoft.NETCore.App (>= 1.0.5)
- Newtonsoft.Json (>= 11.0.2)
-
.NETCoreApp 2.0
- Newtonsoft.Json (>= 11.0.2)
-
.NETCoreApp 2.1
- Newtonsoft.Json (>= 11.0.2)
-
.NETCoreApp 2.2
- Newtonsoft.Json (>= 11.0.2)
-
.NETCoreApp 3.0
- Newtonsoft.Json (>= 11.0.2)
-
.NETCoreApp 3.1
- Newtonsoft.Json (>= 11.0.2)
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 11.0.2)
-
.NETStandard 1.4
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 11.0.2)
-
.NETStandard 1.5
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 11.0.2)
-
.NETStandard 1.6
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 11.0.2)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 11.0.2)
-
.NETStandard 2.1
- Newtonsoft.Json (>= 11.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.2 | 8,560 | 4/30/2021 |
1.1.51 | 8,249 | 6/3/2020 |
1.1.50 | 938 | 5/6/2020 |
1.1.49 | 5,932 | 1/24/2020 |
1.1.48 | 1,543 | 6/14/2019 |
1.1.44 | 1,346 | 6/6/2019 |
1.1.33 | 545 | 6/6/2019 |
1.1.32 | 569 | 6/5/2019 |
1.1.7 | 6,964 | 7/29/2018 |
1.0.85 | 831 | 7/21/2018 |
1.0.82 | 938 | 7/17/2018 |
1.0.81 | 918 | 7/17/2018 |
1.0.80 | 930 | 7/16/2018 |
-Добавлен метод для получения статистики использования
-Добавлены поля CountryIsoCode и RegionIsoCode в модель AddressData