Giter Site home page Giter Site logo

Comments (6)

anibalcucco avatar anibalcucco commented on May 23, 2024

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.

bunswo avatar bunswo commented on May 23, 2024

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

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.

anibalcucco avatar anibalcucco commented on May 23, 2024

Thanks @bunswo. Version bumped to 0.0.9 and published to rubygems.

from basecamp-wrapper.

bunswo avatar bunswo commented on May 23, 2024

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

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.

anibalcucco avatar anibalcucco commented on May 23, 2024

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.

bunswo avatar bunswo commented on May 23, 2024

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 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


Reply to this email directly or view it on GitHub:
#16 (comment)

from basecamp-wrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.