module Mopidy
Constants
- VERSION
Attributes
configuration[RW]
Public Class Methods
configure() { |configuration| ... }
click to toggle source
# File lib/mopidy.rb, line 17 def self.configure self.configuration ||= Configuration.new yield configuration end
format_json(id, method, params = {})
click to toggle source
# File lib/mopidy.rb, line 32 def self.format_json(id, method, params = {}) { 'jsonrpc': '2.0', 'id': id, 'method': method, 'params': params }.to_json end
post(body)
click to toggle source
# File lib/mopidy.rb, line 41 def self.post(body) headers = { 'Content-Type' => 'application/json' } res = Http.post(configuration.mopidy_url, body, headers) end