Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singular methods to instantiate reference objects #41

Closed
southpolesteve opened this issue Jul 10, 2018 · 4 comments
Closed

Singular methods to instantiate reference objects #41

southpolesteve opened this issue Jul 10, 2018 · 4 comments

Comments

@southpolesteve
Copy link
Contributor

Coming out of #39 we decided to move go with approach 5. get methods will become singular methods one level up the object hierarchy:

// Current
client.databases.get(id)
client.databases.get(id).containers.get(id)
client.databases.get(id).containers.get(id).items.get(id)

// New
client.database(id)
client.database(id).container(id)
client.database(id).container(id).item(id)
@christopheranderson
Copy link
Contributor

Are you putting .database only on the common parent, or also under the plural?

Can I do both of these or just the first one?

client.database(id)
client.databases.database(id)

@southpolesteve
Copy link
Contributor Author

My thought was only on the common parent for now. Not opposed to having it both places, but would like to try Proxy for that first.

@christopheranderson
Copy link
Contributor

@southpolesteve - this is done now? #43

@southpolesteve
Copy link
Contributor Author

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants