wrstudios / reso_transport

A wrapper for interacting with RESO WebAPI
MIT License
7 stars 6 forks source link

[Feature Request] Dataset Replication Endpoint support (for Bridge MLSes) #7

Closed coderberry closed 3 years ago

coderberry commented 3 years ago

Hi all,

It seems that in order to access more than 10,000 records from the Bridge API, we must use a 'replication' endpoint. Here are the docs: https://rets.ly/docs/platform/API/reso-web-api (search for Dataset Replication).

I was thinking of adding an additional configuration to the client initialization options, for example:

@client = ResoTransport::Client.new({
  md_file: METADATA_CACHE,
  endpoint: ENDPOINT_URL,
  use_replication_endpoint: true,
  authentication: {
    access_token: TOKEN,
    token_type: "Bearer" # this is the default and can be ommitted
  }
})

If this flag is set on the client, whenever a request is made to query resources, it will utilize the appended /replication to the URL.

Thanks for any feedback and support on this.

jondruse commented 3 years ago

Yes we are dealing with the same thing here. This sounds like a decent approach.

coderberry commented 3 years ago

@jondruse Do you by chance have a secrets.yml.example file I can review? I just want to see how you are populating this file so I can have my tests be the same.

--

Please disregard. I found the sample file.