def hide(self, thing_id, _unhide=False):
        """Hide one or multiple objects in the context of the logged in user.

        :param thing_id: A single fullname or list of fullnames,
            representing objects which will be hidden.
        :param _unhide: If True, unhide the object(s) instead. Use
            :meth:`~praw.__init__.ReportMixin.unhide` rather than setting this
            manually.

        :returns: The json response from the server.

        """
        if isinstance(thing_id, six.string_types):
            thing_id = [thing_id]
        else:
            # Guarantee a subscriptable type.
            thing_id = list(thing_id)

        if len(thing_id) == 0:
            raise ValueError('No fullnames provided')

        # Will we return a list of server responses, or just one?
        # TODO: In future versions, change the threshold to 1 to get
        # list-in-list-out, single-in-single-out behavior. Threshold of 50
        # is to avoid a breaking change at this time.
        return_list = len(thing_id) > 50

        id_chunks = chunk_sequence(thing_id, 50)
        responses = []
        for id_chunk in id_chunks:
            id_chunk = ','.join(id_chunk)

            method = 'unhide' if _unhide else 'hide'
            data = {'id': id_chunk,
                    'executed': method}

            response = self.request_json(self.config[method], data=data)
            responses.append(response)

            if self.user is not None:
                self.evict(urljoin(self.user._url,  # pylint: disable=W0212
                                   'hidden'))
        if return_list:
            return responses
        else:
            return responses[0]
def hide ( self , thing_id , _unhide = False ) : if isinstance ( thing_id , six . string_types ) : thing_id = [ thing_id ] else : thing_id = list ( thing_id ) if len ( thing_id ) == 0 : raise ValueError ( 'No fullnames provided' ) return_list = len ( thing_id ) > 50 id_chunks = chunk_sequence ( thing_id , 50 ) responses = [ ] for id_chunk in id_chunks : id_chunk = ',' . join ( id_chunk ) method = 'unhide' if _unhide else 'hide' data = { 'id' : id_chunk , 'executed' : method } response = self . request_json ( self . config [ method ] , data = data ) responses . append ( response ) if self . user is not None : self . evict ( urljoin ( self . user . _url , 'hidden' ) ) if return_list : return responses else : return responses [ 0 ]
Hide one or multiple objects in the context of the logged in user.

        :param thing_id: A single fullname or list of fullnames,
            representing objects which will be hidden.
        :param _unhide: If True, unhide the object(s) instead. Use
            :meth:`~praw.__init__.ReportMixin.unhide` rather than setting this
            manually.

        :returns: The json response from the server.