Created
February 15, 2019 17:43
-
-
Save DeeJayTC/509931b06ca8e2d4347ceb5428910594 to your computer and use it in GitHub Desktop.
This file contains 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
// Lets just like a comment | |
var ok = await client.Projects.Reactions.LikeItem("comment", "commentId"); | |
// we can even send messages on teamwork chat! | |
var ok = await client.Projects.Chat.SendMessage("the message i want to send", "the RoomId"); | |
// Update your status | |
var ok = await client.Projects.Me.AddNewStatusMessage("Gone Fishin"); | |
// Or a more complex example, create a company, add a person and | |
// finaly create a project for the new company | |
// first add the company | |
var company = new Company() { | |
Name = "MyNewCompany" | |
}; | |
var companyId = await client.Projects.Companies.AddCompany(company); | |
// Now add a person and assign it to the newly created company | |
var newPerson = new Person() { | |
EmailAddress = "max@teamwork.com", | |
FirstName = "max", | |
LastName = "miller", | |
CompanyId = companyId | |
}; | |
var ok = await client.Projects.People.AddPerson(newPerson); | |
// Finally add a project for the newly added company | |
var projectToCreate = new Project() { | |
Name = "My New project", | |
CompanyId = companyid | |
}; | |
var ok = await client.Projects.Projects.AddProject(projectToCreate); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment