Documentation
¶
Index ¶
- Constants
- func HasNextPage(res *http.Response) bool
- type Client
- func (c *Client) AddUserToProject(ctx context.Context, companyId, projectId string, userId int) error
- func (c *Client) CreateCompanyUser(ctx context.Context, companyId string, body CreateUserBody) (*User, error)
- func (c *Client) GetCompanies(ctx context.Context, page int) ([]Company, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetCompanyUsers(ctx context.Context, companyId string, page int) ([]User, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetProjectUsers(ctx context.Context, companyId, projectId string, page int) ([]User, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetProjects(ctx context.Context, companyId string, page int) ([]Project, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) RemoveUserFromProject(ctx context.Context, companyId, projectId string, userId int) error
- type Company
- type Contact
- type ContactInfo
- type CreateUserBody
- type CreatedBy
- type CustomField
- type LOVEntry
- type Pagination
- type PermissionTemplate
- type Project
- type ProjectStage
- type ProjectTemplate
- type ProjectType
- type User
- type UserBody
- type Vendor
Constants ¶
View Source
const ( BaseURL = "https://api.procore.com/rest" GetCompaniesURL = BaseURL + "/v1.0/companies" GetProjectsURL = BaseURL + "/v1.1/projects" // https://developers.procore.com/reference/rest/company-users?version=latest CompanyUsersURL = BaseURL + "/v1.3/companies/%s/users" ProjectUsersURL = BaseURL + "/v1.0/projects/%s/users" // https://developers.procore.com/reference/rest/project-users?version=latest#add-company-user-to-project AddUserToProjectURL = ProjectUsersURL + "/%d/actions/add" // https://developers.procore.com/reference/rest/project-users?version=latest#remove-a-user-from-the-project RemoveUserFromProjectURL = ProjectUsersURL + "/%d/actions/remove" )
Variables ¶
This section is empty.
Functions ¶
func HasNextPage ¶
Types ¶
type Client ¶
type Client struct {
*uhttp.BaseHttpClient
}
func (*Client) AddUserToProject ¶
func (*Client) CreateCompanyUser ¶
func (*Client) GetCompanies ¶
func (*Client) GetCompanyUsers ¶
func (*Client) GetProjectUsers ¶
func (*Client) GetProjects ¶
type Contact ¶
type Contact struct {
Id int64 `json:"id"`
ContactInfo ContactInfo `json:"contact"`
EmployeeId string `json:"employee_id"`
FirstName string `json:"first_name"`
IsEmployee bool `json:"is_employee"`
LastName string `json:"last_name"`
UserId *int64 `json:"user_id"`
UserUUID *string `json:"user_uuid"`
WorkClassificationId int64 `json:"work_classification_id"`
OriginId string `json:"origin_id"`
}
type ContactInfo ¶
type CreateUserBody ¶
type CreateUserBody struct {
User UserBody `json:"user"`
}
type CustomField ¶
type Pagination ¶
type Pagination struct {
HasNextPage bool
}
type PermissionTemplate ¶
type Project ¶
type Project struct {
Id int `json:"id"`
AccountingProjectNumber *int `json:"accounting_project_number"`
Active bool `json:"active"`
ActualStartDate *string `json:"actual_start_date"`
Address *string `json:"address"`
City *string `json:"city"`
Company Company `json:"company"`
CompletionDate *string `json:"completion_date"`
CountryCode *string `json:"country_code"`
County *string `json:"county"`
CreatedAt time.Time `json:"created_at"`
CreatedBy CreatedBy `json:"created_by"`
CustomFields map[string]CustomField `json:"custom_fields"`
DeliveryMethod *string `json:"delivery_method"`
Description *string `json:"description"`
DesignatedMarketArea *string `json:"designated_market_area"`
DisplayName string `json:"display_name"`
EstimatedValue *string `json:"estimated_value"`
IsDemo bool `json:"is_demo"`
Latitude *float64 `json:"latitude"`
Longitude *float64 `json:"longitude"`
Name string `json:"name"`
OriginCode *string `json:"origin_code"`
OriginData *string `json:"origin_data"`
OriginId *string `json:"origin_id"`
OwnersProjectId *int `json:"owners_project_id"`
ParentJobId *int `json:"parent_job_id"`
Phone *string `json:"phone"`
PhotoId *int `json:"photo_id"`
ProjectBidTypeId *int `json:"project_bid_type_id"`
ProjectNumber *string `json:"project_number"`
ProjectOwnerTypeId *int `json:"project_owner_type_id"`
ProjectRegionId *int `json:"project_region_id"`
ProjectStage *ProjectStage `json:"project_stage"`
ProjectTemplate *ProjectTemplate `json:"project_template"`
ProjectType *ProjectType `json:"project_type"`
ProjectedFinishDate *string `json:"projected_finish_date"`
Sector *string `json:"sector"`
SquareFeet *int `json:"square_feet"`
StartDate *string `json:"start_date"`
StateCode *string `json:"state_code"`
StoreNumber *int `json:"store_number"`
TimeZone *string `json:"time_zone"`
TotalValue *string `json:"total_value"`
UpdatedAt time.Time `json:"updated_at"`
WorkScope *string `json:"work_scope"`
Zip *string `json:"zip"`
}
type ProjectStage ¶
type ProjectTemplate ¶
type ProjectType ¶
type User ¶
type User struct {
Id int `json:"id"`
Address string `json:"address"`
Avatar string `json:"avatar"`
BusinessId string `json:"business_id"`
BusinessPhone string `json:"business_phone"`
BusinessPhoneExtension int `json:"business_phone_extension"`
City string `json:"city"`
ContactId int `json:"contact_id"`
CountryCode string `json:"country_code"`
CreatedAt time.Time `json:"created_at"`
EmailAddress string `json:"email_address"`
EmailSignature string `json:"email_signature"`
EmployeeId string `json:"employee_id"`
ERPIntegratedAccountant bool `json:"erp_integrated_accountant"`
FaxNumber string `json:"fax_number"`
FirstName string `json:"first_name"`
Initials string `json:"initials"`
IsActive bool `json:"is_active"`
IsEmployee bool `json:"is_employee"`
JobTitle string `json:"job_title"`
LastActivatedAt time.Time `json:"last_activated_at"`
LastLoginAt time.Time `json:"last_login_at"`
LastName string `json:"last_name"`
MobilePhone string `json:"mobile_phone"`
Name string `json:"name"`
Notes string `json:"notes"`
OriginId string `json:"origin_id"`
OriginData string `json:"origin_data"`
StateCode string `json:"state_code"`
UpdatedAt time.Time `json:"updated_at"`
WelcomeEmailSentAt time.Time `json:"welcome_email_sent_at"`
Zip string `json:"zip"`
WorkClassificationId int `json:"work_classification_id"`
PermissionTemplate PermissionTemplate `json:"permission_template"`
CompanyPermissionTemplate PermissionTemplate `json:"company_permission_template"`
Vendor Vendor `json:"vendor"`
Role string `json:"role"`
VerifiedEmployee bool `json:"verified_employee"`
}
type UserBody ¶
type UserBody struct {
// required: true
EmailAddress string `json:"email_address"`
// required: true
LastName string `json:"last_name"`
FirstName string `json:"first_name,omitempty"`
City string `json:"city,omitempty"`
Address string `json:"address,omitempty"`
JobTitle string `json:"job_title,omitempty"`
IsEmployee bool `json:"is_employee,omitempty"`
EmployeeId string `json:"employee_id,omitempty"` // The ID of the Employee of the Company User when user[is_employee] is set to true
IsActive bool `json:"is_active,omitempty"`
VendorId int `json:"vendor_id,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.