-
Notifications
You must be signed in to change notification settings - Fork 615
CodeHub x callback url API
The following is a document outlining the support for x-callback-url actions CodeHub currently implements. Currently, the application operates on the details described in the 1.0 DRAFT Spec found on the x-callback-url website.
The registered URL schema for CodeHub is codehub://
Per the 1.0 Spec, the URL format implemented in CodeHub follows:
codehub://x-callback-url/[action]?[x-callback parameters]&[action parameters]
All x-callback-parameters are support except for x-source
which is not used within CodeHub (yet) and is silently ignored. The action is defined below and the action parameters are specific to the action, also defined below.
The following lists the current actions available via x-callback. This list is not permanant and will be extended as user's request additional support.
This action will create a new Gist on github.com
/gist/create
- description: A string description of the Gist. Default is empty
- public: A boolean value indicating whether the gist is public or not. Default is false.
- fileN: This parameter can be defined multiple times. The "N" in the name is a placeholder for a unique name for the file. The value of the argument is the content of the file
The following example will create a public Gist with a description of "Hello" and two files.
codehub://x-callback-url/gist/create?description=Hello&public=true&file1=This%20is%20file%20one&file2=CodeHub%20Rocks