- Notifications
You must be signed in to change notification settings - Fork4
🌙 A simple and elegant solution to images of your social media!
punctuations/presence
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Presence is a service that generates SVG images for social medias. It does this by accessing the endpoint,presence.im/api/:platform/:type/:param
, where the API will return the image via headers. If you wish for base64 encoding, then append the?type=base64
query to the end of the URL to obtain the base64 encoding of the image like so:
GET https://presence.im/api/twitter/user/atmattt?type=base64
{"data":"data:image/svg+xml;base64,PHN2ZwogICAgICB4bWxucz0iaHR..." }
Presence also comes with themes! By adding the following queries to the endpoint you can change what some things look like!
Query | Type | Outcome | Notes |
---|---|---|---|
type | "base64" | "png" | returns base64 encoding of image or png image. | Only accepts 'base64' or 'png', else it will return just the svg |
rounded | boolean | rounds the corners of the image. | n/a |
theme | string | uses theme presets located within theme.json. | n/a |
icon | hex | changes the icon colo(u)r of the current platform. | colo(u)r cannot contain "#", ex. good: "c4c4c4", bad: "#c4c4c4" |
bg | hex | changes the background colo(u)r. | " |
text | hex | changes the colo(u)r of any text that isn't specified otherwise by other queries. | " |
desc | hex | changes the description/bio colo(u)r. | " |
stats | hex | changes the colo(u)r of the svg or the text that accompanies stats_text. | " |
stats_text | hex | changes the colo(u)r of the text that accompanies any number or svg of statistics. | " |
accent | hex | changes the colo(u)r of the border of any secondary info (ex. github/card, twitter/card). | " |
show_language | boolean | toggles the visibility of language on GitHub images. | n/a |
show_icon | boolean | toggles the visibility of the icon on spotify/song & spotify/track | n/a |
top | boolean | only appears on spotify/song & spotify/track, changes the position of song text to the top. | n/a |
bottom | boolean | only appears on spotify/song & spotify/track & discord/guild, changes the position of text to the bottom. | n/a |
index | number | only appears on spotify/song & spotify/track & discord/guild, changes the most popular colo(u)r from the image as the background. | n/a |
day | number | only appears on producthunt/all, changes the day. | n/a |
month | number | only appears on producthunt/all, changes the month. | n/a |
year | number | only appears on producthunt/all, changes the year. | n/a |
- Please note that all queries are optional.
GET https://presence.im/api/github/user/punctuations?bg=282e33&text=fff&stats_text=c9c9c9
GET https://presence.im/api/spotify/track/3dhjNA0jGA8vHBQ1VdD6vV?index=1&type=base64
{"data":"data:image/svg+xml;base64,CiAgICA8c3ZnCiAgICAgIHhtbG5zPSJodHR..." }
base64 used as src:
If you want to contribute to this project, fix some bugs, add some platforms, or other things, you can visit theContributing Guide.
Unfortunately only services that support App Authorization and doesn't require User Authorization.
Soundcloud will be added, app registration is waiting as they "will no longer be processing API application requests at this time. [They] are working to re-evaluate our process to make it more efficient."
About
🌙 A simple and elegant solution to images of your social media!