Get project by Id

 @param project_id A unique identifier of a Project.
 @param [Hash] opts the optional parameters
 @return [Project]
491505
def get_project(project_id, opts = {})
      data, _status_code, _headers = get_project_with_http_info(project_id, opts)
      return data
    end
583591
def create_job(project_id, data, opts = {})
      data, _status_code, _headers = create_job_with_http_info(project_id, data, opts)
      return data
    end
1139645
def plugin_info_by_id(plugin_id, opts={})
      found = all_plugins.find {|pe|
        pe.respond_to?(:plugin_id) && pe.plugin_id.to_s == plugin_id
      }
      if found
        get_monitor_info(found, opts)
      else
        nil
      end
    end
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.")
554876
def Get(self, project_id):
    
    if project_id in self._emulators:
      return self._emulators[project_id]

    emulator = self.Create(project_id)
    self._emulators[project_id] = emulator
    return emulator
1072048
public function getByProject($project_id, $maxItems = null)
    {
        $project_id = (int) $project_id;
        if ($project_id <= 0) {
            throw new Exception('Invalid param project_id');
        }
        $params      = [];
        $maxItems    = (int) $maxItems;
        if ($maxItems) {
            $params['maxItems'] = $maxItems;
        }

        return $this->rest->get("projects/$project_id/$this->action", $params);
    }
523434
def get_project() -> Optional[str]:
    
    project = SETTINGS.project
    if not project:
        require_test_mode_enabled()
        raise RunError('Missing project name; for test mode, please set PULUMI_NODEJS_PROJECT')
    return project
1347007
public function show($project_id, array $parameters = [])
    {
        $resolver = $this->createOptionsResolver();
        $booleanNormalizer = function (Options $resolver, $value) {
            return $value ? true : false;
        };
        $resolver->setDefined('statistics')
            ->setAllowedTypes('statistics', 'bool')
            ->setNormalizer('statistics', $booleanNormalizer)
        ;
        $resolver->setDefined('with_custom_attributes')
            ->setAllowedTypes('with_custom_attributes', 'bool')
            ->setNormalizer('with_custom_attributes', $booleanNormalizer)
        ;
        return $this->get('projects/'.$this->encodePath($project_id), $resolver->resolve($parameters));
    }
427124
def find_by_project(self, project, params={}, **options): 
        
        path = "/projects/%s/sections" % (project)
        return self.client.get(path, params, **options)
44872
def get_project(self, project_id):
        
        try:
            return self._projects[project_id]
        except KeyError:
            raise aiohttp.web.HTTPNotFound(text="Project ID {} doesn't exist".format(project_id))
659329
def todolist(list_id)
      response = Logan::Client.get "/projects/#{@id}/todolists/#{list_id}.json"
      Logan::TodoList.new response.parsed_response.merge({ :project_id => @id })
    end
169552
def get_project(conn, vm_):
    '''
    
    '''
    try:
        projects = conn.ex_list_projects()
    except AttributeError:
        # with versions <0.15 of libcloud this is causing an AttributeError.
        log.warning('Cannot get projects, you may need to update libcloud to 0.15 or later')
        return False
    projid = config.get_cloud_config_value('projectid', vm_, __opts__)

    if not projid:
        return False

    for project in projects:
        if six.text_type(projid) in (six.text_type(project.id), six.text_type(project.name)):
            return project

    log.warning("Couldn't find project %s in projects", projid)
    return False
45165
def project_entries(project_id, from, to, user_id=nil)
      opts = {:from => from, :to => to}
      opts[:user_id] = user_id if user_id
      Mash.new(self.class.get("/projects/#{project_id}/entries", :query => opts)).day_entries
    end
1236097
public GitlabProject getProject(Serializable projectId) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId);
        return retrieve().to(tailUrl, GitlabProject.class);
    }
712102
function getFormIds(req, res, next) {
  var params = {
    appId: req.params.projectid || req.params.id
  };

  forms.getAppFormsForApp(_.extend(req.connectionOptions, params), function(err, appFormResult) {
    if (err) {
      return next(err);
    }

    //Only Want The Form Ids
    req.appformsResultPayload = {
      data: _.map(_.compact(appFormResult.forms), function(form) {
        return form._id.toString();
      }),
      type: constants.resultTypes.formProjects
    };

    next();
  });
}
794207
function get(req, res, next) {
  var params = {
    appId: req.params.projectid || req.params.id
  };

  forms.getAppFormsForApp(_.extend(req.connectionOptions, params), formsResultHandlers(constants.resultTypes.formProjects, req, next));
}
1200550
public GitlabBadge getProjectBadge(Serializable projectId, Integer badgeId) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabBadge.URL
                + "/" + badgeId;
        return retrieve().to(tailUrl, GitlabBadge.class);
    }