static async Task RunSample2Async(AppConfig appConfig) { int accountId = 999999999; string clientId = "YOUR_CLIENT_ID"; string clientSecret = "YOUR_CLIENT_SECRET"; string redirectUrl = "YOUR_REDIRECT_URL"; string refreshToken = "YOUR_REFRESH_TOKEN"; accountId = appConfig.AccountId; clientId = appConfig.ClientId; clientSecret = appConfig.ClientSecret; redirectUrl = appConfig.RedirectUrl; refreshToken = appConfig.RefreshToken; var accessTokenSource = new AccessTokenSource( clientId: clientId, clientSecret: clientSecret, redirectUrl: redirectUrl, refreshToken: refreshToken ); var basecampClient = new BasecampClient(accountId, accessTokenSource); var projects = await basecampClient.GetProjectsAsync(); foreach (var project in projects.AsReadToEndEnumerable()) { Console.WriteLine($"Project {project.Name} ({project.Id})"); } var projectEnumerator = projects.GetReadToEndEnumerator(); while (await projectEnumerator.MoveNextAsync(CancellationToken.None)) { var project = projectEnumerator.Current; Console.WriteLine($"Project {project.Name} ({project.Id})"); } var recordings = await basecampClient.GetRecordingsAsync(RecordingTypeEnum.ScheduleEntry); var bucketId = recordings.First().Bucket.Id.Value; var recordingId = recordings.First().Id.Value; var events = await basecampClient.GetEventsAsync(bucketId, recordingId); Console.WriteLine(); Console.WriteLine("First Page Events:"); foreach (var e in events) { Console.WriteLine($"Event {e.Action} ({e.Id})"); } }