A simple Twitter bot that tweets details from the V&A Museum API v2 (released 15/4/2021), which is well documented by their team.
This bot is an R script, powered via a Github action. Inspired a bit by Londonmapbot's code which showed me how to automate the R script via an action.
This script calls a random object from the collections with an image attached, constructs a tweet and sends it with the url for the record.
- Create a Twitter account for your bot
- Sign up for a developer access with Twitter
- Fork this repo (or just copy the code into a new repo)
- Obtain your API keys from Twitter and add them as GitHub secrets
- Edit variables retrieved from the api in the
vambot-tweet.R
file - Edit the
.github/workflows/vambot.yml
file to adjust the cron schedule Every 10 mins past the hour at the moment. - GitHub Actions run or throw a tantrum (if your keys are wrong for instance.)
GPL V3