0.02
No release in over 3 years
Low commit activity in last 3 years
There's a lot of open issues
Fetch the all data about Turkish Banks and their branches.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 6.0.3.1
~> 2.1.4
~> 1.10.9
~> 13.0.0
 Project Readme

TurkishBanks

Gem Version Code Climate

Fetch all banks and their information from http://www.tcmb.gov.tr/.

Installation

Add this line to your application's Gemfile:

gem 'turkish_banks'

And then execute:

$ bundle

Or install it yourself as:

$ gem install turkish_banks

Usage

# Gets last update date
TurkishBanks::LAST_UPDATE

# Gets all banks
TurkishBanks.banks

# Create a bank from its name
bank = TurkishBanks::Bank.new("türkiye cumhuriyeti ziraat bankası a.ş.")
bank.name # => "TÜRKİYE CUMHURİYETİ ZIRAAT BANKASI A.Ş."

# Get a collection of branch objects
branches = bank.branches
branches.first.name # => "MERKEZ/ANKARA ŞUBESİ"
branches.size       # => 1791

Exception Handling

If you pass the wrong bank name to Bank#new, it raises TurkishBanks::BankNotFoundError exception. You can rescue this error, then do something else.

begin
  TurkishBanks::Bank.new('fake bank')
rescue TurkishBanks::BankNotFoundError
  # do something here
end

TODO

  • Improve search part.
  • New features. Please send some pull-request.