-1

Github GraphQL API: how to get rep's one source file by GrahpQL api ?

For example, if there's a data file like somedata.json, is there a way to fetch it by Github GraphQL API ?

JerryZhou
  • 4,566
  • 3
  • 37
  • 60
  • I find the answer at [html-automatically-fetching-json-file-from-github-repo](https://stackoverflow.com/questions/22403218/html-automatically-fetching-json-file-from-github-repo) – JerryZhou Jan 31 '20 at 13:22

1 Answers1

-1

So the answer would be

  1. get the files path in the folder by:

GET /repos/:owner/:repo/git/trees/:tree_sha

  1. get the file by raw.githubusercontent.com/

html-automatically-fetching-json-file-from-github-repo

JerryZhou
  • 4,566
  • 3
  • 37
  • 60