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

Pluralized API? Yea or Nay? #375

Closed
shiftkey opened this issue Feb 18, 2014 · 5 comments
Closed

Pluralized API? Yea or Nay? #375

shiftkey opened this issue Feb 18, 2014 · 5 comments

Comments

@shiftkey
Copy link
Member

So we have docs that look like this

screen shot 2014-02-18 at 8 24 09 pm

And our interface for the root GitHubClient looks like this:

IAuthorizationsClient Authorization { get; }
IActivitiesClient Activity { get; }
IIssuesClient Issue { get; }
IMiscellaneousClient Miscellaneous { get; }
IOrganizationsClient Organization { get; }
IRepositoriesClient Repository { get; }
IGistsClient Gist { get; }
IReleasesClient Release { get; }
ISshKeysClient SshKey { get; }
IUsersClient User { get; }
INotificationsClient Notification { get; }
IGitDatabaseClient GitDatabase { get; }
ISearchClient Search { get; }
IStatisticsClient Statistics { get; }

Two questions I have:

  • should we normalize on what the API docs use in terms of pluralization?
  • should our interfaces/implementations follow these same rules? (i.e. IActivityClient instead of IActivitiesClient)
@haacked
Copy link
Contributor

haacked commented Feb 18, 2014

I did singular for the property names because Users.Get makes me think it's getting all users vs User.Get is clear it's one. But for the type name, I like the plural to match (more or less) the API. So 👍 to IActivityClient as Activity is both singular and plural so we can't be wrong.

@anaisbetts
Copy link
Contributor

We've already shipped public releases, the ⛵ has sailed on this one. Don't Break People™

@shiftkey
Copy link
Member Author

We've already shipped public releases, the ⛵ has sailed on this one.

Not sure I agree with this. We're pre 1.0 still and there's a lot of work to do yet before we get there.

@haacked
Copy link
Contributor

haacked commented Feb 18, 2014

I agree with @shiftkey. We've deliberately not cut a 1.0 release for this reason. Also, Octokit on NuGet has 557 downloads. I think people will survive.

It's a disappointingly low count, but we haven't really put our marketing muscle into it yet.

@shiftkey
Copy link
Member Author

shiftkey commented Feb 2, 2016

We're doing an API audit in #1038 and have marked a few things as obsolete in the most recent release.

I think we settled on singular for the naming convention, but we'll use that to keep things up to date (and later enforce this via convention/integration tests)

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

3 participants