Retrieve all your projects. Requires authentication.

        Example usage:

            >> documentcloud.projects.all()
192538
def all(self):
        
        project_list = self.fetch('projects.json').get("projects")
        obj_list = []
        for proj in project_list:
            proj['_connection'] = self._connection
            proj = Project(proj)
            obj_list.append(proj)
        return obj_list
866093
public List<Project> findAllProjects() {
        List<Project> list = new ArrayList<>();
        List<String> projectNames;
        try {
            projectNames = readLines(projectsFile);
        } catch (IOException e) {
            throw new FileBasedRuntimeException(e);
        }
        for (String projectName : projectNames) {
            if (StringUtils.isNotBlank(projectName)) {
                list.add(new Project(projectName));
            }
        }
        
        return list;
    }
568162
def all(self):
        
        return self._get_json(HTTPMethods.GET,
                              self._cached_datasets_url,
                              self._get_master_key())
514011
def get_project(self, project_id):
        
        return youtrack.Project(self._get("/admin/project/" + urlquote(project_id)), self)
42786
def get_project(self, project_id):
        ''''''
        project_response = self.get_request('projects/%s' % project_id)
        return Project(self, project_response['project'])
1147836
def get(self, id=None, title=None):
        
        # Make sure the kwargs are kosher
        if id and title:
            raise ValueError("You can only retrieve a Project by id or \
                title, not by both")
        elif not id and not title:
            raise ValueError("You must provide an id or a title to \
                make a request.")
        # Pull the hits
        if id:
            hit_list = [i for i in self.all() if str(i.id) == str(id)]
        elif title:
            hit_list = [
                i for i in self.all() if
                i.title.lower().strip() == title.lower().strip()
            ]
        # Throw an error if there's more than one hit.
        if len(hit_list) > 1:
            raise DuplicateObjectError("There is more than one project that \
                matches your request.")
        # Try to pull the first hit
        try:
            return hit_list[0]
        except IndexError:
            # If it's not there, you know to throw this error.
            raise DoesNotExistError("The resource you've requested does not \
                exist or is unavailable without the proper credentials.")
143173
function fetchProject(projectId) {
	return cocoonSDK.ProjectAPI.get(projectId)
	.catch((error) => {
		console.error("Project with ID: " + projectId + " couldn't be fetched.");
		console.trace(error);
		throw error;
	});
}
264908
def get_projects(machine):
    

    query = Project.active.all()
    return [x.pid for x in query]
236007
def list_projects(self):
        
        url = self._build_url(constants.LIST_PROJECTS_ENDPOINT)
        json = self.client.get(url, timeout=self.timeout)
        return json['projects']
398269
def get_networks(project_id, include_data='N', **kwargs):
    
    log.info("Getting networks for project %s", project_id)
    user_id = kwargs.get('user_id')
    project = _get_project(project_id)
    project.check_read_permission(user_id)

    rs = db.DBSession.query(Network.id, Network.status).filter(Network.project_id==project_id).all()
    networks=[]
    for r in rs:
        if r.status != 'A':
            continue
        try:
            net = network.get_network(r.id, summary=True, include_data=include_data, **kwargs)
            log.info("Network %s retrieved", net.name)
            networks.append(net)
        except PermissionError:
            log.info("Not returning network %s as user %s does not have "
                         "permission to read it."%(r.id, user_id))

    return networks
695110
def get_all(cls):
        
        issues = db.Issue.find(
            Issue.issue_type_id == IssueType.get(cls.issue_type).issue_type_id
        )

        return {res.issue_id: cls(res) for res in issues}
39359
def get_files(self, offset=None, limit=None):
        
        params = {'project': self.id, 'offset': offset, 'limit': limit}
        return self._api.files.query(api=self._api, **params)
1116357
async function getAllDocs() {
  // Restore docs in parent->child->grandchild order
  const allDocs = [
    ...(await models.settings.all()),
    ...(await models.workspace.all()),
    ...(await models.workspaceMeta.all()),
    ...(await models.environment.all()),
    ...(await models.cookieJar.all()),
    ...(await models.requestGroup.all()),
    ...(await models.requestGroupMeta.all()),
    ...(await models.request.all()),
    ...(await models.requestMeta.all()),
    ...(await models.response.all()),
    ...(await models.oAuth2Token.all()),
    ...(await models.clientCertificate.all()),
  ];

  return allDocs;
}
690068
def load_projects(self):
        
        server_config = Config.instance().get_section_config("Server")
        projects_path = os.path.expanduser(server_config.get("projects_path", "~/GNS3/projects"))
        os.makedirs(projects_path, exist_ok=True)
        try:
            for project_path in os.listdir(projects_path):
                project_dir = os.path.join(projects_path, project_path)
                if os.path.isdir(project_dir):
                    for file in os.listdir(project_dir):
                        if file.endswith(".gns3"):
                            try:
                                yield from self.load_project(os.path.join(project_dir, file), load=False)
                            except (aiohttp.web_exceptions.HTTPConflict, NotImplementedError):
                                pass  # Skip not compatible projects
        except OSError as e:
            log.error(str(e))
382978
def projects(self):
        
        result = set()
        for todo in self._todos:
            projects = todo.projects()
            result = result.union(projects)

        return result
521269
def get_apps(self, offset=None, limit=None):
        
        params = {'project': self.id, 'offset': offset,
                  'limit': limit}
        return self._api.apps.query(api=self._api, **params)
1086628
def get_project(self, project):
        
        project = format_string(project)

        return self.get(
            '/projects/{project}'.format(project=project))