This repository is a GitHub trending API power by FastAPI and Scrapy parsel.
It was deployed to Vercel.
python -m venv .venv .venv/Scripts/Activate pip install -r requirements.txt uvicorn main:app --reload
docker build -t trending . && docker run --rm -p 8000:80 trending
Just fork this repository, and import it in your Vercel dashboard.
All the requests main adrress is this:https://trend.doforce.dpdns.org
| Name | Type | Description |
|---|---|---|
| lang | string | optional, default is "", the language of trending repository |
| since | string | optional,default is "daily", daily/weekly/monthly |
For example request this address: https://trend.doforce.dpdns.org/repo?lang=java&since=weekly
//status code: 200 // up to 25 items [ { "repo": "/StarRocks/starrocks", "desc": "StarRocks, a Linux Foundation project, is a next-generation sub-second MPP OLAP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics, and ad-hoc queries. InfoWorld’s 2023 BOSSIE Award for best open source software.", "lang": "Java", "stars": 6338, "forks": 1437, "build_by": [ { "avatar": "https://avatars.githubusercontent.com/u/57167462?s=40&v=4", "by": "/amber-create" }, { "avatar": "https://avatars.githubusercontent.com/u/98087056?s=40&v=4", "by": "/evelynzhaojie" }, { "avatar": "https://avatars.githubusercontent.com/u/4351040?s=40&v=4", "by": "/sduzh" }, { "avatar": "https://avatars.githubusercontent.com/u/104624482?s=40&v=4", "by": "/EsoragotoSpirit" }, { "avatar": "https://avatars.githubusercontent.com/u/34912776?s=40&v=4", "by": "/stdpain" } ], // How many stars did it gain this week/day/month "change": 619 } ]
| Name | Type | Description |
|---|---|---|
| lang | string | optional, default is "", the language of trending repository |
| since | string | optional,default is "daily", daily/weekly/monthly |
| sponsorable | string | optional,default is "", Whether the developer was sponsored, "1" is true, others is false |
For example request this address: https://trend.doforce.dpdns.org/user?lang=java&since=weekly
//status code: 200 // up to 25 items [ { // developer's GitHub avatar "avatar": "https://avatars.githubusercontent.com/u/322311?s=96&v=4", // developer's nickname "name": "Ben McCann", // developer's GitHub name "github_name": "/benmccann", "popular": { // developer's popular repository "repo": "/benmccann/NameMatching", // developer's popular repository description "desc": "My entry (Yet Another Team Challenge) to MITRE's name matching competition" } } ]
For example,request this address: https://trend.doforce.dpdns.org/lang
//status code: 200 // about 700 items [ { // The display language name "label": "Unknown languages", // the language name which is used to search repositories and developers "key": "unknown" }, { "label": "Python", "key": "python" }, { "label": "C#", "key": "c%23" } ]
If the server does not get the resources, or the query parameters you input don't match anything, the response will be like:
//status code: 200
[]