def get_posts(grouping, name, resource_type, tags = nil, start = 0, endc = $MAX_POSTS_PER_REQUEST)
      url = @url_posts.partial_expand({
                                        :format => @format,
                                        :resourcetype => get_resource_type(resource_type),
                                        :start => start,
                                        :end => endc
                                      })
      # decide what to get
      if grouping == "user"
        url = url.partial_expand({:user => name})
      elsif grouping == "group"
        url = url.partial_expand({:group => name})
      end
      # add tags, if requested
      if tags != nil
        url = url.partial_expand({:tags => tags.join(" ")})
      end

      response = @conn.get url.expand({})

      if @parse
        posts = JSON.parse(response.body)["posts"]["post"]
        return posts.map { |attributes| Post.new(attributes) }
      end
      return response.body
    end
def get_posts(grouping, name, resource_type, tags = nil, start = 0, endc = $MAX_POSTS_PER_REQUEST)
      url = @url_posts.partial_expand({
                                        :format => @format,
                                        :resourcetype => get_resource_type(resource_type),
                                        :start => start,
                                        :end => endc
                                      })
      # decide what to get
      if grouping == "user"
        url = url.partial_expand({:user => name})
      elsif grouping == "group"
        url = url.partial_expand({:group => name})
      end
      # add tags, if requested
      if tags != nil
        url = url.partial_expand({:tags => tags.join(" ")})
      end

      response = @conn.get url.expand({})

      if @parse
        posts = JSON.parse(response.body)["posts"]["post"]
        return posts.map { |attributes| Post.new(attributes) }
      end
      return response.body
    end
Get posts for a user or group, optionally filtered by tags.

 @param grouping [String] the type of the name (either "user" or "group")
 @param name [String] the name of the group or user
 @param resource_type [String] the type of the post. Currently supported are 'bookmark' and 'publication'.
 @param tags [Array<String>] the tags that all posts must contain (can be empty)
 @param start [Integer] number of first post to download
 @param endc [Integer] number of last post to download
 @return [Array<BibSonomy::Post>, String] the requested posts