سؤال

I can get as far as finding the JSON for the specific repository I'm trying to target but I'm having trouble finding the raw url's of the files. Does the API have access to this data?

I read the API Documentation. It talked specifically about media types for the raw url's. I thought though, after trying to go through the Repositories documentation that maybe it was the Git Data section that might have the answer.

I also referenced this StackOverflow question. I just can't seem to figure it out. I just need to find the JSON array and then I'll be able to pull out what I need. Any help?

هل كانت مفيدة؟

المحلول

As illustrated in this Go-GiThub project, a media type wouldn't be part of a JSON struct.
It would be part of the request headers:
See github/github.go:

mediaTypeV3      = "application/vnd.github.v3+json"
req.Header.Add("Accept", mediaTypeV3)

In your case: application/vnd.github.v3.raw

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top