0

I need to interface with an api which seems to be not playing well with ActiveResource. What's the best/easiest way to consume it?

I need to do a variety of read/write actions with the api including dealing with some relatively simple relationships.

I've done a lot of searching and tried to bend ARES to my will with limited success.

Please can anyone recommend strategies/gems to deal with the issue of modifying complex url routes and xml decode / encode schemas ?

I'd prefer to use something which is 'future proof' and 'mature' than ARES which seems to be deprecated from RoR?

significance
  • 4,797
  • 8
  • 38
  • 57

1 Answers1

0

I tend to use active_model_serializers, but it sounds like you need something more customizable. Have you looked into RABL? From the docs:

RABL (Ruby API Builder Language) is a Rails and Padrino ruby templating system for generating JSON, XML, MessagePack, PList and BSON. When using the ActiveRecord 'to_json' method, I tend to quickly find myself wanting a more expressive and powerful solution for generating APIs. This is especially frustrating when the JSON representation is complex or doesn't match the exact schema defined in the database.

Nick Colgan
  • 5,488
  • 25
  • 36