Configuration
<configSections>
<sectionGroup name="TnT">
<section name="BasecampVB" type="TnT.BasecampVB.Configuration.BasecampVBSection, TnT.BasecampVB"/>
</sectionGroup>
</configSection>
<TnT>
<BasecampVB basecampUrl="http://YOURURL.basecamphq.com/" username="USERNAME" password="PASSWORD" enableCaching="True" cacheDuration="600" />
</TnT>
Usage
Below I have included sample code for just a few of the classes to demonstrate usage. Comment, Milestone, Post, Project, TimeEntry, ToDoItem and ToDoList all also follow the basic pattern illustrated below.
Namespace Reference
Imports TnT.BasecampVB.BLL
Account
' TnT.BasecampVB.Account
Dim acc As Account = Account.GetAccount()
People
Dim p as Person = Person.GetMe()
Dim p as Person = Person.GetPerson(123456) ' return person with id 123456
Dim people as List(Of Person) = Person.GetPeople()
' returns a list of people associated with project 123456
Dim project_people as List(Of Person) = Person.GetPeopleByProject(123456)
' returns a list of people associated with company 123456
Dim company_people as List(Of Person) = Person.GetPeopleByCompany(123456)
Company
' returns the company with id 123456
Dim c as Company = Company.GetCompany(123456)
Dim companies As List(Of Company) = Company.GetCompanies()
' returns a list of companies associated with project 123456
Dim project_companies As List(Of Company) = Company.GetCompaniesByProject(123456)
Category
' TnT.BasecampVB.Category
Dim cat As Category = Category.GetCategory(123456) ' returns category with id 123456
' returns a list of post categories for project_id 123456
Dim categories as List(Of Category) = Category.GetCategories(123456, CategoryType.post)
' creates a "Client side scripts" message category in project 123456
Dim category_id as Integer = Category.CreateCategory(123456, CategoryType.post, "Client side scripts")
' updates category with id to "Scripts"
Dim success As Boolean = Category.UpdateCategory(123456, "Scripts")
' or to do the same thing
Dim cat as Category = Category.GetCategory(123456)
cat.name = "Scripts"
cat.Update()
Dim success As Boolean = Category.DeleteCategory(123456)
' or
cat.Delete()