Github API List all repositories and repo's content

后端 未结 8 761
陌清茗
陌清茗 2020-12-23 21:03

If I was to go about displaying just MY github repositories and their contents on an external website how would i go about doing this? Are there any source code\'s you can

8条回答
  •  旧时难觅i
    2020-12-23 21:58

    You need to parse the respone Githubs API sends you back. In PHP you can do this by using json_decode() which will give you an array to work with. You can use something like curl to issue the requests from PHP and then get the results and parse them as described above.
    Another way to do this are REST Client classes for PHP, have a look at this one here for example.

提交回复
热议问题