Giter Club home page Giter Club logo

dimma's Introduction

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.

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.