Comments (6)
Hey,
I pushed a fix, we were overriding the element_name in Resource ignoring the "special" element name setting necessary in Basecamp::Message to use "post" in the API calls instead of "message".
The problem was only in rails >= 3, that method was ignored in rails < 3.
Can you try the fix by adding the gem like this in your project?
gem "basecamp", :git => "git://github.com/anibalcucco/basecamp-wrapper.git", :ref => "7e67411a847c9bf921e3c8fe489110fbc0dfa53e"
If you confirm it's working, i'll bump the gem version.
Thanks,
Anibal
from basecamp-wrapper.
Hi Anibal --
That worked! I added the gem into my gem file and the message posted to the project.
Yes it was Rails 3.2.0
Thanks so much!
Ben
Ben Unsworth
Globacore Interactive Technologies
- 1 416 925 2082 (office/fax)
- 1 416 523 4479 (mobile)
www.globacore.comhttp://www.globacore.com
[email protected]:[email protected]
On 2012-01-26, at 7:37 PM, Anibal Cucco wrote:
Hey,
I pushed a fix, we were overriding the element_name in Resource ignoring the "special" element name setting necessary in Basecamp::Message to use "post" in the API calls instead of "message".
The problem was only in rails >= 3, that method was ignored in rails < 3.
Can you try the fix by adding the gem like this in your project?
gem "basecamp", :git => "git://github.com/anibalcucco/basecamp-wrapper.git", :ref => "7e67411a847c9bf921e3c8fe489110fbc0dfa53e"
If you confirm it's working, i'll bump the gem version.
Thanks,
Anibal
Reply to this email directly or view it on GitHub:
#16 (comment)
from basecamp-wrapper.
Thanks @bunswo. Version bumped to 0.0.9 and published to rubygems.
from basecamp-wrapper.
Awesome - While I have you here and before I go too deep -- does your wrapper allow for adding multiple people to a message?
Ben Unsworth
Globacore Interactive Technologies
- 1 416 925 2082 (office/fax)
- 1 416 523 4479 (mobile)
www.globacore.comhttp://www.globacore.com
[email protected]:[email protected]
On 2012-01-26, at 10:05 PM, Anibal Cucco wrote:
Thanks @bunswo. Version bumped to 0.0.9 and published to rubygems.
Reply to this email directly or view it on GitHub:
#16 (comment)
from basecamp-wrapper.
There's currently no way to do that using the REST API because the notify
attribute should be outside the post
attributes in the request to create the message and i couldn't find a way to make active resource handle that yet:
<request>
<post>
<category-id>#{category_id}</category-id>
<title>#{title}</title>
<body>#{body}</body>
<private>1</private> <!-- only for firm employees -->
</post>
<notify>#{person_id}</notify>
<notify>#{person_id}</notify>
...
But you can always use the non REST API for those special cases:
Basecamp.request "/projects/1234/posts", :post => {:title => "Hello", :body => "World"}, :notify => ["person_id_1", "person_id_2"]
Note: I discovered a bug for that type of calls and i pushed a fix. So, if you want to use that, you have to reference this commit on your Gemfile: 43a72a2
from basecamp-wrapper.
Great. Thanks Anibal. That's really helpful.
Sent from my iPhone
On 2012-01-27, at 3:14 PM, "Anibal Cucco" [email protected] wrote:
There's currently no way to do that using the REST API because the
notify
attribute should be outside thepost
attributes in the request to create the message and i couldn't find a way to make active resource handle that yet:<request> <post> <category-id>#{category_id}</category-id> <title>#{title}</title> <body>#{body}</body> <private>1</private> <!-- only for firm employees --> </post> <notify>#{person_id}</notify> <notify>#{person_id}</notify> ...
But you can always use the non REST API for those special cases:
Basecamp.request "/projects/1234/posts", :post => {:title => "Hello", :body => "World"}, :notify => ["person_id_1", "person_id_2"]
Note: I discovered a bug for that type of calls and i pushed a fix. So, if you want to use that, you have to reference this commit on your Gemfile: 43a72a2
Reply to this email directly or view it on GitHub:
#16 (comment)
from basecamp-wrapper.
Related Issues (20)
- Changing default return format HOT 7
- NoMethodError: undefined method `collect!' for #<Hash:0x00000100b74c50> HOT 1
- Launchpad Data HOT 1
- Cannot retrieve time entries HOT 2
- Milestone#list not functioning HOT 3
- unable to save/update time_entries HOT 2
- Response Headers HOT 2
- 'Ignored' params in find call HOT 2
- comments pagination is not supported HOT 4
- Create project with template HOT 2
- Basecamp.record(s) methods HOT 1
- Basecamp::Message object returned after create HOT 2
- Not thread-safe HOT 1
- Todo Item ID missing from Time Entries HOT 1
- Accessing the todo_list from the todo_item HOT 3
- need help for method missing - todo_list.project_id HOT 1
- Using this with rails 2.3.5 HOT 1
- New Version Changed Things. HOT 2
- Doesn't handle 301 redirects HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basecamp-wrapper.