def level_items_list(type, levels)
      levels = levels.join(',') if levels.is_a?(Array)
      response = api_response(type, levels)

      # The vocabulary API call without specifying levels returns a Hash instead
      # of an Array, so this is a hacky way of dealing with it.
      if response["requested_information"].is_a?(Hash)
        return response["requested_information"]["general"]
      else
        return response["requested_information"]
      end
    end
def level_items_list(type, levels)
      levels = levels.join(',') if levels.is_a?(Array)
      response = api_response(type, levels)

      # The vocabulary API call without specifying levels returns a Hash instead
      # of an Array, so this is a hacky way of dealing with it.
      if response["requested_information"].is_a?(Hash)
        return response["requested_information"]["general"]
      else
        return response["requested_information"]
      end
    end
Fetches the specified item type list from WaniKani's API

 @param type [String] The type of item to fetch.
 @param levels [Integer, Array<Integer>] a specific level or array of
   levels to fetch items for.
 @return [Hash] list of items of the specified type and levels.