mizuho_bank : みずほ銀行ウェブサイトのRuby Interface

インストール

gem install mizuho_bank

使い方 (こんな感じで)

# encoding: utf-8
require 'mizuho_bank'
require 'pit'

pit = Pit.get("MizuhoBank", :require => {
  "keiyaku_no" => "keiyaku_no",
  "password" => "password",
  "aikotoba1_question" => "aikotoba1_question",
  "aikotoba2_question" => "aikotoba2_question",
  "aikotoba3_question" => "aikotoba3_question",
  "aikotoba1_answer" => "aikotoba1_answer",
  "aikotoba2_answer" => "aikotoba2_answer",
  "aikotoba3_answer" => "aikotoba3_answer",
})

aikotoba_dict = {
  pit['aikotoba1_question'] => pit['aikotoba1_answer'],
  pit['aikotoba2_question'] => pit['aikotoba2_answer'],
  pit['aikotoba3_question'] => pit['aikotoba3_answer']
}

MizuhoBank.new(pit['keiyaku_no'].to_s, pit['password'].to_s, aikotoba_dict){ |bank|
  p bank.info..money
}

用例集

  1. 口座残高取得したいとき

bank.info..money
  1. 最近の取引履歴を配列で取得したいとき

bank.info..cache_flows
  1. 口座番号とか種別しりたいとき

bank.info..number
bank.info..type

既知の問題

まだ画像認証に対応してない。画像認証は秘密の質問に失敗しまくってるとやらなきゃいけなくなる