Project

bwcli

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A CLI interface to interact with the Brandwatch v2 API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.9.12.2
~> 2.13.0

Runtime

~> 1.0.6
~> 2.0.5
~> 0.18.1
 Project Readme

Gem Version Dependency Status Code Climate

bwcli

PLEASE NOTE THAT THIS PROJECT IS NOT OFFICIALLY SUPPORTED BY BRANDWATCH

A command line interface to interact with the Brandwatch API

Documentation

http://rubydoc.info/gems/bwcli/

Getting Started

In order to interact with the BWAPI from the command line we first need to setup a current user in the .bwcli config file. Please note that the config file enables us to hold multiple users which we can easily switch between.

Add new user to config

In order to use bwcli you need to have a .bwcli file in your root directory, don't worry I've got your back. When you create a new user the file will be created automatically. So, to get the show on the road add a user to your config file:

bwcli config add -u username@domain.com -p your_password -e enviroment

When you create a user for the first time bwcli will automatically set this user as your current user. When you add new users to your config, bwcli will ask whether you want to set this user as your current user.

View user config

Returns the users currently stored in the config file along with the current user if set.

bwcli config list

Set current user

Sets the user as the current user. The set or switch command can be used.

bwcli config set -u anotheruser@domain -e environment

Remove user

Removes the specific user from the config file, no warning is given.

bwcli config remove -u anotheruser@domain -e environment

View current user

Returns the current user set in the config file.

bwcli config user

Authenticate current user

Please note that when ever you make a request to an endpoint bwcli will ensure you are authenticated with brandwatch so the login command doesn't need to run everytime.

bwcli config login

Reset user config

Wipe your config file and restart, warning is given and the user must respond with a yes or y to confirm.

bwcli config reset

Next Steps

Once you have your current user setup you can make API requests to Brandwatch. Currently at present only the me and projects endpoint are implemented.

Me Endpoint

Returns user information.

bwcli me

All Projects

Returns all projects the user currently has shared.

bwcli projects

Specific Projects

Returns the specific project specified, user must pass option for -i parameter.

bwcli projects -i 12345678

Feedback

I would be more than happy to recieve feedback, please email me at: jonathan.chrisp@gmail.com or jonathan@brandwatch.com