Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/seibert-media/go-hangouts

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/seibert-media/go-hangouts

  • v0.0.0-20181026103319-e5da31b667a0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Google Hangouts Chat Library for Golang

Go Report Card GoDoc

Shortly after Hangouts Chat became publicly available, we built seibert-media/hangouts-jira-bot to try out how the bot connectivity works.

While doing this, one of our first steps was to build this mapping to easily create messages. As we are now aiming to try out building more bots and integrating Chat into our tool landscape it became reasonable to offer this as a standalone library which is well documented.

In addition to this, we added further helpers to easily build messages available in builder.go.

Requirements

All dependencies are managed using dep and checked into git. To update those dependencies use dep ensure --update after you added new imports to your code.

For building or running tests a onetime execution of make deps might be required.

Usage

For now, this package only offers sending messages. To receive messages and events, we suggest using PubSub. This implementation might be added here in the future but is out of scope for now. To learn how to do this, check the official docs or give our jira bot a look.

This package offers both a default connection using Google Service Accounts and sending messages via channel webhooks.

The entire connection Part relies on github.com/playnet-public/libs/log for logging. If you are not using Zap and are an external user, you could simply use log.NewNop() when initializing the connection to get an empty no-op logger.

Service Account

To send messages using a service account, use New(...) which is using the Google DefaultClient for taking credential as described here.

To send messages onto a webhook use NewWebhookClient(...).

Afterwards you can simply use Send(...) to post your messages. Check out code comments for further information on how to use this.

Examples

FAQs

Package last updated on 26 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc