Get all comments of letter
        This will iterate over all pages until it gets all elements.
        So if the rate limit exceeded it will throw an Exception and you will get nothing

        :param letter_id: the letter id
        :return: list
16710
def get_all_comments_of_letter(self, letter_id):
        
        return self._iterate_through_pages(
            get_function=self.get_comments_of_letter_per_page,
            resource=LETTER_COMMENTS,
            **{'letter_id': letter_id}
        )
108040
def get_comments_of_offer_per_page(self, offer_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=OFFER_COMMENTS,
            per_page=per_page,
            page=page,
            params={'offer_id': offer_id},
        )
829166
def get_all_items_of_offer(self, offer_id):
        
        return self._iterate_through_pages(
            get_function=self.get_items_of_offer_per_page,
            resource=OFFER_ITEMS,
            **{'offer_id': offer_id}
        )
1201555
def get_comments(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.CommentList(self._results, runtime=self._runtime)
776666
def get_all_tags_of_reminder(self, reminder_id):
        
        return self._iterate_through_pages(
            get_function=self.get_tags_of_reminder_per_page,
            resource=REMINDER_TAGS,
            **{'reminder_id': reminder_id}
        )
34701
def get_all_page_ids_from_space(confluence, space_key):
    
    limit = 500
    flag = True
    step = 0
    page_ids = []

    while flag:
        values = confluence.get_all_pages_from_space(space=space_key, start=limit * step, limit=limit)
        step += 1
        if len(values) == 0:
            flag = False
            print("Did not find any pages, please, check permissions")
        else:
            for value in values:
                print("Retrieve page with title: " + value['title'])
                page_ids.append((value['id']))
    print("Found in space {} pages {}".format(space_key, len(page_ids)))
    return page_ids
1147478
def icomments(self, tag, limit=0):
        """"""

        for comment in CommentsMatch(tag).get_comments(limit):
            yield comment
498486
def get_comments_by_userid(self, userid):
        
        userid = userid
        with get_guest_conn() as conn:
            res = conn.execute("SELECT comments FROM guests "
                               "WHERE userid=?", (userid,))

        result = res.fetchall()
        comments = {}
        if result[0][0]:
            comments = json.loads(result[0][0])
        return comments
1175353
def obtain_comments(check = nil)

      if check.blank? && !@content.blank? && @content[0].blank?
        Comment.where(:post_id => @content.id, :comment_approved => 'Y')
      else
        Comment.where(:post_id => check, :comment_approved => 'Y')
      end

    end
975438
def get_letters_iterable( word ):
    
    WLEN,idx = len(word),0

    while (idx < WLEN):
        c = word[idx]
        #print(idx,hex(ord(c)),len(ta_letters))
        if c in uyir_letter_set or c == ayudha_letter:
            idx = idx + 1
            yield c
        elif c in grantha_agaram_set:
            if idx + 1 < WLEN and word[idx+1] in all_symbol_set:
                c2 = word[idx+1]
                idx = idx + 2
                yield (c + c2)
            else:
                idx = idx + 1
                yield c
        else:
            idx = idx + 1
            yield c
    return
1374049
def get_all_comments_of_offer(self, offer_id):
        
        return self._iterate_through_pages(
            get_function=self.get_comments_of_offer_per_page,
            resource=OFFER_COMMENTS,
            **{'offer_id': offer_id}
        )
799439
def get_comments(self):
        
        # Lazily load info
        if self.info is None:
            self.get_info()

        if 'comments' in self.info:
            return [structure['text'] for structure in self.info['comments']['comments']]
        else:
            return []
1188194
def list_all_after(self, message_id, limit=None):
        
        return self.list_after(message_id, limit=limit).autopage()
185633
def get_comments_of_delivery_note_per_page(self, delivery_note_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=DELIVERY_NOTE_COMMENTS,
            per_page=per_page,
            page=page,
            params={'delivery_note_id': delivery_note_id},
        )
747962
def get_by_id(self, reply_id):
        '''
        
        '''
        reply = MReply.get_by_uid(reply_id)
        logger.info('get_reply: {0}'.format(reply_id))

        self.render('misc/reply/show_reply.html',
                    reply=reply,
                    username=reply.user_name,
                    date=reply.date,
                    vote=reply.vote,
                    uid=reply.uid,
                    userinfo=self.userinfo,
                    kwd={})
1287600
def comments(object):
    
    return Comment.objects.filter(
        object_id=object.pk,
        content_type=ContentType.objects.get_for_model(object)
    )
288568
function getComments(id) {
    $.ajax({
     type: 'GET',
     url: opts.getCommentsURL,
     data: {node: id},
     success: function(data, textStatus, request) {
       var ul = $('#cl' + id);
       var speed = 100;
       $('#cf' + id)
         .find('textarea[name="proposal"]')
         .data('source', data.source);

       if (data.comments.length === 0) {
         ul.html('<li>No comments yet.</li>');
         ul.data('empty', true);
       } else {
         // If there are comments, sort them and put them in the list.
         var comments = sortComments(data.comments);
         speed = data.comments.length * 100;
         appendComments(comments, ul);
         ul.data('empty', false);
       }
       $('#cn' + id).slideUp(speed + 200);
       ul.slideDown(speed);
     },
     error: function(request, textStatus, error) {
       showError('Oops, there was a problem retrieving the comments.');
     },
     dataType: 'json'
    });
  }