GitHub
Add your pinned repositories to your portfolio or website using this API.
Using the api on your project
If you want to add your pinned repositories to your portfolio or website and can't find an API that works for this, then your problems are over. I've created an API that does exactly that, and its usage is extremely easy. Simply pass your GitHub username as a query parameter.
Example of request
https://api.kremilly.com/github?user=YOUR_USERNAME
[!note] Replace
YOUR_USERNAMEwith your GitHub username
A simple example of use in JavaScript
// Replace "kremilly" for your GitHub username
fetch('https://api.kremilly.com/github?user=kremilly').then(
json => json.json()
).then(callback => {
console.log(callback)
})
See here others examples in others languages and using Axios.js
Simple output of request:
{
"commits": 21,
"contributors": 1,
"description": "This is where you can find all the APIs I've built using the Flask framework and Python programming language. All APIs are free to use, both for personal and professional purposes, and there are no usage limits.",
"forks": 0,
"home": "https://api.kremilly.com",
"issues": 0,
"languages": [
"Python",
"CSS",
"HTML"
],
"name": "MyApis",
"stars": 0,
"tags": [
"apis",
"flask",
"python",
"rest-apis",
"web-apis"
],
"url": "https://github.com/kremilly/MyApis"
}
The API will return a JSON with all your pinned repositories (if any; otherwise, it will return an empty JSON)
Queries Parameters
userSet the username
Data returned by the API
nameRepository name (required)descriptionRepository description (optional)homeRepository home URL (optional)urlRepository url on GitHub (generated by GitHub)starsRepository stars amount (default is0)forksRepository forks amount (default is0)commitsRepository commits amount (default is0)issuesRepository issues amount (default is0)contributorsRepository contributors amount (default is1)languagesRepository languages (generated by GitHub)tagsRepository topics on GitHub (optional)
Possible messages knowning
- The user does not have any pinned repositores (Status code:
200) - User does not exist on GitHub (Status code:
404) - Error fetching pinned repositories (Status code:
500)