Class: CPEE::Callbacks::GetCallback
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- CPEE::Callbacks::GetCallback
- Defined in:
- lib/cpee/implementation_callbacks.rb
Overview
}}}
Instance Method Summary collapse
-
#response ⇒ Object
{{{.
Instance Method Details
#response ⇒ Object
{{{
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/cpee/implementation_callbacks.rb', line 48 def response id = @a[0] opts = @a[1] callback = @r[-1] if opts[:redis].sismember("instance:#{id}/callbacks",callback) res = {} res[:uuid] = opts[:redis].get("instance:#{id}/callback/#{callback}/uuid") res[:type] = opts[:redis].get("instance:#{id}/callback/#{callback}/type") res[:position] = opts[:redis].get("instance:#{id}/callback/#{callback}/position") res[:label] = opts[:redis].get("instance:#{id}/callback/#{callback}/label") if sub = opts[:redis].get("instance:#{id}/callback/#{callback}/subscription") res[:subscription] = sub end Riddl::Parameter::Complex.new("callback","application/json",JSON.generate(res)) else @status = 404 end end |