GithubHelp home page GithubHelp logo

abordin / hangouts-chat-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googleworkspace/google-chat-samples

0.0 2.0 0.0 562 KB

Chat Bot Samples for Hangouts Chat.

Home Page: https://developers.google.com/hangouts/chat/concepts/bots

License: Apache License 2.0

JavaScript 8.19% Java 27.58% HTML 3.85% Python 60.38%

hangouts-chat-samples's Introduction

Hangouts Chat code samples

This repository contains the code samples for Hangouts Chat bots. There are folders of samples dependent on language and platform. Generally the Java and Python samples live in each respective directory, but JavaScript has multiple form factors (client-side, server-side/Node.js, Google Apps Script [also server side], and Cloud Functions [GCP or Firebase]).

Which JS platform you choose depends on the type of bot application you're using/writing. Apps Script features tighter integration with G Suite data and applications, while Google Cloud Functions has a tighter integration with Google Cloud Platform services and APIs. Finally, mobile apps or mobile web apps are more likely to want to take advantage of Cloud Functions for Firebase. It is also generally straightforward to port from one JS implementation to another, for example, to Node.js.

In each folder, you can find a language-specific implementation of the one or more of the following code samples:

  • Basic bot: This bot receives event notices and messages from Hangouts Chat and responds synchronously with simple text responses. This sample demonstrates how to create an HTTP endpoint bot using Google App Engine.
  • Basic async bot: This bot receives event notices and messages from Hangouts Chat and responds asynchronously with simple text responses. The responses will appear in the same thread that raised the original event or message. This sample is an HTTP endpoint bot built upon Google App Engine.
  • Pub/Sub bot: This bot uses Google Cloud Pub/Sub to receive messages from Hangouts Chat. The bot responds back to Hangouts Chat asynchronously.
  • Card bot: This bot receives event notices and messages from Hangouts Chat and responds synchronously with a card-formatted response. This sample is an HTTP endpoint bot built upon Google App Engine.
  • Vote bot: This bot demonstrates updating interactive cards by providing a platform whereby users can vote on topics, such as who can do lunch today, who wants to play ball at lunch, etc. Samples can feature images or be text-only.

For additional details about how to set up and run each sample, consult the README file included with the sample.

Note: The Hangouts Chat application, and the developer platform, are only available to G Suite accounts. You will not be able to develop or test a bot with an @gmail.com account.

Contributing changes

See CONTRIBUTING.md.

Licensing

This is not an official product.

This library is licensed under Apache 2.0. Full license text is available in LICENSE.

hangouts-chat-samples's People

Contributors

ahezarkhani avatar barathwaja avatar bareinhard avatar dannyzen avatar grant avatar lmp3d avatar romaindutartre avatar telpirion avatar wescpy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.