this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added twitter-to-sqlite fetch URL command

Useful development tool - makes it easy to make authenticated API
requests on the command-line.

Also started the Design notes docs

+19
+3
README.md
··· 56 56 57 57 See [Analyzing my Twitter followers with Datasette](https://simonwillison.net/2018/Jan/28/analyzing-my-twitter-followers/) for the original inspiration for this command. 58 58 59 + ## Design notes 60 + 61 + * Tweet IDs are stored as integers, to afford sorting by ID in a sensible way
+16
twitter_to_sqlite/cli.py
··· 12 12 13 13 14 14 @cli.command() 15 + @click.argument("url") 16 + @click.option( 17 + "-a", 18 + "--auth", 19 + type=click.Path(file_okay=True, dir_okay=False, allow_dash=True, exists=True), 20 + default="auth.json", 21 + help="Path to auth.json token file", 22 + ) 23 + def fetch(url, auth): 24 + "Make an authenticated request to the Twitter API" 25 + auth = json.load(open(auth)) 26 + session = utils.session_for_auth(auth) 27 + click.echo(json.dumps(session.get(url).json(), indent=4)) 28 + 29 + 30 + @cli.command() 15 31 @click.option( 16 32 "-a", 17 33 "--auth",