Skip to content

Consistency in keyword arguments for "id" parameters #314

Merged
merged 5 commits into from

2 participants

@jeremylow
Collaborator

This changes some of the keyword arguments so that they are a little more consistently named in the API and avoid renaming the builtin function id. Kind of a small change, but I wanted to get it in before v3. Basically anything that was passed as id has a more descriptive argument now: id in the context of a Status object changes to status_id, message_id for DirectMessages, and woeid for the Where On Earth ids. Similarly, for DestroyBlock, it's now user_id rather than just id.

Documentation is included for everything here. All previous tests still pass, but some of the behavior is breaking since kwargs have been renamed.

I also noticed that make clean kept deleting my vim undo files, so I hope no one minds that those are excluded from the target.

Sound good, @bear?


This change is Reviewable

jeremylow added some commits
@jeremylow jeremylow fix up "id" kwargs.
"status_id" is more common within the api, but there are a couple methods that use "id" to spec the same thing, which is confusing and inconsistent.
"woeid" avoids shadowing a builtin, but is also more expressive.
b774d18
@jeremylow jeremylow adds documentation re change to "id" kwargs 86142a3
@jeremylow jeremylow adds "docs" target to makefile 4428fb0
@jeremylow jeremylow fix up a few more "id" params & add documentation for same. 2870359
@jeremylow jeremylow changes postretweet & destroyblock to use status_id and user_id, resp…
…ectively
7dcdf61
@bear
Owner

:shipit:

@jeremylow jeremylow merged commit bd7e6af into master

1 check passed

Details ci/circleci Your tests passed on CircleCI!
@bear bear deleted the kwargs-consistency branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.