Sha256: 37b70e4493547a37becb0c8b2acc9234fc81116d2ab90765fdff44dc6032ea66

Contents?: true

Size: 1.12 KB

Versions: 62

Compression:

Stored size: 1.12 KB

Contents

/**
 *  class Github
 *
 *  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>
 **/

"use strict";

var Fs = require("fs");
var Util = require("./../../util");
var error = require("./../../error");

var GithubHandler = module.exports = function(client) {
    this.client = client;
    this.routes = JSON.parse(Fs.readFileSync(__dirname + "/routes.json", "utf8"));
};

var proto = {
    sendError: function(err, block, msg, callback) {
        if (this.client.debug)
            Util.log(err, block, msg.user, "error");
        if (typeof err == "string")
            err = new error.InternalServerError(err);
        if (callback)
            callback(err);
    }
};

["gists", "gitdata", "issues", "authorization", "orgs", "statuses", "pullRequests", "repos", "user", "events", "releases", "search", "markdown", "gitignore", "misc"].forEach(function(api) {
    Util.extend(proto, require("./" + api));
});

GithubHandler.prototype = proto;

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
trusty-festivity-extension-2.5.3 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.5.2 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.5.1 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.5.0 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.4.6 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.4.5 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.4.4 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.4.3 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.4.2 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.4.1 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.4.0 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.3.30 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.3.29 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.3.28 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.3.27 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.3.26 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.3.25 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.3.24 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.3.23 node_modules/bower/node_modules/github/api/v3.0.0/index.js
trusty-festivity-extension-2.3.22 node_modules/bower/node_modules/github/api/v3.0.0/index.js