Created
July 24, 2009 20:49
-
-
Save supaspoida/154544 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/repos/harvest$ irb | |
>> require 'harvest' | |
=> true | |
@harvest = Harvest(:email => "[email protected]", | |
:password => "123456", | |
:sub_domain => "tomatoist", | |
:headers => {"User-Agent" => "Tomatoist", 'Content-Type' => 'application/xml' }) | |
@harvest.timesheet.new(:hours => 3, :notes => 'workdammit', :project_id => 388131, :task_id => 319119, :spent_at => Date.today).save | |
## This is the request that is generated | |
<?xml version="1.0" encoding="UTF-8"?> | |
<request> | |
<project-id nil="true"></project-id> | |
<task-id nil="true"></task-id> | |
<spent-at type="date">2009-07-24</spent-at> | |
<hours>3</hours> | |
<notes>workdammit</notes> | |
</request> | |
## And the response | |
Failed with 500 Internal Server Error | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment