/**
* @license Apache-2.0
*
* Copyright (c) 2021 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

/**
* Star a repository.
*
* @module @stdlib/_tools/github/star-repo
*
* @example
* var star = require( '@stdlib/_tools/github/star-repo' );
*
* var opts = {
*     'token': 'tkjorjk34ek3nj4!'
* };
*
* star( 'stdlib-js/stdlib', opts, clbk );
*
* function clbk( error, info ) {
*     // Check for rate limit information...
*     if ( info ) {
*         console.error( 'Limit: %d', info.limit );
*         console.error( 'Remaining: %d', info.remaining );
*         console.error( 'Reset: %s', (new Date( info.reset*1000 )).toISOString() );
*     }
*     if ( error ) {
*         throw new Error( error.message );
*     }
*     console.log( 'Success!' );
* }
*/

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
var star = require( './main.js' );
var factory = require( './factory.js' );


// MAIN //

setReadOnly( star, 'factory', factory );


// EXPORTS //

module.exports = star;
