From 27accd7a5a601bd77a3c13832e92ebbd0571b7b5 Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 1 Sep 2022 23:54:15 +0100 Subject: [PATCH] Documented apiMirrors --- configHandler.py | 3 ++- readme.md | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configHandler.py b/configHandler.py index cb34c3d..d5b8153 100644 --- a/configHandler.py +++ b/configHandler.py @@ -19,7 +19,8 @@ if not os.path.exists("config.json"): "api":{"api_key":"[api_key goes here]", "api_secret":"[api_secret goes here]", "access_token":"[access_token goes here]", - "access_secret":"[access_secret goes here]" + "access_secret":"[access_secret goes here]", + "apiMirrors":[] } } diff --git a/readme.md b/readme.md index f2ee2c5..b8ab747 100644 --- a/readme.md +++ b/readme.md @@ -60,6 +60,9 @@ vxTwitter generates a config.json in its root directory the first time you run i **combination_method** - using c.vxtwitter as the url causes vxTwitter to combine all images in the post into one. This is CPU intensive, so you might not want it running on the same machine that's serving requests. When `combination_method` is set to `local`, it will use the local machine to combine the images. This requires pillow to be installed. If you want to use another server, replace `local` with the URL to the endpoint which combines images. Both methods use the code in the `combineImg` module. Inside, there's also a `Dockerfile` intended to be deployed as a combination endpoint on an [AWS Lambda function](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html). +**apiMirrors** - During an influx of traffic (i.e when Twitter embeds break!) it's very likely that Twitter will begin to block you for sending too many requests. +This is an array of replacement Twitter API URLs which can be called upon when requesting tweet info locally fails. An example of an implementation of an API Mirror is in the twExtract directory, and is intended to be hosted on AWS Lambda. If multiple mirror URLs are specified, one will be selected at random. + This project is licensed under the **Do What The Fuck You Want Public License**