Class: Orange::CloudResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/orange-more/cloud/resources/cloud_resource.rb

Constant Summary collapse

ORANGE_PING_KEY =
"c99550a0430eb9054eb4b7ee290664cf"

Instance Method Summary collapse

Instance Method Details

#microblog(packet, status, opts = {}) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/orange-more/cloud/resources/cloud_resource.rb', line 12

def microblog(packet, status, opts = {})
  params = {    :api_key => options[:ping_fm_app_key] || ORANGE_PING_KEY, 
                :user_app_key => options[:ping_fm_key], 
                :post_method => "microblog",
                :body => status}.merge(opts)
  # Thread.new {
  xml_result = RestClient.post("http://api.ping.fm/v1/user.post", params) if params[:user_app_key]
end

#stack_initObject



7
8
9
10
# File 'lib/orange-more/cloud/resources/cloud_resource.rb', line 7

def stack_init
  options[:ping_fm_key] = orange.options['ping_fm_key'] || false
  options[:ping_fm_app_key] = orange.options['ping_fm_app_key'] || false
end