GithubHelp home page GithubHelp logo

dototime's Introduction

dototime

GroupMe bot/Steam API integration

Configuration

Currently all configuration is managed by environment variables. These are the important keys; details about getting the values are below.

export STEAM_KEY=1234ABCD...
export STEAM_ENDPOINT=http://api.steampowered.com
export GROUPME_BOT_ID=1234abcd...
export GROUPME_ENDPOINT=https://api.groupme.com/v3/bots/post
export STEAM_IDS=1234,2345,3456,...

Personally I use direnv to manage environments--the above is a sample .envrc file placed in the project root.

Steam

STEAM_KEY

Register and get your own API key from Steam.

STEAM_IDS (optional)

Comma-delimited list of SteamIDs for the bot to follow (e.g., getting online/offline status).

You can get your own SteamID by logging in to Steam in a browser, then going to your profile. The link should look like: https://steamcommunity.com/profiles/12345678901234567/

If your profile is public, http://localhost:4567/12345678901234567 or http://doto.lidaka.us/12345678901234567 should show your friend list. From here you can readily get your friends' SteamIDs.

GroupMe

GROUPME_BOT_ID

Sign up for an access token on GroupMe, then either read the tutorial or directly create your bot. Also I've already created a test bot ID and GroupMe channel--please email me for details if you don't want to create your own just yet.

When creating your bot, the host for your callback URL should be publicly-accessible, with path /bot/callback; e.g., http://example.com/bot/callback.

Running

bundle install
bundle exec ruby lib/dototime/app.rb

Visit http://localhost:4567 for the web site.

To test the callback locally, simulate posted messages (more fields documented on GroupMe's tutorial): curl -X POST -d '{"text":"!help"}' -H 'Content-Type: application/json' http://localhost:4567/bot/callback

dototime's People

Contributors

alidaka avatar

Stargazers

Hanna Liebl avatar Ian Lunderskov avatar

Watchers

Ian Lunderskov avatar James Cloos avatar  avatar

Forkers

hannaliebl

dototime's Issues

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.