lib/backchat-client.rb
##
# Retrieves a specific channel or all the channels associated to the api_key
# ==== Return
# * one or more channel data
# * nil if unable to retrieve valid data
Retrieves a specific channel or all the channels associated to the api_key
Return
one or more channel data
nil if unable to retrieve valid data
Retrieves a specific channel or all the channels associated to the api_key Return one or more channel data nil if unable to retrieve valid data
def find_channel
      channels = channel.find
      if channels.respond_to?("has_key?") and channels.has_key?("data")
        channels["data"]
      else
        logger.info("Unable to find channels")
        nil
      end
    end
def find_channel channels = channel . find if channels . respond_to? ( "has_key?" ) and channels . has_key? ( "data" ) channels [ "data" ] else logger . info ( "Unable to find channels" ) nil end end
Retrieves a specific channel or all the channels associated to the api_key
 Return
 one or more channel data
 nil if unable to retrieve valid data
Retrieves a specific channel or all the channels associated to the api_key Return one or more channel data nil if unable to retrieve valid data
# check that the data has the expected format