Question

I am attempting to retrieve TimeEntries in Basecamp using the Ruby basecamp-wrapper. I have tried all the combinations and different ways I could think of to get it working (see below) but am having no luck. I am reasonably new to Ruby and Rails development so I could be doing something wrong.

In all cases I have checked to ensure the project, todo item or time entry actually exists and is being returned over the Basecamp Api by testing the Api manually in my browser.

First I was attempting to retrieve the TimeEntries for a specific todo item using:

Basecamp::TimeEntry.find(:all, :params => { :todo_item_id => 123 })

but I get the error: ActiveResource::MissingPrefixParam: project_id prefix_option is missing

So I then tried including the project_id:

Basecamp::TimeEntry.find(:all, :params => { :todo_item_id => 123, :project_id => 456 })

but I get a nil result back, when the todo item definitely has time entries and belongs to the specified project.

I then attempted to retrieve the TimeEntries through the actual todo item:

todo_item = Basecamp::TodoItem.find(:all, :params => { :todo_list_id => 17216468}).first
todo_item.time_entries

but again I get the ActiveResource::MissingPrefixParam: project_id prefix_option is missing error.

I tried to get all the TimeEntries for the project in pages using:

Basecamp::TimeEntry.all(123, 1)

and I get the error: ActiveResource::MissingPrefixParam: todo_item_id prefix_option is missing

I am pretty stumped as to what to try/do now.

Was it helpful?

Solution

There were some problems with the basecamp wrapper and rails >= 3.1.x. I pushed some fixes and bumped the gem version. 0.0.7 solves the MissingPrefixParam exceptions and other problems.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top