Skip to content

Instantly share code, notes, and snippets.

@d6rkaiz d6rkaiz/gist:826259
Created Feb 14, 2011

Embed
What would you like to do?
lingr api bot post sample.
#-*- coding: utf-8 -*-
require 'rubygems'
require 'uri'
require 'digest/sha1'
require 'curb'
bot_id=BOT_ID
bot_secret=BOT_SECRET
sayroom=SAYROOM
text='post test'
verifier=Digest::SHA1.hexdigest(bot_id+bot_secret)
sayurl="http://lingr.com/api/room/say?room=#{sayroom}&bot=#{bot_id}&text=#{URI.escape(text)}&bot_verifier=#{verifier}"
c = Curl::Easy.new(sayurl)
c.perform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.