code: function createResource(spec) {
      var subResources = spec.has ? __slice.call(spec.has) : null
        , resource = function(/* ..., cb */) {
            var args = __slice.call(arguments)
              , lastArgIsCallback = typeof args[args.length - 1] === 'function'
              , cb = lastArgIsCallback ? args.pop() : null
              , result = spec.constructor.apply(this, args)
  
            if (typeof cb === 'function') {
              this.fetch(cb)
            }
  
            return result
          }
  
      inherits(resource, Resource)
  
      if (subResources) {
        subResources.forEach(function(thing) {
          var fnName = 'fetch' + toTitleCase(thing)
          resource.prototype[fnName] = function(cb) {
            return this.fetchSubResource(thing, cb)
          }
        })
      }
  
      return resource
    }
docs: Create a resource w/ Resource as the prototype.  spec: an object with the following properties:  - constructor: a constructor function - has: a list of resources belonging to this resource  Typically the constructor accepts one or more arguments specifying the name or pieces of info identifying the specific resource and used to build the URL to fetch it. It also accepts an optional callback as the last parameter.  The constructor must set the `path` property which is used to fetch the resource.  If a callback is provided then the resource is immediately fetched and the callback is threaded through to the `fetch` method. The callback function has the signature `function(err, data)`.  The `has` list specifies sub-resources, e.g. a user has repos, followers, etc. An organization has members.  Each related sub-resource gets a method named appropriately, e.g. the User resource has followers so User objects have a `fetchFollowers` method.