lib/chatrix/matrix.rb
def make_options(params, content, headers = {})
      { headers: headers }.tap do |o|
        o[:query] = @access_token ? { access_token: @access_token } : {}
        o[:query].merge!(params) if params.is_a? Hash
        o.merge! make_body content
      end
    end
# Create an options Hash to pass to a server request.
#
# This method embeds the {#access_token access_token} into the
# query parameters.
#
# @param params [Hash{String=>String},nil] Query parameters to add to
#   the options hash.
# @param content [Hash,#read,nil] Request content. Can be a hash,
#   stream, or `nil`.
# @return [Hash] Options hash ready to be passed into a server request.
Create an options Hash to pass to a server request.
This method embeds the {#access_token access_token} into the
query parameters.
Create an options Hash to pass to a server request . This method embeds the { #access_token access_token } into the query parameters .
def make_options(params, content, headers = {})
      { headers: headers }.tap do |o|
        o[:query] = @access_token ? { access_token: @access_token } : {}
        o[:query].merge!(params) if params.is_a? Hash
        o.merge! make_body content
      end
    end
def make_options ( params , content , headers = { } ) { headers : headers } . tap do | o | o [ :query ] = @access_token ? { access_token : @access_token } : { } o [ :query ] . merge! ( params ) if params . is_a? Hash o . merge! make_body content end end
Create an options Hash to pass to a server request.
Create an options Hash to pass to a server request .
Options hash ready to be passed into a server request.
Options hash ready to be passed into a server request .
Hash
params
Query parameters to add to the options hash.
Query parameters to add to the options hash .
content
Request content. Can be a hash, stream, or `nil`.
Request content . Can be a hash stream or ` nil ` .
headers