项目作者: WangNingkai

项目描述 :
:octocat: GitHub Trending API power by Python Sanic.
高级语言: Python
项目地址: git://github.com/WangNingkai/github-trending.git
创建时间: 2020-08-11T07:28:41Z
项目社区:https://github.com/WangNingkai/github-trending

开源协议:MIT License

下载


github.png

This project is a GitHub trending API power by Sanic.
It was deployed on Vercel.


Get Started

request address like this:

/repo

  • If the language contains ‘#’,you must use ‘-shuo’ to replace it.
Parameters
Name Type Description
lang string optional, get method parameter, the language of trending repository
since string optional,get method parameter,default is daily,others is weekly,monthly

For example request this address:
https://github-trending.vercel.app/repo?lang=java&since=weekly

return:

  1. //status code: 201
  2. {
  3. "count": 25,
  4. "msg": "suc",
  5. //trending repositories
  6. "items": [
  7. {
  8. //the avatar link of contributors
  9. "avatars": [
  10. "https://avatars0.githubusercontent.com/u/16903644?v=3&s=40",
  11. "https://avatars2.githubusercontent.com/u/8622362?v=3&s=40",
  12. "https://avatars0.githubusercontent.com/u/10773353?v=3&s=40",
  13. "https://avatars3.githubusercontent.com/u/6392550?v=3&s=40",
  14. "https://avatars1.githubusercontent.com/u/3837836?v=3&s=40"
  15. ],
  16. //repository link
  17. "repo_link": "https://github.com/kdn251/interviews",
  18. //repository desctiption
  19. "desc": "Everything you need to know to get the job.",
  20. //repository name
  21. "repo": "kdn251/interviews",
  22. //the repository stars count
  23. "stars": "5,772",
  24. //the repository forks count
  25. "forks": "539",
  26. //the language of repository
  27. "lang": "Java",
  28. //the repository stars count for tody or this week or this month
  29. "added_stars": "4,591 stars this week"
  30. },
  31. .
  32. .
  33. .
  34. ]
  35. }

request address like this:

/developer

  • If the language contains ‘#’,you must use ‘-shuo’ to replace it.
Parameters
Name Type Description
lang string optional, get method parameter, maybe it is the major language of the developer
since string optional,get method parameter,default is daily,others is weekly,monthly

For example request this address:
https://github-trending.vercel.app/developer?lang=java&since=weekly

return:

  1. //status code: 201
  2. {
  3. "count": 25,
  4. "msg": "suc",
  5. //the trending developers
  6. "items": [
  7. {
  8. //the username in GitHub of this developer
  9. "user": "google",
  10. //the main page in GitHub of this developer
  11. "user_link": "https://github.com/google",
  12. //the full name of this developer
  13. "full_name": "(Google)",
  14. //the avatar url of the developer
  15. "developer_avatar": "https://avatars1.githubusercontent.com/u/1342004?v=3&s=96"
  16. },
  17. ]
  18. }

Exception

If the server does not get the resources,the response will be that:

  1. //status code: 404
  2. {
  3. "msg": "Unavailable.",
  4. "count":0,
  5. "items": []
  6. }

Maintenance

If some of the interface can not be used,please contact me with email:i@ningkai.wang,I will modify the problem as soon as possible,thank you!