def total(resource=nil)
      req_method = :GET
      req_uri = '/api/v4/get_comment_count'
      req_options = {}
      case
      when resource.is_a?(Integer)
        req_options[:postid] = resource
      when resource.is_a?(String)
        req_options[:url] = resource
      end

      response = request_api(req_method, req_uri, req_options)

      response = JSON.parse(response)
      unless resource.nil?
        response = response[0]
      end

      response
    end
def total(resource=nil)
      req_method = :GET
      req_uri = '/api/v4/get_comment_count'
      req_options = {}
      case
      when resource.is_a?(Integer)
        req_options[:postid] = resource
      when resource.is_a?(String)
        req_options[:url] = resource
      end

      response = request_api(req_method, req_uri, req_options)

      response = JSON.parse(response)
      unless resource.nil?
        response = response[0]
      end

      response
    end
Get comment count
 If resource is nil it will return all posts comment count in an array, otherwise just return a hash object.

 Example:
   >> comment = Denglu::Comment.new
   => #<#Denglu::Comment...>
   >> comments = comment.total
   => [{"id"=>..., "count"=>..., "url"=>...},
   =>  {...}]

 Arguments:
   resource: (Mixed)  Integer for resource id or string for uri.