def call method, params = {}
      url = "#{api_url}&method=#{method}"
      
      params = {apikey: self.api_key}.merge params
      
      resp = post_api(url, params)
      begin
        return JSON.parse(resp)
      rescue
        return resp.tr('"','')
      end
    end
def call method, params = {}
      url = "#{api_url}&method=#{method}"
      
      params = {apikey: self.api_key}.merge params
      
      resp = post_api(url, params)
      begin
        return JSON.parse(resp)
      rescue
        return resp.tr('"','')
      end
    end
Initialize API wrapper.

 @param api_key - from mailigen.com . Required.
 @param secure - use SSL. By default FALSE

 Call Mailigen api method (Documented in http://dev.mailigen.com/display/AD/Mailigen+API )

 @param method - method name
 @param params - params if required for API

 @return
 JSON, String data if all goes well.
 Exception if somethnigs goes wrong.