// Gets the project with a specified ID.
554805
func (api *ProjectsAPI) Get(id string) (project *ProjectCompact, err error) {
	res, err := api.client.restClient.Get(api.getEntityUrl(id), api.client.options.TokenOptions)
	if err != nil {
		return
	}
	defer res.Body.Close()
	res, err = getError(res)
	if err != nil {
		return
	}
	project = &ProjectCompact{}
	err = json.NewDecoder(res.Body).Decode(project)
	return
}
281663
func (g *Gitlab) ProjectDeployKeys(id string) ([]*SshKey, *ResponseMeta, error) {
	u := g.ResourceUrl(ProjectDeployKeysApiPath, map[string]string{":id": id})

	var deployKeys []*SshKey

	contents, meta, err := g.buildAndExecRequest("GET", u.String(), nil)
	if err == nil {
		err = json.Unmarshal(contents, &deployKeys)
	}

	return deployKeys, meta, err
}
1271390
func (m *CreateMetaInfo) GetProjectWithName(name string) *MetaProject {
	for _, m := range m.Projects {
		if strings.ToLower(m.Name) == strings.ToLower(name) {
			return m
		}
	}
	return nil
}
1224612
func (p *ProjectCard) GetProjectURL() string {
	if p == nil || p.ProjectURL == nil {
		return ""
	}
	return *p.ProjectURL
}
267388
func (api *TasksAPI) Get(id string) (task *Task, err error) {
	res, err := api.client.restClient.Get(api.client.Endpoint+taskUrl+"/"+id, api.client.options.TokenOptions)
	if err != nil {
		return
	}
	defer res.Body.Close()
	result, err := getTask(getError(res))
	return result, err
}
282819
func (p *ProjectColumn) GetNodeID() string {
	if p == nil || p.NodeID == nil {
		return ""
	}
	return *p.NodeID
}
193733
func GetProject(ctx context.Context, client *http.Client, importPath string) (*Project, error) {
	for _, s := range services {
		if s.getProject == nil {
			continue
		}
		match, err := s.match(importPath)
		if err != nil {
			return nil, err
		}
		if match != nil {
			return s.getProject(ctx, client, match)
		}
	}
	return nil, NotFoundError{Message: "path does not match registered service"}
}
161608
func (r *Repository) GetID() int64 {
	if r == nil || r.ID == nil {
		return 0
	}
	return *r.ID
}
1057221
func (p *PullRequest) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
1227457
func (s *ProjectsService) GetProject(projectName string) (*ProjectInfo, *Response, error) {
	u := fmt.Sprintf("projects/%s", url.QueryEscape(projectName))

	v := new(ProjectInfo)
	resp, err := s.client.Call("GET", u, nil, v)
	return v, resp, err
}
224281
func (c *Client) ProjectID(label *string) (*manifold.ID, error) {
	if label == nil {
		return nil, nil
	}

	if v, ok := c.getCachedProjectID(*label); ok {
		return v, nil
	}

	projectList := c.Client.Projects.List(context.Background(), &manifold.ProjectsListOpts{
		Label:  label,
		TeamID: c.TeamID,
	})
	defer projectList.Close()

	for projectList.Next() {
		project, err := projectList.Current()
		if err != nil {
			return nil, err
		}

		if project.Body.Label == *label {
			c.setCachedProjectID(*label, &project.ID)
			return &project.ID, nil
		}
	}

	return nil, ErrProjectNotFound
}
1201919
func (m *CreateMetaInfo) GetProjectWithKey(key string) *MetaProject {
	for _, m := range m.Projects {
		if strings.ToLower(m.Key) == strings.ToLower(key) {
			return m
		}
	}
	return nil
}
107747
func (p *ProjectColumn) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
672413
func (api *TenantsAPI) GetProjects(tenantId string, options *ProjectGetOptions) (result *ProjectList, err error) {
	uri := api.client.Endpoint + tenantUrl + "/" + tenantId + "/projects"
	if options != nil {
		uri += getQueryString(options)
	}
	res, err := api.client.restClient.GetList(api.client.Endpoint, uri, api.client.options.TokenOptions)
	if err != nil {
		return
	}

	result = &(ProjectList{})
	err = json.Unmarshal(res, result)
	return
}
309910
func (c *Console) ProjectID() string {
	if c.Parent == nil {
		return ""
	}
	return c.Parent.StringID()
}
302088
func (m *Milestone) GetID() int64 {
	if m == nil || m.ID == nil {
		return 0
	}
	return *m.ID
}
989155
func DeleteProject(projectId int64) error {
	o := orm.NewOrm()

	_, err := o.Delete(&Project{Id: projectId})

	return err
}