3

I am trying to write a simple Datamapper adapter that will be used to query an HTTP API. I spent quite some time trying to find some documentation, but everything seemed to be quite old (appart from a Taiwanese Ruby Conf in Chinese...).

Which methods do we need to override ?

It looks like I only have to subclass an AbstractAdapter and override the create, read, update and delete methods, but not sure what arguments they are supposed to take and what they are supposed to return.

Thanks

Nekosan
  • 145
  • 8

1 Answers1

0

Checkout the following page which includes a list of contributed datamapper adapters:

https://github.com/datamapper/dm-core/wiki/Adapters

There are several in the list that interact with web services that may serve as good examples. For example, checkout the sales force datamapper adapter.

Matt Hulse
  • 5,496
  • 4
  • 29
  • 37