Coder Social home page Coder Social logo

tika / presence Goto Github PK

View Code? Open in Web Editor NEW

This project forked from punctuations/presence

0.0 0.0 0.0 2.09 MB

๐Ÿšง A simple and elegant solution to images of your social media!

Home Page: https://presence.im

TypeScript 99.92% Shell 0.08%

presence's Introduction

A simple and elegant solution to images for social media!


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

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 themes.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, changes the most popular colo(u)r from the image as the background. n/a
  • Please note that all queries are optional.

Examples

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:

Contributing

If you want to contribute to this project, fix some bugs, add some platforms, or other things, you can visit the Contributing Guide.

Contributors

(emoji-key)

presence's People

Contributors

cnrad avatar dependabot[bot] avatar punctuations avatar tika avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.