Thursday, May 18, 2017

Use ballerina to extend your bash scripts capabilities

Ballerina provides a comprehensive collection of connectors that can be used to work with popular services such as twitter, gmail and facebook. They are easy to use and comes bundled in a lean distribution(what is 15mb these days?) When coupled with its integration excellence it can solve many integration challenges in a way that was not possible before.

Ballerina can also become a useful tool for DevOps engineers who welcome the challenge of learning a new language. The example below shows how a ballerina script that uses the twitter API can be embedded into a shell script. Similarly you can avail any one of the ballerina connectors listed here[1].

Execute the script as follows,

 ./ <consumerKey> <consumerSecret> <accessToken> <accessTokenSecret>

Look to the ballerina 0.8X twitter connector sample readme for further instructions. Find out more about ballerina here:

[1] -

Note: this example was written for ballerina 0.86 and may not work with other versions. 

No comments:

Post a Comment