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

Add the singular user command, analogous to the single tweet command #599

Merged
merged 2 commits into from
Mar 12, 2022

Conversation

SamHames
Copy link
Contributor

This adds the user command, which takes a single user id. This is a direct analogue of the single tweet command, so we know have tweet/tweets and user/users.

Closes #598

@SamHames
Copy link
Contributor Author

SamHames commented Feb 22, 2022 via email

Copy link
Member

@edsu edsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that looking up by username doesn't work?

$ twarc2 user jack
⚡ The `ids` query parameter value [jack] is not valid

Maybe that should be fixed or it shouldn't advertise that it can lookup by username?

@igorbrigadir
Copy link
Contributor

yes, would be nice to have twarc2 user jack work - - very useful for arbitrarily pulling out a user ID on the go!

@SamHames
Copy link
Contributor Author

SamHames commented Mar 4, 2022

I added the name/id disambiguation as part of the command to make it clear, as well as updating the docstrings to better align with that.

Get the profile data for a single user by either username or ID.

To look up a user by ID:

    twarc2 user id 12

To look up a user by username:

    twarc2 user name jack

@igorbrigadir
Copy link
Contributor

I really like this "name-or-id" approach, and the command examples in the docs!

@edsu
Copy link
Member

edsu commented Mar 11, 2022

I like it too! It could be useful for some other commands liketimeline.

@igorbrigadir
Copy link
Contributor

I think this is good to go!

@igorbrigadir igorbrigadir merged commit 6221fc6 into main Mar 12, 2022
@igorbrigadir igorbrigadir deleted the add_singular_user_cli branch March 12, 2022 20:55
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

Successfully merging this pull request may close these issues.

twarc2 lookup-user command to retrieve a single user profile
3 participants