BoyCook / TwitterJSClient

Twitter client written in JavaScript packaged as a node module
GNU General Public License v2.0
562 stars 176 forks source link

NPM repo is not in sync with Github repo #30

Open ORESoftware opened 8 years ago

ORESoftware commented 8 years ago

for example,

twitter.postMedia is not in the NPM repo

am I right?

ghost commented 8 years ago

yes you are. The nmp repo https://www.npmjs.com/package/twitter-node-client is outdated.

maiertech commented 7 years ago

@BoyCook Any plans to release an updated version?

davideoliveri-teamcmp commented 7 years ago

The npm package is still outdated.

The current master on GitHub has

function Twitter() {
    var configPath = "data/twitter_config";
    try {
        var config = process.env;

        this.consumerKey = config.twitterConsumerKey;
        this.consumerSecret = config.twitterConsumerSecret;
        this.accessToken = config.twitterAccessToken;
        this.accessTokenSecret = config.twitterAccessTokenSecret;
        this.callBackUrl = config.twitterCallBackUrl;
        this.baseUrl = 'https://api.twitter.com/1.1';
        this.oauth = new OAuth(
            'https://api.twitter.com/oauth/request_token',
            'https://api.twitter.com/oauth/access_token',
            this.consumerKey,
            this.consumerSecret,
            '1.0',
            this.callBackUrl,
            'HMAC-SHA1'
            );
    } catch (err) {
        //console.log(err)
        console.log("no 'data/twitter_config' file, continuing without...");
    }
}

whereas the nom package has

function Twitter(config) {
    this.consumerKey = config.consumerKey;
    this.consumerSecret = config.consumerSecret;
    this.accessToken = config.accessToken;
    this.accessTokenSecret = config.accessTokenSecret;
    this.callBackUrl = config.callBackUrl;
    this.baseUrl = 'https://api.twitter.com/1.1';
    this.oauth = new OAuth(
        'https://api.twitter.com/oauth/request_token',
        'https://api.twitter.com/oauth/access_token',
        this.consumerKey,
        this.consumerSecret,
        '1.0',
        this.callBackUrl,
        'HMAC-SHA1'
    );
}

I would have installed the package earlier if I knew the config file wasn't the only way to pass params to the function.