module DisqusApi
Constants
- VERSION
Public Class Methods
adapter()
click to toggle source
# File lib/disqus_api.rb, line 18 def self.adapter @adapter || Faraday.default_adapter end
adapter=(value)
click to toggle source
# File lib/disqus_api.rb, line 22 def self.adapter=(value) @adapter = value end
config()
click to toggle source
@return [ActiveSupport::HashWithIndifferentAccess]
# File lib/disqus_api.rb, line 27 def self.config @config || {} end
config=(config)
click to toggle source
@param [Hash] config @option config [String] :api_secret @option config [String] :api_key @option config [String] :access_token
# File lib/disqus_api.rb, line 35 def self.config=(config) @config = ActiveSupport::HashWithIndifferentAccess.new(config) end
init(version)
click to toggle source
@param [String] version @return [Api]
# File lib/disqus_api.rb, line 41 def self.init(version) Api.new(version, YAML.load_file(File.join(File.dirname(__FILE__), "apis/#{version}.yml"))) end
stub_requests(&block)
click to toggle source
# File lib/disqus_api.rb, line 45 def self.stub_requests(&block) stubbed_requests = Faraday::Adapter::Test::Stubs.new(&block) DisqusApi.adapter = [:test, stubbed_requests] end
v3()
click to toggle source
@return [Api]
# File lib/disqus_api.rb, line 51 def self.v3 @v3 ||= init('3.0') end