Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.98 KB

README.en.md

File metadata and controls

57 lines (47 loc) · 1.98 KB
Logo

Public API - Sylvain

Version Status Lang


Change

Cliquez ici pour voir la version française, ou cliquez sur le bouton ci-dessus.

About the API

This is my personal API, available on the api.sylvain.pro domain, in French and English. You can use it without limitations, as all endpoints are public!

The API may take a few seconds to load, but once it's done, everything works very quickly and requests are executed instantly.

Features

  • Hosted 24h/7d
  • Easy to use
  • Available in French
  • Multiple endpoints :

Getting a key

Example on api.sylvain.pro/en/token, which retrieves the returned key.

Python

import requests

print(requests.get('https://api.sylvain.pro/en/token').json()['key'])

JavaScript

fetch('https://api.sylvain.pro/en/token')
  .then(response => response.json())
  .then(data => console.log(data.key));

Node.js

npm install https
const https = require('https');

https.get('https://api.sylvain.pro/en/token', (res) => {
    let data = '';
    res.on('data', chunk => data += chunk);
    res.on('end', () => {
        console.log(JSON.parse(data).key);
    });
});