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.
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.
// Install NuCli as a Cake Addin #addin nuget:?package=NuCli&version=20240215.2.0 // Install NuCli as a Cake Tool #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. |
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 | 125 | 2/15/2024 |
20240215.1.0 | 120 | 2/15/2024 |
20240207.4.0 | 131 | 2/7/2024 |
20240207.3.0 | 115 | 2/7/2024 |
20240207.2.0 | 132 | 2/7/2024 |
20240207.1.0 | 118 | 2/7/2024 |
20240206.4.0 | 107 | 2/6/2024 |
20240206.3.0 | 131 | 2/6/2024 |