Skip to content

Commit b63da05

Browse files
committed
add balance section on readme
1 parent a4e6f24 commit b63da05

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

README.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,65 @@
1-
# Blnk
1+
# This gem is under development, don't use in production
22

3-
TODO: Delete this and the text below, and describe your gem
3+
# Blnk
44

5-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/blnk`. To experiment with that code, run `bin/console` for an interactive prompt.
5+
Easy way to use the blnkfinance.com API in ruby
66

77
## Installation
88

9-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10-
119
Install the gem and add to the application's Gemfile by executing:
1210

13-
$ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
11+
$ bundle add blnk
1412

1513
If bundler is not being used to manage dependencies, install the gem by executing:
1614

17-
$ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15+
$ gem install blnk
1816

1917
## Usage
2018

2119
TODO:
2220
- [x] Create Ledger
2321
- [x] Find Ledger
24-
- [ ] Create Balances
25-
- [ ] Find Balances
26-
- [ ] Create Transactions
27-
- [ ] Find Transactions
28-
- [ ] Do Search
22+
- [x] List Ledgers
23+
- [ ] Search Ledgers
24+
- [x] Create Balances
25+
- [x] Find Balance
26+
- [ ] Search Balances
27+
- [ ] Create Transaction
28+
- [ ] Find Transaction
29+
- [ ] Search Transactions
2930

30-
## Client connection
31+
## Usage
3132

32-
```
33+
```ruby
3334
require 'blnk'
3435

36+
# client config
37+
3538
Blnk.address = '192.168.2.7:5001'
3639
Blnk.secret_token = 'your_strong_secret_key'
3740
Blnk.search_api_key = Blnk.secret_token
38-
```
3941

42+
# ledgers integration
4043

41-
## Ledger usage
42-
43-
```
44-
ledger = Blnk::Ledger.new(name: 'foo bar').save
4544
ledger = Blnk::Ledger.create(name: 'foobar')
46-
4745
ledger = Blnk::Ledger.find 'ledger_id'
4846
ledgers = Blnk::Ledger.all
4947

48+
# search not implemented yet
5049
ledgers = Blnk::Ledger.search(
5150
q: 'USD',
5251
filter_by: 'balances > 1400',
5352
sort_by: 'created_at:desc',
5453
page: 1,
5554
per_page: 50
5655
)
57-
```
5856

59-
## Creating a transaction
6057

61-
```
62-
```
58+
# Balance integrations
59+
balance = Blnk::Balance.find 'balance_id'
60+
balance = Blnk::Balance.create(ledger_id: 'ledger_id', currency: 'USD')
6361

62+
```
6463

6564

6665
## Development
@@ -71,7 +70,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
7170

7271
## Contributing
7372

74-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/blnk.
73+
Bug reports and pull requests are welcome on GitHub at https://github.com/devton/blnk-ruby
7574

7675
## License
7776

0 commit comments

Comments
 (0)