https://github.com/remy/twivatar
Twitter RESTful avatar API
https://github.com/remy/twivatar
Last synced: 6 months ago
JSON representation
Twitter RESTful avatar API
- Host: GitHub
- URL: https://github.com/remy/twivatar
- Owner: remy
- Created: 2009-05-31T22:36:36.000Z (over 16 years ago)
- Default Branch: main
- Last Pushed: 2022-10-03T17:42:05.000Z (about 3 years ago)
- Last Synced: 2025-02-08T23:42:05.143Z (8 months ago)
- Language: HTML
- Homepage: https://twivatar.glitch.me/
- Size: 476 KB
- Stars: 74
- Watchers: 5
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# No longer works
**Twitter has managed to finally kill this (and related) projects. Sorry, I've looked and I can't see a solution.**
# Twivatar
Twivatar is a RESTful API to a Twitter user's avatar built out of frustration of external Twitter apps breaking when the avatar url is stored, and then changed by that user later on Twitter - the result is a broken image on that app unless they constantly check for profile changes.
## Usage
`
`
Alternatively you can specify the size image you want from:
* mini (24x24)
* normal (48x48 - default)
* bigger (73x73)
* original`
`
## Behind the scenes
This is a simple one script app that stores the url of the avatar. When the avatar is requested for x user, it runs the following logic:
1. Get the mobile HTML from twitter
2. Run the HTML through cheerio and find the .Avatar element
3. Request the image URL and pipe to the response
4. All requests also include CORS headers so you can manipulate in a canvas## License
MIT: [http://rem.mit-license.org](http://rem.mit-license.org)