Last active
April 19, 2018 19:49
-
-
Save chadwilken/d8ddec4d648fd6b56c6f3f3f52cb3491 to your computer and use it in GitHub Desktop.
CompanyCam .NET Examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set secret key for your application globally | |
CompanyCamConfiguration.SetSecretKey("YourSecretKey"); | |
var requestOptions = new CompanyCamRequestOptions | |
{ | |
ApiKey = "CompanyApiKey", | |
UserEmailAddress = "UserPerformingAction" | |
}; | |
var projectService = new ProjectService(requestOptions); | |
var project = projectService.Create(new Project | |
{ | |
Name = "CompanyCam HQ", | |
Coordinates = new Coordinates | |
{ | |
Lat = 40.815462, | |
Lon = -96.709650 | |
}, | |
Address = new Address | |
{ | |
StreetAddress1 = "810 P St", | |
StreetAddress2 = "Suite 430", | |
City = "Lincoln", | |
State = "NE", | |
PostalCode = "68512" | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var requestOptions = new CompanyCamRequestOptions | |
{ | |
ApiKey = "CompanyApiKey", | |
UserEmailAddress = "UserPerformingAction" | |
}; | |
var photoService = new ProjectPhotoService(requestOptions); | |
var photos = photoService.List(new ProjectPhotoFilter | |
{ | |
ProjectId = project.Id | |
Page = 1, | |
PerPage = 50 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment