Sha256: 666c04e584f3ac87ee64527b3ac0c2dba596b2414b79a824f8443a57cde63465

Contents?: true

Size: 621 Bytes

Versions: 1

Compression:

Stored size: 621 Bytes

Contents

module Deadlinez
  class Api
    include HTTParty
    format :xml
    base_uri 'service.afterthedeadline.com'

    # Proxies any URL through to AtD. Useful for the TinyMCE
    # plugin.
    def self.proxy(path, params)
      proxy_params = Deadlinez::Proxy.strip_params(params)
      response = post(path,
                      :body => proxy_params,
                      :format => nil)
      response.body
    end

    def self.stats(data)
      response = post('/stats',
                     :body => {
                       :data => data
                     })
      response['scores']['metric']
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
deadlinez-0.1.0 lib/deadlinez/api.rb