Access the documents

        :returns: twilio.rest.sync.v1.service.document.DocumentList
        :rtype: twilio.rest.sync.v1.service.document.DocumentList
325568
def documents(self):
        
        if self._documents is None:
            self._documents = DocumentList(self._version, service_sid=self._solution['sid'], )
        return self._documents
433875
def listAttachments(self, oid):
        
        url = self._url + "/%s/attachments" % oid
        params = {
            "f":"json"
        }
        return self._get(url, params,
                            securityHandler=self._securityHandler,
                            proxy_port=self._proxy_port,
                            proxy_url=self._proxy_url)
367581
def sync_list_items(self):
        
        if self._sync_list_items is None:
            self._sync_list_items = SyncListItemList(
                self._version,
                service_sid=self._solution['service_sid'],
                list_sid=self._solution['sid'],
            )
        return self._sync_list_items
666053
def get(self, sid):
        
        return DocumentContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
292132
def document_windows(self) -> typing.List[DocumentWindow]:
        
        return [DocumentWindow(document_controller) for document_controller in self.__application.document_controllers]
1226299
public function documentlist()
    {
        if (!$this->getRequest()->getVar('pageID')) {
            return $this->httpError(400);
        }

        $page = SiteTree::get()->byId($this->getRequest()->getVar('pageID'));

        if ($page && $page->getAllDocuments()->count() > 0) {
            $list = '<ul>';

            foreach ($page->getAllDocuments() as $document) {
                $list .= sprintf(
                    '<li><a class="add-document" data-document-id="%s">%s</a></li>',
                    $document->ID,
                    $document->ID . ' - '. Convert::raw2xml($document->Title)
                );
            }

            $list .= '</ul>';

            return $list;
        }

        return sprintf(
            '<p>%s</p>',
            _t('DMSDocumentAddController.NODOCUMENTS', 'There are no documents attached to the selected page.')
        );
    }
456707
def get(self) -> None:
        """"""
        from wdom.document import get_document
        logger.info('connected')
        self.write(get_document().build())
1008589
def get_list(self):
        
        field = self.FIELD_NAME
        query = ElasticQuery.get_agg(field=field,
                                     date_field=self.FIELD_DATE,
                                     start=self.start, end=self.end,
                                     filters=self.esfilters)
        logger.debug("Metric: '%s' (%s); Query: %s",
                     self.name, self.id, query)
        res = self.get_metrics_data(query)
        list_ = {field: [], "value": []}
        for bucket in res['aggregations'][str(ElasticQuery.AGGREGATION_ID)]['buckets']:
            list_[field].append(bucket['key'])
            list_['value'].append(bucket['doc_count'])
        return list_
134739
@Override
    public List<DocumentRevs> getRevisions(String documentId,
                                           Collection<String> revisionIds,
                                           Collection<String> attsSince,
                                           boolean pullAttachmentsInline) {
        List<OpenRevision> openRevisions =
                couchClient.getDocWithOpenRevisions(documentId, revisionIds, attsSince,
                        pullAttachmentsInline);

        // expect all the open revisions return ok, return error is there is any missing
        List<DocumentRevs> documentRevs = new ArrayList<DocumentRevs>();
        for (OpenRevision openRev : openRevisions) {
            if (openRev instanceof OkOpenRevision) {
                documentRevs.add(((OkOpenRevision) openRev).getDocumentRevs());
            } else {
                throw new RuntimeException("Missing open revision for document:" + documentId
                        + ", revisions: " + Arrays.asList(revisionIds));
            }
        }

        return documentRevs;
    }
1157175
def get_documents_in_collection(self, collection_name, with_id=True):
        
        documents_iterator = self.database[collection_name].find()  # anything
        documents = [
            d for d in documents_iterator
        ]  # list of all documents in collection in database

        if not with_id:
            for doc in documents:
                doc.pop("_id")  # remove id key

        return documents
626182
protected function getDocumentPermissions() {
        if (!$this->_documentPermissions) {
            $this->_documentPermissions = new DocumentPermissionList(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['sid']
            );
        }

        return $this->_documentPermissions;
    }
135983
def List(self, device_path):
        
        connection = self.protocol_handler.Open(self._handle, destination=b'sync:')
        listing = self.filesync_handler.List(connection, device_path)
        connection.Close()
        return listing
1283832
def get_data(self):
        
        try:
            return DocumentDataDict(self.__dict__['data'])
        except KeyError:
            self._lazy_load()
            return DocumentDataDict(self.__dict__['data'])
845091
public List<JSONObject> getDocuments()
    {
        List<JSONObject> documents = new ArrayList<JSONObject>();
        
        try
        {
            if (data != null && data.has(documentsParam))
            {
                JSONArray jsonDocuments = data.getJSONArray(documentsParam);
                
                for(int i = 0; i < jsonDocuments.length(); i++)
                {
                    JSONObject document = jsonDocuments.getJSONObject(i);
                    documents.add(document);
                }
            }
        }
        catch (JSONException e)
        {
            //This is already handled by the enclosing "has" checks
        }
        
        return documents;
    }
1047775
def get_document(self, doc_id):
        
        layer_graphs = []
        for layer_name in self.layers:
            layer_files, read_function = self.layers[layer_name]
            for layer_file in layer_files:
                if fnmatch.fnmatch(layer_file, '*{}.*'.format(doc_id)):
                    layer_graphs.append(read_function(layer_file))

        if not layer_graphs:
            raise TypeError("There are no files with that document ID.")
        else:
            doc_graph = layer_graphs[0]
            for layer_graph in layer_graphs[1:]:
                doc_graph.merge_graphs(layer_graph)
        return doc_graph
95895
def get_entities(self):
        
        try:
            return self.__dict__['entities']
        except KeyError:
            entities = self._connection.fetch(
                "documents/%s/entities.json" % self.id
            ).get("entities")
            obj_list = []
            for type, entity_list in list(entities.items()):
                for entity in entity_list:
                    entity['type'] = type
                    obj = Entity(entity)
                    obj_list.append(obj)
            self.__dict__['entities'] = obj_list
            return self.__dict__['entities']
492601
protected function getDocuments() {
        if (!$this->_documents) {
            $this->_documents = new DocumentList($this->version, $this->solution['sid']);
        }

        return $this->_documents;
    }