Sha256: a2cf8e46a6b7ae6511e2ba7eebdc47a9f8bae7d5817da9ba8d6d644517a0fb0a

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

module Fanforce::API::Utils
  extend self
  def self.included(base) base.extend(self) end

  include Fanforce::Base::Utils

  def valid_fanforce_js_request?(params=@params)
    return false if !params.is_a?(Hash)
    return false if is_blank?(params[:organization_id]) or is_blank?(params[:api_key])
    return true
  end

  def valid_fanforce_request?(params=@params)
    return false if !params.is_a?(Hash)
    return false if is_blank?(params[:organization_id])
    return false if is_blank?(params[:app_id])
    return true
  end

  def valid_install_request?(params=@params)
    return false if !params.is_a?(Hash)
    return false if is_blank?(params[:organization_id])
    return false if is_blank?(params[:app_id])
    return false if is_blank?(params[:api_key])
    return true
  end

  def valid_uninstall_request?(params=@params)
    return false if !params.is_a?(Hash)
    return false if is_blank?(params[:organization_id])
    return false if is_blank?(params[:app_id])
    return false if is_blank?(params[:api_key])
    return true
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fanforce-api-1.0.5 lib/fanforce/api/utils.rb
fanforce-api-1.0.4 lib/fanforce/api/utils.rb
fanforce-api-1.0.3 lib/fanforce/api/utils.rb
fanforce-api-1.0.2 lib/fanforce/api/utils.rb
fanforce-api-1.0.1 lib/fanforce/api/utils.rb
fanforce-api-1.0.0 lib/fanforce/api/utils.rb