@@ -42,6 +42,7 @@ public static void Main(string[] args)
42
42
var client = new CronofyAccountClient ( accessToken ) ;
43
43
44
44
FetchAndPrintCalendars ( client ) ;
45
+ FetchAndPrintEvents ( client ) ;
45
46
46
47
const string EventId = "CronofyExample" ;
47
48
@@ -191,9 +192,12 @@ private static void AttachmentsExample()
191
192
192
193
var attachment = oaClient . CreateAttachment ( new Requests . CreateAttachmentRequest
193
194
{
194
- FileName = "example.txt" ,
195
- ContentType = "text/plain" ,
196
- Base64Content = Convert . ToBase64String ( attachmentContent ) ,
195
+ Attachment = new Requests . CreateAttachmentRequest . AttachmentSummary
196
+ {
197
+ FileName = "example.txt" ,
198
+ ContentType = "text/plain" ,
199
+ Base64Content = Convert . ToBase64String ( attachmentContent ) ,
200
+ } ,
197
201
} ) ;
198
202
199
203
Console . WriteLine ( "Attachment created" ) ;
@@ -254,7 +258,14 @@ private static void FetchAndPrintCalendars(CronofyAccountClient client)
254
258
}
255
259
256
260
Console . WriteLine ( ) ;
261
+ }
257
262
263
+ /// <summary>
264
+ /// Fetches a list of all of the users events and prints a summary to the console.
265
+ /// </summary>
266
+ /// <param name="client">Account client to use to read the list of events.</param>
267
+ private static void FetchAndPrintEvents ( CronofyAccountClient client )
268
+ {
258
269
Console . WriteLine ( "Fetching events..." ) ;
259
270
var events = client . GetEvents ( ) ;
260
271
0 commit comments