NuCli 20240215.2.0
dotnet add package NuCli --version 20240215.2.0
NuGet\Install-Package NuCli -Version 20240215.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NuCli" Version="20240215.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NuCli" Version="20240215.2.0" />
<PackageReference Include="NuCli" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NuCli --version 20240215.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NuCli, 20240215.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NuCli@20240215.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NuCli&version=20240215.2.0
#tool nuget:?package=NuCli&version=20240215.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NuClient
NuClient
é uma biblioteca para interagir com a API do Nubank para buscar eventos(transações, pagamentos, etc) dos cartões de crédito.
Operações
LoginAsync()
: Logar o usuário com as credenciais fornecidas.AutenticateWithQrCodeAsync(string code)
: Autentica o usuário usando um código QR.GetEventsAsync()
: Obtém eventos da conta do usuário autenticado.GetBillsAsync()
: Obtém todas as faturas da conta do usuário autenticado.GetBillSummaryAsync()
: Obtém o resumo de uma fatura específica.GetTransactionDetailsAsync(Event @event)
: Obtém detalhes de um evento do tipo transação.UseCache(string filePath) (private)
: Permite usar cache usando informações da requisição em AutenticateWithQrCodeAsync salvos em um arquivo lift.json. (O token desse cache expira em aproximadamente 1 semana)
Como usar
O código abaixo exemplifica como usar, mas também é possível rodar o Console.App NubankApp que está na mesma solution do código.
string login = "seu_login";
string senha = "sua_senha";
string liftCachedFilePath = "lift.json";//opcional
var nubankClient = new NubankClient(login, senha, liftCachedFilePath);
var loginResponse = await nubankClient.LoginAsync();
if (loginResponse.MustAuthenticate)
{
Console.WriteLine("Você deve se autenticar com o aplicativo do Nubank para acessar os dados.");
Console.WriteLine("Entre no aplicativo Nubank > Perfil > Segurança > Acesso no Navegador");
Console.WriteLine("E scaneie o QRCode abaixo:");
Console.WriteLine();
Console.WriteLine(loginResponse.GetQrCodeAsAscii());
Console.WriteLine($"Depois de autorizado clique em qualquer tecla para continuar ...");
Console.ReadKey();
await nubankClient.AutenticateWithQrCodeAsync(loginResponse.Code);
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- QRCoder (>= 1.4.3)
- System.IdentityModel.Tokens.Jwt (>= 7.3.1)
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 |
---|---|---|
20240215.2.0 | 161 | 2/15/2024 |
20240215.1.0 | 140 | 2/15/2024 |
20240207.4.0 | 149 | 2/7/2024 |
20240207.3.0 | 136 | 2/7/2024 |
20240207.2.0 | 154 | 2/7/2024 |
20240207.1.0 | 141 | 2/7/2024 |
20240206.4.0 | 126 | 2/6/2024 |
20240206.3.0 | 148 | 2/6/2024 |