I have a list of JSON files in GH to be fetched via API.
For this, I first use the /git.trees
API endpoint to get a list that contains path
and url
info.
Next, there seem to be 2 options for getting the file contents:
-
use the
path
value from the above response in the ‘get repository content’ API -
use the
url
value from the above response in the ‘get a blob’ API
Are there any conditions for which one to select in which scenario?