Skip to content

Commit

Permalink
use kebab-case instead of snake_case for the cli
Browse files Browse the repository at this point in the history
  • Loading branch information
edsu committed Jan 27, 2022
1 parent 2e4015f commit 6d0e529
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions docs/twarc2_en_us.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,17 @@ conversation:

## Likes

Twarc supports the two approaches that the Twitter API exposes for collecting likes via the `liked_tweets` and `liking_users` commands.
Twarc supports the two approaches that the Twitter API exposes for collecting likes via the `liked-tweets` and `liking-users` commands.

The `liked_tweets` command returns the tweets that have been liked by a specific account. The account is specified by the user ID of that account, in the following example is the account of Twitter's founder:
The `liked-tweets` command returns the tweets that have been liked by a specific account. The account is specified by the user ID of that account, in the following example is the account of Twitter's founder:

twarc2 liked_tweets 12 jacks_likes.jsonl
twarc2 liked-tweets 12 jacks-likes.jsonl

In this case the output file contains all of the likes of publicly accessible tweets. Note that the order of likes is not guaranteed by the API, but is probably reverse chronological, or most recent likes by that account first. The underlying tweet objects contain no information about when the tweet was liked.

The `liking_users` command returns the user profiles of the accounts that have liked a specific tweet (specified by the ID of the tweet):
The `liking-users` command returns the user profiles of the accounts that have liked a specific tweet (specified by the ID of the tweet):

twarc2 liking_users 1460417326130421765 liking_users.jsonl
twarc2 liking-users 1460417326130421765 liking-users.jsonl

In this example the output file contains all of the user profiles of the publicly accessible accounts that have liked that specific tweet. Note that the order of profiles is not guaranteed by the API, but is probably reverse chronological, or the profile of the most recent like for that account first. The underlying profile objects contain no information about when the tweet was liked.

Expand All @@ -249,7 +249,7 @@ Note that likes of tweets that are not publicly accessible, or likes by accounts

You can retrieve the user profiles of publicly accessible accounts that have retweeted a specific tweet, using the `retweeted_by` command and the ID of the tweet as an identifier. For example:

twarc2 retweeted_by 1460417326130421765 retweeting_users.jsonl
twarc2 retweeted-by 1460417326130421765 retweeting-users.jsonl

Unfortunately this only returns the user profiles (presumably in reverse chronological order) of the retweeters of that tweet - this means that important information, like when the tweet was retweeted is not present in the returned object.

Expand Down
6 changes: 3 additions & 3 deletions twarc/command2.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ def following(T, user, outfile, limit, max_results, hide_progress):
break


@twarc2.command("liking_users")
@twarc2.command("liking-users")
@click.option(
"--limit",
default=0,
Expand Down Expand Up @@ -927,7 +927,7 @@ def liking_users(T, tweet_id, outfile, limit, max_results, hide_progress):
break


@twarc2.command("retweeted_by")
@twarc2.command("retweeted-by")
@click.option(
"--limit",
default=0,
Expand Down Expand Up @@ -978,7 +978,7 @@ def retweeted_by(T, tweet_id, outfile, limit, max_results, hide_progress):
break


@twarc2.command("liked_tweets")
@twarc2.command("liked-tweets")
@click.option(
"--limit",
default=0,
Expand Down

0 comments on commit 6d0e529

Please sign in to comment.