Project

dimma

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A Ruby library for the Beacon REST API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.0.0
~> 2.0
>= 0

Runtime

 Project Readme

What is Dimma?

Dimma is a Ruby library aimed to create a simple interface to Beacons REST API, built on top of the sweet REST Client.

How do I use it?

Excellent question! This is how:

# Set up the session.
beacon = Dimma.new(API_KEY, SECRET_KEY)
    
# Send a message to all users in the default channel.
beacon.message "We now have a total of #{beacon.users} users online!"

# Send a message to all users in the “chunky” channel.
chunky = beacon.channel "chunky"
chunky.message "Chunky bacon!"
# Spit out all the channel users in the “chunky” channel.
chunky.message "Current users in “chunky” channel: #{chunky.users.map(&:name).join ', '}"

# Send a message to a specific user if she is online.
candy = beacon.user "godisnappen88"
candy.message 'A/S/L?' if candy.online?

Really? Yeah, really! For more advanced usage I suggest you read the documentation.

Yeah, yeah… and installing it?

There are several alternatives! Far easiest is if you are using Rubygems: gem install dimma.

If you are not I assume you know what you are doing.

Miscellaneous notes

  • Dimma uses Semantic Versioning as of version v1.0.0!
  • Dimma is completely rubygems agnostic — it assumes all required libraries are available, but does not care how.