Giter Club home page Giter Club logo

hubot-untappd-friends's Introduction

Untappd Friends for Hubot

npm version Node CI

Get the latest check-ins from your Untappd friends.

Getting Started

Note

As of January 2024, the Untappd API is still not accepting new applications. ๐Ÿ˜ข

You will first need to go through the process of applying for an API key. This can take anywhere from 2-3 weeks, and you will need to explain for what you intend to use the API key. You can send a link to this page and say you want to use this package.

From here, it can be a little frustrating. Take a look at the documentation. It uses an OAuth1 workflow to send data back the specified endpoint, which you then need to exchange again to get an access token. Postman is a great tool to generate the UNTAPPD_API_ACCESS_TOKEN by plugging in your API credentials.

Installation

In your hubot repository, run:

npm install hubot-untappd-friends --save

Then add hubot-untappd-friends to your external-scripts.json:

["hubot-untappd-friends"]

Configuration:

Variable Required? Description
UNTAPPD_API_KEY Yes Client ID for your integration
UNTAPPD_API_SECRET Yes Client Secret for your integration
UNTAPPD_API_ACCESS_TOKEN Yes OAuth 2.0 access token
UNTAPPD_MAX_COUNT No Number of beers to show; default: 5
UNTAPPD_MAX_DESCRIPTION_LENGTH No Where to truncate long descriptions, 0 to hide; default: 150
UNTAPPD_MAX_RANDOM_ID No Maximum value to use for random beer command

Commands:

  • hubot untappd - Recent friend activity
  • hubot untappd badges - Recent friends' badge activity
  • hubot untappd user <username> - Get stats about a particular user
  • hubot untappd beer random - Retrieve a random beer
  • hubot untappd beer <query|ID> - Get data about a particular beer
  • hubot untappd brewery <query> - Get data about a particular brewery
  • hubot untappd toast - Have the bot toast the most recent checkin from each user in activity feed
  • hubot untappd toast <username> - Have the bot toast user's most recent checkin
  • hubot untappd register - Instructions to register with the bot
  • hubot untappd approve - Approve all pending friend requests
  • hubot untappd friends - List the bot's friends
  • hubot untappd remove <username> - Remove a friend

hubot-untappd-friends's People

Contributors

bryanrossuk avatar dependabot-preview[bot] avatar dependabot[bot] avatar stahnma avatar stephenyeargin avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hubot-untappd-friends's Issues

Unable to install

Package poitnts to "node-untappd": "stephenyeargin/node-untappd#fix-for-pending-friends"
which doesn't appear to be resolvable from yarn or npm.

Show username instead of first name, review formatting for IRC vs. Slack

Some changes came through with #10 that altered the expected behavior for this package. If the bot knows many users named Chris, for example, it won't be clear which user had the beer.

[22:13:02] @crunchy:	Chris was drinking a Ron Mexico (IPA - American - 4.5%) by Russian River Brewing Company at Russian River Brewing Company - 7 minutes ago
[22:13:03] @crunchy:	Chris was drinking a 22nd Anniversary NE IPA (IPA - New England - 6.1%) by Third Street Aleworks (California) at Local Barrel - 37 minutes ago
[22:13:03] @crunchy:	Brandon was drinking a Figuers of Light (Pale Ale - American - 5.9%) by Riff Raff Brewing Co. at Riff Raff Brewing Co. - 2 hours ago
[22:13:03] @crunchy:	Brandon was drinking a Hopgoblin American IPA (IPA - American - 6.5%) by Riff Raff Brewing Co. at Riff Raff Brewing Co. - 2 hours ago

/cc @stahnma

Slack formatted messages

Hi,

Slack has some really nice options for displaying neatly formatted messages, including inline images. This would be a perfect fit for untappd, as we could then show the users avatar, pictures of the beer, or the badge they've earned. I'm sure other platforms like Hipchat, etc have their own method of doing the same.

Does anyone have any advice on how we could best format messages based on the adapter in use? I wouldn't want to break compatibility with anything. This sort of pluggable message format would seem like something that's a solved problem, but I've not found anything online yet.

Update node-untappd

Our version of node-untappd is out of date. There are some breaking changes to work through.

New 1.0.7 version reports errors on use.

Hi @stephenyeargin - sorry, the latest version 1.0.7 doesn't seem to work. Firstly, I'm fairly new to npm, so please excuse my ignorance.

I couldn't believe it was the change the environment variable name, so I had a look at the results of install 1.0.6 and 1.0.7 via npm to see if there was perhaps something that changed in the packaging.

The ./node_modules/hubot-untappd-friends/package.json seems to differ between 1.0.6 and 1.0.7 in a few ways:

  • _npmVersion changes from 1.4.23 to 3.10.9
  • The dependency of moment has moved from ~2.5.0 to ^2.18.1
  • The dependency of node-untappd has moved from ~0.3.1 to ~0.4.1

I'm going to guess that there's something in the new version of node-untappd that's not compatible with hubot-untappd-friends ?

The bot should applaude when you "run the board"

I've heard that "running the board" is some great feat, and yet when I've achieved this prestigious state of drunkenness, nothing happens.

I propose that if the last ten contiguous checkins are in the same location, the bot should applaude/salute/give $100 to all of the talented drinkers who sacrificed their livers for this achievement.

Spring Cleaning 2018

The following checklist is for all of the Hubot packages I maintain.

README.md

  • Badges (underneath title)
[![npm version](https://badge.fury.io/js/hubot-PACKAGE_NAME.svg)](http://badge.fury.io/js/hubot-PACKAGE_NAME) [![Build Status](https://travis-ci.org/stephenyeargin/hubot-PACKAGE_NAME.png)](https://travis-ci.org/stephenyeargin/hubot-PACKAGE_NAME)
  • Configuration options

package.json

  • author
  "author": "Stephen Yeargin <[email protected]>",
  • repository
  "repository": {
    "type": "git",
    "url": "git://github.com/stephenyeargin/hubot-PACKAGE_NAME.git"
  },
  • bugs
  "bugs": {
    "url": "https://github.com/stephenyeargin/hubot-PACKAGE_NAME/issues"
  },
  • peerDependencies
  "peerDependencies": {
    "hubot": ">=2 <10 || 0.0.0-development"
  },

Gruntfile.js

  • additionalFiles
        additionalFiles: ['package-lock.json']

.travis.yml

  • TravisCI configuration
language: node_js
sudo: false
notifications:
  email: false
node_js:
  - "8" # stable
  - "6" # LTS
  - "4" # maintenance
cache:
  directories:
- node_modules

Grammer error

When drinking a beer that starts with a vowel, the response still uses a vs an. While cosmetic, it bothers me. :)

slack_-_puppet

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.