function factory( options, clbk ) {
	var opts;
	var err;
	opts = merge( {}, defaults );
	err = validate( opts, options );
	if ( err ) {
		throw err;
	}
	if ( !isFunction( clbk ) ) {
		throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', clbk ) );
	}
	if (
		opts.token === void 0 &&
		opts.username === void 0
	) {
		throw new Error( 'invalid argument. Must provide a username or, to get a list of repositories an authenticated user is watching, an access token.' );
	}
	if ( opts.username ) {
		opts.pathname += 'users/' + opts.username + '/';
	} else {
		opts.pathname += 'user/';
	}
	opts.pathname += 'subscriptions';

	return request( opts, done );
	/**
	* Callback invoked after resolving resources.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {ObjectArray} data - query data
	* @param {Object} info - response info
	* @returns {void}
	*/
	function done( error, data, info ) {
		error = error || null;
		data = data || null;
		info = info || null;
		clbk( error, data, info );
	}
}
Returns a function for fetching a list of repositories a user is watching.

@param {Object} options - function options
@param {string} [options.token] - GitHub access token
@param {string} [options.username] - GitHub username
@param {string} [options.useragent] - user agent string
@param {Function} clbk - callback to invoke upon query completion
@throws {TypeError} callback argument must be a function
@throws {Error} must provide a username or an access token
@returns {Function} function for getting a list of watched repositories