A Node.JS module, which provides an object oriented wrapper for the GitHub v3 API.
Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
A Node.JS module, which provides an object oriented wrapper for the GitHub v3 API.
Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer mike@c9.io
Client can load any version of the [[github]] client API, with the
requirement that a valid routes.json definition file is present in the
api/[VERSION] directory and that the routes found in this file are
implemented as well.
Upon instantiation of the Client class, the routes.json file is loaded from the API version specified in the configuration and, parsed and from it the routes for HTTP requests are extracted. For each HTTP endpoint to the HTTP server, a method is generated which accepts a Javascript Object with parameters and an optional callback to be invoked when the API request returns from the server or when the parameters could not be validated.
When an HTTP endpoint is processed and a method is generated as described above, Client also sets up parameter validation with the rules as defined in the routes.json. A full example that illustrates how this works is shown below:
First, we look at a listing of a sample routes.json routes definition file:
{
"defines": {
"constants": {
"name": "Github",
"description": "A Node.JS module, which provides an object oriented wrapper for the GitHub v3 API.",
"protocol": "https",
"host": "api.github.com",
"port": 443,
"dateFormat": "YYYY-MM-DDTHH:MM:SSZ",
"requestFormat": "json"
},
"response-headers": [
"X-RateLimit-Limit",
"X-RateLimit-Remaining",
"Link"
],
"params": {
"files": {
"type": "Json",
"required": true,
"validation": "",
"invalidmsg": "",
"description": "Files that make up this gist. The key of which should be a required string filename and the value another required hash with parameters: 'content'"
},
"user": {
"type": "String",
"required": true,
"validation": "",
"invalidmsg": "",
"description": ""
},
"description": {
"type": "String",
"required": false,
"validation": "",
"invalidmsg": "",
"description": ""
},
"page": {
"type": "Number",
"required": false,
"validation": "^[0-9]+$",
"invalidmsg": "",
"description": "Page number of the results to fetch."
},
"per_page": {
"type": "Number",
"required": false,
"validation": "^[0-9]+$",
"invalidmsg": "",
"description": "A custom page size up to 100. Default is 30."
}
}
},
"gists": {
"get-from-user": {
"url": ":user/gists",
"method": "GET",
"params": {
"$user": null,
"$page": null,
"$per_page": null
}
},
"create": {
"url": "/gists",
"method": "POST",
"params": {
"$description": null,
"public": {
"type": "Boolean",
"required": true,
"validation": "",
"invalidmsg": "",
"description": ""
},
"$files": null
}
}
}
}
You probably noticed that the definition is quite verbose and the decision for its design was made to be verbose whilst still allowing for basic variable definitions and substitions for request parameters.
There are two sections; 'defines' and 'gists' in this example.
The defines section contains a list of constants that will be used by the
Client to make requests to the right URL that hosts the API.
The gists section defines the endpoints for calls to the API server, for
gists specifically in this example, but the other API sections are defined in
the exact same way.
These definitions are parsed and methods are created that the client can call
to make an HTTP request to the server.
there is one endpoint defined: .
In this example, the endpoint gists/get-from-user will be exposed as a member
on the Client object and may be invoked with
client.getFromUser({
"user": "bob"
}, function(err, ret) {
// do something with the result here.
});
// or to fetch a specfic page:
client.getFromUser({
"user": "bob",
"page": 2,
"per_page": 100
}, function(err, ret) {
// do something with the result here.
});
All the parameters as specified in the Object that is passed to the function
as first argument, will be validated according to the rules in the params
block of the route definition.
Thus, in the case of the user parameter, according to the definition in
the params block, it's a variable that first needs to be looked up in the
params block of the defines section (at the top of the JSON file). Params
that start with a $ sign will be substituted with the param with the same
name from the defines/params section.
There we see that it is a required parameter (needs to hold a value). In other
words, if the validation requirements are not met, an HTTP error is passed as
first argument of the callback.
Implementation Notes: the method is NOT case sensitive, whereas url is.
The url parameter also supports denoting parameters inside it as follows:
"get-from-user": {
"url": ":user/gists",
"method": "GET"
...
}
Object containing the authentication type and credentials
One of the following: basic or oauth
Github username
Password to your account
OAuth2 token
Set an authentication method to have access to protected resources.
// basic
github.authenticate({
type: "basic",
username: "mikedeboertest",
password: "test1324"
});
// or oauth
github.authenticate({
type: "oauth",
token: "e5a4a27487c26e571892846366de023349321a73"
});
response of a request or the contents of the Link header
function to call when the request is finished with an error as first argument and result data as second argument.
Get the first page, based on the contents of the Link header
response of a request or the contents of the Link header
function to call when the request is finished with an error as first argument and result data as second argument.
Get the last page, based on the contents of the Link header
response of a request or the contents of the Link header
function to call when the request is finished with an error as first argument and result data as second argument.
Get the next page, based on the contents of the Link header
response of a request or the contents of the Link header
function to call when the request is finished with an error as first argument and result data as second argument.
Get the previous page, based on the contents of the Link header
response of a request or the contents of the Link header
Check if a request result contains a link to the first page
response of a request or the contents of the Link header
Check if a request result contains a link to the last page
response of a request or the contents of the Link header
Check if a request result contains a link to the next page
response of a request or the contents of the Link header
Check if a request result contains a link to the previous page
parameters to send as the request body
parameter definition from the routes.json file that
contains validation rules
function to be called when the request returns. If the the request returns with an error, the error is passed to the callback as its first argument (NodeJS-style).
Send an HTTP request to the server and pass the result to a callback.
Configures the routes as defined in a routes.json file of an API version
Client#setupRoutes is invoked by the constructor, takes the contents of the JSON document that contains the definitions of all the available API routes and iterates over them.
It first recurses through each definition block until it reaches an API
endpoint. It knows that an endpoint is found when the url and param
definitions are found as a direct member of a definition block.
Then the availability of an implementation by the API is checked; if it's
not present, this means that a portion of the API as defined in the routes.json
file is not implemented properly, thus an exception is thrown.
After this check, a method is attached to the Client instance
and becomes available for use. Inside this method, the parameter validation
and typecasting is done, according to the definition of the parameters in
the params block, upon invocation.
This mechanism ensures that the handlers ALWAYS receive normalized data that is of the correct format and type. JSON parameters are parsed, Strings are trimmed, Numbers and Floats are casted and checked for NaN after that.
Note: Query escaping for usage with SQL products is something that can be implemented additionally by adding an additional parameter type.
Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:name - String of the name of the author of the tag, email - String of the email of the author of the tag, date - Timestamp of when this object was tagged Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer mike@c9.io
Returns a JSON object representation of the error.
Returns the stringified version of the error (i.e. the message).
Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^(open|closed)$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.^(open|closed)$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^(all|assigned|created|mentioned|subscribed)$.^(open|closed)$.^(created|updated|comments)$.^(asc|desc)$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^(open|closed)$.^(due_date|completeness)$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^(created|updated)$.^(asc|desc)$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^([0-9]+|none|\*)$.^(open|closed)$.none for Issues with no assigned User. * for Issues with any assigned User. ^(created|updated|comments)$.^(asc|desc)$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^(open|closed)$.Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:markdown to render a document as plain Markdown, just like README files are rendered. gfm to render a document as user-content, e.g. like user comments or issues are rendered. In GFM mode, hard line breaks are always taken into account, and issue and user mentions are linked accordingly. Validation rule: ^(markdown|gfm)$.gfm Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:pull - team members can pull, but not push or administer this repositories (Default), push - team members can pull and push, but not administer this repositores, admin - team members can pull, push and administer these repositories. Validation rule: ^(pull|push|admin)$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:pull - team members can pull, but not push or administer this repositories (Default), push - team members can pull and push, but not administer this repositores, admin - team members can pull, push and administer these repositories. Validation rule: ^(pull|push|admin)$.Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^(open|closed)$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^(open|closed)$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:1 for true, and 0 for false. Any JSON true/false values will be converted automatically. ['push']. Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:all, owner, public, private, member. Default: all. Validation rule: ^(all|owner|public|private|member)$.created, updated, pushed, full_name. Default: full_name. Validation rule: ^(created|updated|pushed|full_name)$.^(asc|desc)$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^(tarball|zipball)$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:newest, oldest, watchers, default: newest. Validation rule: ^(newest|oldest|watchers)$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:all, public, member. Default: all. Validation rule: ^(all|public|member)$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:all, owner, member. Default: public. Validation rule: ^(all|owner|member)$.created, updated, pushed, full_name. Default: full_name. Validation rule: ^(created|updated|pushed|full_name)$.^(asc|desc)$.^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:1 for true, and 0 for false. Any JSON true/false values will be converted automatically. ['push']. Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^(open|closed)$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^(pending|success|error|failure)$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer info@mikedeboer.nl
Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:{}Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:{}Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:{}Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:^[0-9]+$.^[0-9]+$.Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Object that contains the parameters and their values to be sent to the server.
function to call when the request is finished with an error as first argument and result data as second argument.
msg object:Copyright 2012 Cloud9 IDE, Inc.
This product includes software developed by Cloud9 IDE, Inc (http://c9.io).
Author: Mike de Boer mike@c9.io
string to escape
Escapes characters inside a string that will an error when it is used as part
of a regex upon instantiation like in new RegExp("[0-9" + str + "]")
destination object
source object
set to true to overwrite values in src
Shallow copy of properties from the src object to the dest object. If the
noOverwrite argument is set to to true, the value of a property in src
will not be overwritten if it already exists.
value the variable to check. Possible values: false The function returns true. 'false' The function returns true. 'off' The function returns true. 0 The function returns true. '0' The function returns true.
Determines whether a string is false in the html attribute sense.
value the variable to check. Possible values: true The function returns true. 'true' The function returns true. 'on' The function returns true. 1 The function returns true. '1' The function returns true.
Determines whether a string is true in the html attribute sense.
messages to be printed to the standard output
type denotation of the message. Possible values: 'info', 'error', 'fatal', 'exit'. Optional, defaults to 'info'.
Unified logging to the console; arguments passed to this function will put logged to the standard output of the current process and properly formatted. Any non-String object will be inspected by the NodeJS util#inspect utility function. Messages will be prefixed with its type (with corresponding font color), like so:
[info] informational message
[error] error message
[fatal] fatal error message
[exit] program exit message (not an error)
The type of message can be defined by passing it to this function as the last/ final argument. If the type can not be found, this last/ final argument will be regarded as yet another message.
string to transform
set to true to transform to CamelCase
Transform a string that contains spaces or dashes to camelCase. If upper is
set to true, the string will be transformed to CamelCase.
Example:
Util.toCamelCase("why U no-work"); // returns 'whyUNoWork'
Util.toCamelCase("I U no-work", true); // returns 'WhyUNoWork'