
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Easy way to use the blnkfinance.com API in ruby
Install the gem and add to the application's Gemfile by executing:
$ bundle add blnk
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install blnk
transaction = Blnk::Transaction.find 'transaction_id'
require 'blnk'
# client config
Blnk.address = '192.168.2.7:5001'
Blnk.secret_token = 'your_strong_secret_key'
Blnk.search_api_key = Blnk.secret_token
# Ledgers
ledger = Blnk::Ledger.create(name: 'foobar')
ledger = Blnk::Ledger.find 'ledger_id'
ledgers = Blnk::Ledger.all
ledgers = Blnk::Ledger.search(q: '*')
# Balances
balance = Blnk::Balance.find 'balance_id'
balance = Blnk::Balance.create(ledger_id: 'ledger_id', currency: 'USD')
balances = Blnk::Balance.search(q: '*')
# Transactions
transaction = Blnk::Transaction.find 'transaction_id'
transaction = Blnk::Transaction.create(
amount: 75,
reference: 'ref_005',
currency: 'BRLX',
precision: 100,
source: '@world',
destination: 'bln_469f93bc-40e9-4e0e-b6ab-d11c3638c15d',
description: 'For fees',
allow_overdraft: true
)
transaction = Blnk::Transaction.search q: '*'
All methods return a Dry::Monad::Result, so you can use .failure?
to check if method was executed and returned a failure (can be validation or a server error). .success?
to check if method was executed with successful and access the data from the failure or successful result using .value!
. You can check on the dry-monad gem to see other options on Result.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/devton/blnk-ruby
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that blnk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.