def posts(params = {})
      default_params = {
        content_group_id: self["id"],
        order_by: '-created',
        created__gt: Time.now - 2.month,
        state: 'PUBLISHED'
      }
      raise Hubspot::InvalidParams.new('params must be passed as a hash') unless params.is_a?(Hash)
      params = default_params.merge(params)

      raise Hubspot::InvalidParams.new('State parameter was invalid') unless [false, 'PUBLISHED', 'DRAFT'].include?(params[:state])
      params.each { |k, v| params.delete(k) if v == false }

      response = Hubspot::Connection.get_json(BLOG_POSTS_PATH, params)
      response['objects'].map { |p| BlogPost.new(p) }
    end
def posts(params = {})
      default_params = {
        content_group_id: self["id"],
        order_by: '-created',
        created__gt: Time.now - 2.month,
        state: 'PUBLISHED'
      }
      raise Hubspot::InvalidParams.new('params must be passed as a hash') unless params.is_a?(Hash)
      params = default_params.merge(params)

      raise Hubspot::InvalidParams.new('State parameter was invalid') unless [false, 'PUBLISHED', 'DRAFT'].include?(params[:state])
      params.each { |k, v| params.delete(k) if v == false }

      response = Hubspot::Connection.get_json(BLOG_POSTS_PATH, params)
      response['objects'].map { |p| BlogPost.new(p) }
    end
Returns the posts for this blog instance.
   defaults to returning the last 2 months worth of published blog posts
   in date descending order (i.e. most recent first)
 {https://developers.hubspot.com/docs/methods/blogv2/get_blog_posts}
 @return [Hubspot::BlogPost]