Forums | Users |
Search | Signup | Login

Posts that Anthony Eden is monitoring

Subscribe to Posts that Anthony Eden is monitoring 14 post(s) found

Dec 1, 2008
Avatar Tim Riley 3 post(s)

Topic: ActiveResource to Consume API?

Hi David (and any other Unfuddle staff),

Thanks again for the great system you’ve built. I would like to know if you’ve made any progress on the issue mentioned above? We have great plans for a slim app built on top of your API that would prove of immense use to our organisation, but we can’t move to far forward without some of the dynamic reports working with ActiveResource.

Thanks, – Tim

 
Oct 15, 2008
Avatar Tim Riley 3 post(s)

Topic: ActiveResource to Consume API?

Hi David,

Thanks for your response!

Unfuddle’s use in our organisation has been growing quite strongly and I’d like to provide some ticket reports through the API. Just wondering if you guys have been able to make any progress with this?

Thanks again for all your work on the system. It’s a vital tool for us!

Cheers, – Tim

 
Sep 7, 2008
Avatar David C. 164 post(s)

Topic: ActiveResource to Consume API?

Tim,

Thanks for letting us know.

We will certainly look into this and make any necessary corrections.

 
Sep 6, 2008
Avatar Tim Riley 3 post(s)

Topic: ActiveResource to Consume API?

Hi Josh (and forum!),

I’ve found a few more places in the API’s XML responses where the type=”array” is missing.

It is not present when I do a dynamic ticket report:

https://subdomain.unfuddle.com:443/api/v1/projects/xxxx/ticket_reports/dynamic.xml?sort_by=number

The resulting XML has both <groups> and <tickets> array tags that do not have type=”array” in them. This is causing the same ActiveResource errors that Anthony posted at the start of this thread.

Is there any chance you could fix up this XML output? Thanks for your help!

- Tim
 
Dec 10, 2007
Avatar Robert Dempsey 6 post(s)

Topic: ActiveResource to Consume API?

Josh,

It works like a charm. Thanks for all of your help!

 
Dec 10, 2007
Avatar Joshua Frappier 244 post(s)

Topic: ActiveResource to Consume API?

Anthony and Robert,

Okay, I have just monkey patched support in for type=”array” into the XML that is generated from the Unfuddle API.

I have been able to use ActiveResource to find(:all) on many of the resources.

Let me know how this works for y’all.

Thanks!

 
Dec 10, 2007
Avatar Robert Dempsey 6 post(s)

Topic: ActiveResource to Consume API?

Josh – thanks for the reply. I would love to be able to get a list of everything in Unfuddle via ActiveResource. As you say – it is great stuff. That would allow me to easily create an external dashboard as well (so I don’t bombard you with feature requests anymore ;). Thanks for all of your help. Please let me know when you have a solution. I will keep checking back.

 
Dec 10, 2007
Avatar Joshua Frappier 244 post(s)

Topic: ActiveResource to Consume API?

Robert,

It looks like this is a well known issue. Arrays of elements in XML are handled slightly differently in Rails 2.0 than they are in the 1.2.x series. It looks like the changeset that affects to_xml is here: http://dev.rubyonrails.org/changeset/7074

At least until we bring Unfuddle up onto the Rails 2.0 codebase, we will have to see if we can’t replicate the type=”array” stuff in our existing code. We will be looking into this and I will update this thread as soon as we have a solution.

It would be a shame not to be able to take advantage of ActiveResource since it makes things such a breeze.

 
Dec 10, 2007
Avatar Joshua Frappier 244 post(s)

Topic: ActiveResource to Consume API?

Robert,

I have just started playing with ActiveResource myself to see if I can’t get it working. I am experiencing the exact same symptoms as you. I can pull down a single resource but not a list.

However, I did find this: http://dev.rubyonrails.org/ticket/8798

Very interesting…

Josh

 
Dec 10, 2007
Avatar Robert Dempsey 6 post(s)

Topic: ActiveResource to Consume API?

Ok, so I can’t sleep until I get this working. I can definitely pull a single record using ActiveResource, however I get the same errors as Anthony when attempting to retrieve a list of projects. Using curl to grab the list works well, however.

 
Dec 10, 2007
Avatar Robert Dempsey 6 post(s)

Topic: ActiveResource to Consume API?

NM – I got curl working, now to get AR or anything Rails working. Any examples to help us there?

 
Dec 10, 2007
Avatar Robert Dempsey 6 post(s)

Topic: ActiveResource to Consume API?

Josh, also, I continuously get a 401 Unauthorized when using curl to access the API, perhaps that is the reason I cannot use AR like Anthony is trying to do. It says that our account is BETAfied. Is there anything else I have to do in order to be able to access the API? Thanks.

 
Dec 10, 2007
Avatar Robert Dempsey 6 post(s)

Topic: ActiveResource to Consume API?

Josh, do you have an example using Rails of how to use the api? Thanks. – Robert

 
Dec 5, 2007
Avatar Joshua Frappier 244 post(s)

Topic: ActiveResource to Consume API?

Anthony,

I can’t say that we have actually tried to use ActiveResource yet to consume the Unfuddle API. However, we are doing plain vanilla RESTful routing, so as far I understand, ActiveResource should be working fine. It has been working great with the customized XML and JSON clients we have written.

Has anyone else had any success using ActiveResource?