Skip to content

Commit

Permalink
Fix of jars
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGarmr committed Jun 19, 2023
1 parent efc70b1 commit 182d9aa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Monobank.Client/Extensions/Int64Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,10 @@ public static double AsMoney(this long input)
var parsed = double.TryParse(balance, out var parsedValue);
return parsed ? parsedValue : 0;
}

public static double AsMoney(this long? input)
{
return input?.AsMoney() ?? 0;
}
}
}
2 changes: 1 addition & 1 deletion Monobank.Client/Models/Jar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class Jar
public long Balance { get; set; }

[JsonPropertyName("goal")]
public long Goal { get; set; }
public long? Goal { get; set; }

#region Custom properties

Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# MonobankClient [<img src="https://img.shields.io/nuget/dt/MonobankClient?style=for-the-badge">](https://www.nuget.org/packages/MonobankClient/)<br>
[<img src="https://img.shields.io/github/v/release/TheGarmr/monobank-client?label=Latest%20GitHub%20release&style=for-the-badge">](https://github.com/TheGarmr/monobank-client/releases/latest)
[<img src="https://img.shields.io/nuget/v/MonobankClient?label=Latest%20Nuget%20version&style=for-the-badge">](https://www.nuget.org/packages/MonobankClient/)<br>

### This application helps to integrate [Monobank open API](https://api.monobank.ua)(client) to your application.
### Full API documentation can be found here: [Monobank open API](https://api.monobank.ua/docs/)

### Functionality
* [Obtaining exchange rates](https://api.monobank.ua/docs/#tag/Publichni-dani/paths/~1bank~1currency/get)
* [Information about the client](https://api.monobank.ua/docs/#tag/Kliyentski-personalni-dani/paths/~1personal~1client-info/get)
* [Set up WebHook](https://api.monobank.ua/docs/#tag/Kliyentski-personalni-dani/paths/~1personal~1webhook/post)
* [Extract transactions](https://api.monobank.ua/docs/#tag/Kliyentski-personalni-dani/paths/~1personal~1statement~1{account}~1{from}~1{to}/get)

### API limitations:
* You can receive information about a client once per a minute
* Information about currencies refreshes once per 5 minutes

### Quickstart:
* Go to your [personal profile](https://api.monobank.ua/)
* Create a token
* Install the package from [Nuget.org](https://www.nuget.org/packages/MonobankClient/)
* Add MonobankClient to DI via calling method `services.AddMonobankClient();`

0 comments on commit 182d9aa

Please sign in to comment.