1.0.1 • Published 7 years ago

travis-tweet-update v1.0.1

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
7 years ago

Tweet Build Update Build Status

Tweet out when a successful update/roll out has been released.

This is ideally run after travis or your build system.

Install

  npm install travis-tweet-update

Usage

const tweet = require('travis-tweet-update');

  console.log(tweet.post());
  // Returns an object with success or failure.

Twitter API Keys

In the config for this module. You will need to set env variables for twitter.

module.exports = {
  consumer_key: process.env.TWITTER_CONSUMER_KEY,
  consumer_secret: process.env.TWITTER_CONSUMER_SECRET,
  access_token_key: process.env.TWITTER_ACCESS_TOKEN_KEY,
  access_token_secret: process.env.TWITTER_ACCESS_TOKEN_SECRET
};

API

post(object)

Returns a object on success or failure to tweet.

Success

{
  url: `https://twitter.com/${username}/status/${tweetId}`,
  message: 'success'
}

Failure

{
  url: '',
  message: '{reason here}'
}

object

Type: Object

let object = {
  version: 1, // Init Version number or the update
  name: 'api docs', // Name of the project
  tweet: 'message', // Tweet
  link: 'link' // Link to blog, website or update.
};

License

MIT © Robert James Gabriel

1.0.1

7 years ago

1.0.0

7 years ago

0.5.0

7 years ago