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

Make client interfaces consistent with property name plurality #53

Closed
haacked opened this issue Oct 4, 2013 · 3 comments
Closed

Make client interfaces consistent with property name plurality #53

haacked opened this issue Oct 4, 2013 · 3 comments
Labels
Type: Bug Something isn't working as documented

Comments

@haacked
Copy link
Contributor

haacked commented Oct 4, 2013

What?!

Here's IGitHubClient

public interface IGitHubClient
{
    IConnection Connection { get; }

    IAuthorizationsClient Authorization { get; }
    IAutoCompleteClient AutoComplete { get; }
    IOrganizationsClient Organization { get; }
    IRepositoriesClient Repository { get; }
    IReleasesClient Releases { get; }
    ISshKeysClient SshKey { get; }
    IUsersClient User { get; }
}

Here's IObservableGitHubClient

public interface IObservableGitHubClient
{
    IObservableAuthorizationsClient Authorization { get; }
    IObservableAutoCompleteClient AutoComplete { get; }
    IObservableOrganizationsClient Organization { get; }
    IObservableRepositoriesClient Repositories { get; }
    IObservableSshKeysClient SshKey { get; }
    IObservableUsersClient User { get; }
}

Notice the inconsistencies. All the property names are singular except for Releases. The observable interfaces is missing the Releases property and it has a Repositories property instead of Repository.

I chose singular property names so they map more or less to entities.

For example, here are ways you might interact with a repository:

githubClient.Repository.Get("owner", "name");
githubClient.Repository.GetAllForCurrent();

We should make sure it's all consistent, but I wanted to get some feedback first.

  1. Do you like the singular property name approach? Or would you prefer plural?
@haacked
Copy link
Contributor Author

haacked commented Oct 5, 2013

@half-ogre got an opinion on this?

@half-ogre
Copy link
Contributor

@haacked: For now, I like going singular. I had another approach in mind, as well, but I need to think on it a bit more and poke around before I pitch it.

@haacked
Copy link
Contributor Author

haacked commented Oct 19, 2013

I did this in 9a33c68

@haacked haacked closed this as completed Oct 19, 2013
@nickfloyd nickfloyd added Type: Bug Something isn't working as documented and removed category: bug labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

3 participants