Permalink
Browse files

allow specifying of dates

  • Loading branch information...
1 parent 723016a commit 4f0798db071fc1ab8bcde23da365dfc5155de858 @hone committed May 2, 2010
Showing with 10 additions and 1 deletion.
  1. +10 −1 init.rb
View
@@ -1,9 +1,18 @@
class Heroku::Command::Sendgrid < Heroku::Command::Base
def index
app = extract_app
+ date = Hash.new
+
+ args.each do |arg|
+ key, value = arg.split("=")
+ date[key] = value
+ end
+
vars = heroku.config_vars(app)
display resource["/monthly_usage"].post(:api_user => vars["SENDGRID_USERNAME"],
- :api_key => vars["SENDGRID_PASSWORD"])
+ :api_key => vars["SENDGRID_PASSWORD"],
+ :year => date["year"],
+ :month => date["month"])
end
private

0 comments on commit 4f0798d

Please sign in to comment.