I am working with the GitHub GIST API. I came across raw_url
attribute which is given for each file in a gist. I wanted to what all the parameters in the URL mean.
Example raw_url
: https://gist.githubusercontent.com/algomaster99/d75743336c68306f242ea7ec846f55e9/raw/243230d8f9f80320d839db1f944ac7918ffdaa68/.block
https://gist.githubusercontent.com/
- Domain from where the file content is fetched.algomaster99
- User IDd75743336c68306f242ea7ec846f55e9
- GIST ID243230d8f9f80320d839db1f944ac7918ffdaa68
- I don't know what is this for exactly..block
- This is an optional parameter in URL. Works without it too.Can anyone please elaborate on points 4
and 5
?
Component 4 (243230d8f9f80320d839db1f944ac7918ffdaa68
) is the revision id, a gist can have multiple revisions so you need the id to point out which revision you want to fetch.
Component 5 (.block
) is simply the name of the file in the gist that you want to fetch. I'm not sure why the .block
file is retrieved even if you omit it from the path, it could be that the first file is returned when no name is given.