dnsimple / dnsimple-elixir

The DNSimple API client for Elixir.
https://developer.dnsimple.com/
MIT License
50 stars 15 forks source link

Rename `Dnsimple.Record` to `Dnsimple.ZoneRecord` #18

Closed aeden closed 8 years ago

aeden commented 8 years ago

To match the go and ruby clients.

jacegu commented 8 years ago

In the Ruby client it is called Record too. However in the Go client it's called ZoneRecord.

@aeden @weppos @jodosha which one should we use?

aeden commented 8 years ago

My understanding is @weppos is considering the Go client to be the reference implementation, but he'll need to confirm.

weppos commented 8 years ago

It was originally called Record in the Go client as well, but it was renamed as part of the shift to V2. I should have renamed the Ruby client as well (actually I believe we talked about that and I assumed it was done).

Both the Ruby and the Go client are kind of reference, but the Go one is generally a little bit more accurate as it's the one I've been spending most time on and was almost rewritten from 0. Moreover, Go is a more strict language, and some decisions were influenced by the Go client because it was the hardest to please so far.

I vote to rename both the Ruby and Elixir client to ZoneRecord.

weppos commented 8 years ago

PS. Here's the relevant commit https://github.com/aetrion/dnsimple-go/commit/ef7339c1ae1dc5aee1d5049e097fd5bee221c66c

jacegu commented 8 years ago

Does that mean that we should have a different data structure (or object) for records in other contexts (e.g templates) ?

EDIT: looks like that's the followed approach Ruby client: https://github.com/aetrion/dnsimple-ruby/blob/master/lib/dnsimple/struct/template_record.rb

weppos commented 8 years ago

Does that mean that we should have a different data structure (or object) for records in other contexts (e.g templates) ?

That's correct, it has always been like this. We always had Record vs TemplateRecord (which was one of the reason why I wanted to be more explicit on the name).