Basecamp API

Below is the documentation for the Basecamp API.

Namespaces needed to run the api
using DotNet37Signals.Client.Basecamp;
using DotNet37Signals.Client.Basecamp.Contracts;
using DotNet37Signals.Client.Basecamp.Models;

Extantiate the client class
var username = ConfigurationManager.AppSettings["username"];
var password = ConfigurationManager.AppSettings["password"];
var company = ConfigurationManager.AppSettings["company"];
var keepAliveEnabled = Convert.ToBoolean(ConfigurationManager.AppSettings["keepAliveEnabled"]);
var maxReceivedMessageSize = Convert.ToInt32(ConfigurationManager.AppSettings["maxReceivedMessageSize"]);

var credentials = new Credentials(username, password, company, keepAliveEnabled, maxReceivedMessageSize);
var client = new BasecampClient(credentials);

Basecamp Services

Account

// Get: Account
var account = client.Account.Get();

Projects

// Get: Project Count
var count = client.Projects.Count();
// Post: Create Project
var id = client.Projects.Create(Project project);
// Get: Project by Id
var project = client.Projects.Get(string projectId);
var project = client.Projects.Get(int projectId);
// Get: All Projects
var list = client.Projects.GetList();
// Put: Update Project
client.Projects.Update(string projectId, Project project);
client.Projects.Update(int projectId, Project project);

People

// Get: Person By Id
var person = client.People.Get(string personId);
var person = client.People.Get(int personId);
// Get: All People
var list = client.People.GetList();
// Get: People in Company
var list = client.People.GetListInCompany(string companyId);
var list = client.People.GetListInCompany(int companyId);
// Get: People in Project
var list = client.People.GetListInProject(string projectId);
var list = client.People.GetListInProject(int projectId);
// Get: Authenticated Person
var me = client.People.Me();

Companies

// Get: Company by Id
var company = client.Companies.Get(string companyId);
var company = client.Companies.Get(int companyId);
// Get: All Companies
var list = client.Companies.GetList();
// Get: Companies in Project
var list = client.Companies.GetListInProject(string projectId);
var list = client.Companies.GetListInProject(int projectId);

Categories

// Post: Create Category
var id = client.Categories.Create(string projectId, CategoryNew category);
var id = client.Categories.Create(int projectId, CategoryNew category);
// Delete: Category
client.Categories.Delete(string categoryId);
client.Categories.Delete(int categoryId);
// Get: Category by Id
var category = client.Categories.Get(string categoryId);
var category = client.Categories.Get(int categoryId);
// Get: All Categories by Project
var list = client.Categories.GetList(string projectId);
var list = client.Categories.GetList(int projectId);
// Get: All Categories by Project and Type
var list = client.Categories.GetListByType(string projectId, CategoryType type);
var list = client.Categories.GetListByType(int projectId, CategoryType type);
// Put: Update Category
client.Categories.Update(string categoryId, CategoryUpdate category);
client.Categories.Update(int categoryId, CategoryUpdate category);

Messages

TBD

Comments

TBD

To-do Lists

TBD

To-do List Items

TBD

Calendar Entries

TBD

Time Tracking

TBD

Files

TBD

Last edited Jan 7, 2012 at 5:43 PM by spardo, version 15

Comments

No comments yet.