lib/deadlinez/api.rb in deadlinez-0.0.3 vs lib/deadlinez/api.rb in deadlinez-0.1.0
- old
+ new
@@ -7,29 +7,19 @@
# 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,
- :query => { :key => Deadlinez.api_key },
:body => proxy_params,
:format => nil)
response.body
end
def self.stats(data)
- response = get('/stats',
- :query => {
- :data => data,
- :key => Deadlinez.api_key
+ response = post('/stats',
+ :body => {
+ :data => data
})
response['scores']['metric']
- end
-
- def self.verify(key = Deadlinez.api_key)
- response = get('/verify',
- :query => {
- :key => key
- })
- response.body.strip == 'valid'
end
end
end