Skip to content
/ mint.rb Public

A tiny little library to connect to the mint.com "API."

Notifications You must be signed in to change notification settings

chrisb/mint.rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

mint.rb

Wrote this small bit of code to gather some information from Mint.com's "API." It's pretty minimal at this point but all I needed was something to capture the current month's budget info--hopefully it can save someone else some time!

A simple driver

require 'mint'

Mint::Base.username = ''
Mint::Base.password = ''

Mint::API.connect!

Mint::API.budgets( '03/01/2012', '03/31/2012' )['data']['spending'].each_pair do |budget_id,budget_period|

  # if your start/end window is large enough, you will get all budgets for previous months
  # not really sure how to parse these yet, though

  budget_period['bu'].each do |budget|
    amount   = budget['amt']
    max      = budget['bgt']
    category = Mint::API.category_name( budget['cat'] )
    puts "Spent #{amount} out of #{max} on: #{category}"
  end

end

About

A tiny little library to connect to the mint.com "API."

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages