Created
October 1, 2011 11:49
-
-
Save davidhund/1255933 to your computer and use it in GitHub Desktop.
Create a Gist (of 2 files) through the GitHub API with cUrl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a Gist (of 2 files) through the GitHub API | |
# ..uses cUrl but could of course also be done through PHP etc. | |
curl -H "Content-Type: application/json" -d '{"description": "Your XPATHr Gist test","public": true,"files": {"test.xml": {"content": "Paste your XML code.."},"test.xsl": {"content": "Paste your XSL code here.."}}}' 'https://api.github.com/gists' |
$ curl -H "Content-Type: application/json" -d '{"description": "Your XPATHr Gist test","public": true,"files": {"test.xml": {"content": "Paste your XML code.."},"test.xsl": {"content": "Paste your XSL code here.."}}}' 'https://api.github.com/gists'
{
"message": "Requires authentication",
"documentation_url": "https://docs.github.com/rest/reference/gists#create-a-gist"
}
$
Had we instead created a new gist, then we would see it at: https://gist.github.com/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, Alpacaaa [sh|c]ould integrate this on http://alpacaaa.net/xpathr/