Returns list of Conversation objects
960891
def get_conversations(self):
        
        cs = self.data["data"]
        res = []
        for c in cs:
            res.append(Conversation(c))
        return res
813044
def interactions(self):
        
        if self._interactions is None:
            self._interactions = InteractionList(
                self._version,
                service_sid=self._solution['service_sid'],
                session_sid=self._solution['sid'],
            )
        return self._interactions
376930
def get_messages(self):
        
        cs = self.data["comments"]["data"]
        res = [] 
        for c in cs:
            res.append(Message(c,self))
        return res
1355917
def _get_chat(self) -> Dict:
        

        if 'callback_query' in self._update:
            query = self._update['callback_query']
            if 'message' in query:
                return query['message']['chat']
            else:
                return {'id': query['chat_instance']}
        elif 'inline_query' in self._update:
            return patch_dict(
                self._update['inline_query']['from'],
                is_inline_query=True,
            )
        elif 'message' in self._update:
            return self._update['message']['chat']
999453
def conversations_read(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/conversations/{0}/read'.format(str(id))
        return self.__api_request('POST', url)
618552
public function getConversationsAllById($conversationId, $offset = 0, $take = 20)
    {
        $conversations = $this->conversation->getMessagesAllById($conversationId, $offset, $take);

        return $this->makeMessageCollection($conversations);
    }
503062
function(conversationId, params, callback) {
      conversationId = utils.toUUID(conversationId);
      if (!conversationId) return callback(new Error(utils.i18n.messages.cid));
      utils.debug('Message getAll: ' + conversationId);

      var queryParams = '';
      if (typeof params === 'function') callback = params;
      else queryParams = '?' + querystring.stringify(params);

      request.get({
        path: '/conversations/' + conversationId + '/messages' + queryParams
      }, callback);
    }
901469
def get_chat_ids(self):
        
        updates = self.get_updates()
        chat_ids = []
        if updates:
            for update in updates:
                message = update['message']
                if message['text'] == '/start':
                    chat_ids.append(message['chat']['id'])
        return list(set(chat_ids))
1329541
def batch_update_conversations(self, event, conversation_ids):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - conversation_ids
        """List of conversations to update. Limited to 500 conversations."""
        data["conversation_ids"] = conversation_ids

        # REQUIRED - event
        """The action to take on each conversation."""
        self._validate_enum(event, ["mark_as_read", "mark_as_unread", "star", "unstar", "archive", "destroy"])
        data["event"] = event

        self.logger.debug("PUT /api/v1/conversations with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("PUT", "/api/v1/conversations".format(**path), data=data, params=params, single_item=True)
1292251
def train(self, conversation):
        
        previous_statement_text = None
        previous_statement_search_text = ''

        statements_to_create = []

        for conversation_count, text in enumerate(conversation):
            if self.show_training_progress:
                utils.print_progress_bar(
                    'List Trainer',
                    conversation_count + 1, len(conversation)
                )

            statement_search_text = self.chatbot.storage.tagger.get_bigram_pair_string(text)

            statement = self.get_preprocessed_statement(
                Statement(
                    text=text,
                    search_text=statement_search_text,
                    in_response_to=previous_statement_text,
                    search_in_response_to=previous_statement_search_text,
                    conversation='training'
                )
            )

            previous_statement_text = statement.text
            previous_statement_search_text = statement_search_text

            statements_to_create.append(statement)

        self.chatbot.storage.create_many(statements_to_create)
1331202
def message_list
      list = []
      each do |k, v|
        list.concat(v.message_list)
      end
      list
    end
667767
def discussions_notifications(user):
    ''''''
    notifications = []

    # Only fetch required fields for notification serialization
    # Greatly improve performances and memory usage
    qs = discussions_for(user).only('id', 'created', 'title', 'subject')

    # Do not dereference subject (so it's a DBRef)
    # Also improve performances and memory usage
    for discussion in qs.no_dereference():
        notifications.append((discussion.created, {
            'id': discussion.id,
            'title': discussion.title,
            'subject': {
                'id': discussion.subject['_ref'].id,
                'type': discussion.subject['_cls'].lower(),
            }
        }))

    return notifications
959811
def _create_sentence_objects(self):
    '''
    '''
    sentence_objects = []
    sent_tokenizer = SentenceTokenizer(locale=self.language.code)
    seq = Sequence(self.raw)
    seq = sent_tokenizer.transform(seq)
    for start_index, end_index in zip(seq.idx[:-1], seq.idx[1:]):
      # Sentences share the same models as their parent blob
      sent = seq.text[start_index: end_index].strip()
      if not sent: continue
      s = Sentence(sent, start_index=start_index, end_index=end_index)
      s.detected_languages = self.detected_languages
      sentence_objects.append(s)
    return sentence_objects
464309
def conversations_replies(self, *, channel: str, ts: str, **kwargs) -> SlackResponse:
        
        kwargs.update({"channel": channel, "ts": ts})
        return self.api_call("conversations.replies", http_verb="GET", params=kwargs)
1139547
def get_sentences_list(self, sentences=1):
        
        if sentences < 1:
            raise ValueError('Param "sentences" must be greater than 0.')

        sentences_list = []

        while sentences:
            num_rand_words = random.randint(self.MIN_WORDS, self.MAX_WORDS)

            random_sentence = self.make_sentence(
                random.sample(self.words, num_rand_words))

            sentences_list.append(random_sentence)
            sentences -= 1

        return sentences_list
615176
private Observable<ConversationComparison> updateLocalConversationList(final ConversationComparison conversationComparison) {

        return Observable.zip(persistenceController.deleteConversations(conversationComparison.conversationsToDelete),
                persistenceController.upsertConversations(conversationComparison.conversationsToAdd),
                persistenceController.updateConversations(conversationComparison.conversationsToUpdate),
                (success1, success2, success3) -> success1 && success2 && success3)
                .map(result -> {
                    conversationComparison.addSuccess(result);
                    return conversationComparison;
                });
    }
751009
def get_help_topics(self) -> List[str]:
        
        return [name[len(HELP_FUNC_PREFIX):] for name in self.get_names()
                if name.startswith(HELP_FUNC_PREFIX) and callable(getattr(self, name))]