我需要列出我的版本庫的一個目錄下的所有檔案名。
下面的 api 可以列出根目錄下的檔案名和目錄。
https://api.github.com/repos/username/repo-name/git/trees/master?recursive=1
沒有找到合適的api來列出目錄!
沒有找到合適的api來列出目錄。
uj5u.com熱心網友回復:
使用https://api.github.com/repos/{owner}/{repo}/contents/{path}
請看這里的檔案。https://docs.github.com/en/rest/reference/repos#get-repository-content
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/329873.html
標籤:
