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

standardize attribute, method, argument, etc names #35

Closed
tybug opened this issue Sep 15, 2021 · 2 comments
Closed

standardize attribute, method, argument, etc names #35

tybug opened this issue Sep 15, 2021 · 2 comments

Comments

@tybug
Copy link
Owner

tybug commented Sep 15, 2021

every forward-facing name needs a pass to make sure they're consistent and make sense, as the names given by the api do not always do either. For example:

  • Search.{user, wiki_page} should probably be Search.{users, wiki_pages}
  • we might want to rename User.id to User.user_id, and similarly for Beatmap and Beatmapset (I'm not entirely sold on this, but a straight id attribute isn't very intuitive to me. Perhaps others feel differently)
@tybug
Copy link
Owner Author

tybug commented Oct 16, 2021

a prerequisite to this is a custom field class which we can use to tell our deserialization to deserialize an attribute into a differently named field, since right now they have to match 1:1, which means we can't rename user to users or wiki_page to wiki_pages. Such a field class would also allow us to get rid of our special-case handling for the @ character in attribute names, which we currently force-replace with an underscore.

@tybug
Copy link
Owner Author

tybug commented Oct 20, 2021

closed by 7a77f5b. I've since decided that id instead of user_id or something similar is actually probably fine. I think I slightly prefer user_id but not enough that I can justify breaking parity with the api.

@tybug tybug closed this as completed Oct 20, 2021
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

1 participant