lib/yammer/client.rb in yammer-client-0.1.4 vs lib/yammer/client.rb in yammer-client-0.1.5
- old
+ new
@@ -2,10 +2,11 @@
require 'yammer/configurable'
require 'yammer/http_adapter'
module Yammer
class Client
+
include Yammer::Configurable
include Yammer::Api::User
include Yammer::Api::Group
include Yammer::Api::GroupMembership
include Yammer::Api::Message
@@ -32,30 +33,26 @@
end
instance_variable_set(:"@#{key}", value)
end
end
- # (see #request)
- # @note makes a GET request
+ # makes a GET request
def get(path, params={})
request(:get, path, params)
end
- # (see #request)
- # @note makes a PUT request
+ # makes a PUT request
def put(path, params={})
request(:put, path, params)
end
- # (see #request)
- # @note makes a POST request
+ # makes a POST request
def post(path, params={})
request(:post, path, params)
end
- # (see #request)
- # @note makes a DELETE request
+ # makes a DELETE request
def delete(path, params={})
request(:delete, path, params)
end
private
@@ -70,10 +67,9 @@
# Makes an HTTP request using the provided parameters
# @raise [Yammer::Error::Unauthorized]
# @param method [string]
# @param path [string]
# @param params [Hash]
- # @param opts [Hash]
# @return [Yammer::ApiResponse]
# @!visibility private
def request(method, path, params={})
@headers['Authorization'] ||= "Bearer #{@access_token}"
result = http_client.send_request(method, path, {