Sha256: 926ad54fe7fb64032623558f3341550b23c19c521b798a509149ad4f4c6f5dc2
Contents?: true
Size: 771 Bytes
Versions: 1
Compression:
Stored size: 771 Bytes
Contents
require "omniauth-dailycred/version" require "omniauth/strategies/dailycred" require "middleware/middleware" class Dailycred attr_accessor :client_id, :secret_key def initialize(client_id, secret_key="") @client_id = client_id @secret_key = secret_key end URL = "https://www.dailycred.com" def event(user_id, key, val="") connection = Faraday::Connection.new Dailycred::URL, :ssl => { :ca_file => "/opt/local/share/curl/curl-ca-bundle.crt" } opts = { :client_id => @client_id, :client_secret => @secret_key, :key => key, :valuestring => val, :user_id => user_id } connection.post "/admin/api/customevent.json", opts end end module Omniauth module Dailycred # Your code goes here... end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dailycred-0.1.0 | lib/dailycred.rb |