@@ -306,5 +306,188 @@ public static IAsyncResult OutgoingRequests(OAuthTokens tokens, OutgoingFriendsh
306
306
} ,
307
307
null ) ;
308
308
}
309
+
310
+ /// <summary>
311
+ /// Returns the numeric IDs for every user the specified user is does not want to see retweets from.
312
+ /// </summary>
313
+ /// <param name="tokens">The tokens.</param>
314
+ /// <param name="options">The options.</param>
315
+ /// <param name="timeout">The timeout.</param>
316
+ /// <param name="function">The function.</param>
317
+ /// <returns></returns>
318
+ public static IAsyncResult NoRetweetIDs ( OAuthTokens tokens , OptionalProperties options , TimeSpan timeout , Action < TwitterAsyncResponse < UserIdCollection > > function )
319
+ {
320
+ Func < OAuthTokens , OptionalProperties , TwitterResponse < UserIdCollection > > methodToCall = TwitterFriendship . NoRetweetIDs ;
321
+
322
+ return methodToCall . BeginInvoke (
323
+ tokens ,
324
+ options ,
325
+ result =>
326
+ {
327
+ result . AsyncWaitHandle . WaitOne ( timeout ) ;
328
+ try
329
+ {
330
+ function ( methodToCall . EndInvoke ( result ) . ToAsyncResponse ( ) ) ;
331
+ }
332
+ catch ( Exception ex )
333
+ {
334
+ function ( new TwitterAsyncResponse < UserIdCollection > ( ) { Result = RequestResult . Unknown , ExceptionThrown = ex } ) ;
335
+ }
336
+ } ,
337
+ null ) ;
338
+ }
339
+
340
+ /// <summary>
341
+ /// Returns the numeric IDs for every user the specified user is does not want to see retweets from.
342
+ /// </summary>
343
+ /// <param name="tokens">The tokens.</param>
344
+ /// <param name="timeout">The timeout.</param>
345
+ /// <param name="function">The function.</param>
346
+ /// <returns></returns>
347
+ public static IAsyncResult NoRetweetIDs ( OAuthTokens tokens , TimeSpan timeout , Action < TwitterAsyncResponse < UserIdCollection > > function )
348
+ {
349
+ Func < OAuthTokens , TwitterResponse < UserIdCollection > > methodToCall = TwitterFriendship . NoRetweetIDs ;
350
+
351
+ return methodToCall . BeginInvoke (
352
+ tokens ,
353
+ result =>
354
+ {
355
+ result . AsyncWaitHandle . WaitOne ( timeout ) ;
356
+ try
357
+ {
358
+ function ( methodToCall . EndInvoke ( result ) . ToAsyncResponse ( ) ) ;
359
+ }
360
+ catch ( Exception ex )
361
+ {
362
+ function ( new TwitterAsyncResponse < UserIdCollection > ( ) { Result = RequestResult . Unknown , ExceptionThrown = ex } ) ;
363
+ }
364
+ } ,
365
+ null ) ;
366
+ }
367
+
368
+
369
+ /// <summary>
370
+ /// Updates the friendship.
371
+ /// </summary>
372
+ /// <param name="tokens">The tokens.</param>
373
+ /// <param name="userid">The userid.</param>
374
+ /// <param name="options">The options.</param>
375
+ /// <param name="timeout">The timeout.</param>
376
+ /// <param name="function">The function.</param>
377
+ /// <returns></returns>
378
+ public static IAsyncResult Update ( OAuthTokens tokens , decimal userid , UpdateFriendshipOptions options , TimeSpan timeout , Action < TwitterAsyncResponse < TwitterRelationship > > function )
379
+ {
380
+ Func < OAuthTokens , decimal , UpdateFriendshipOptions , TwitterResponse < TwitterRelationship > > methodToCall = TwitterFriendship . Update ;
381
+
382
+ return methodToCall . BeginInvoke (
383
+ tokens ,
384
+ userid ,
385
+ options ,
386
+ result =>
387
+ {
388
+ result . AsyncWaitHandle . WaitOne ( timeout ) ;
389
+ try
390
+ {
391
+ function ( methodToCall . EndInvoke ( result ) . ToAsyncResponse ( ) ) ;
392
+ }
393
+ catch ( Exception ex )
394
+ {
395
+ function ( new TwitterAsyncResponse < TwitterRelationship > ( ) { Result = RequestResult . Unknown , ExceptionThrown = ex } ) ;
396
+ }
397
+ } ,
398
+ null ) ;
399
+ }
400
+
401
+ /// <summary>
402
+ /// Returns the numeric IDs for every user the specified user is does not want to see retweets from.
403
+ /// </summary>
404
+ /// <param name="tokens">The tokens.</param>
405
+ /// <param name="userid">The userid.</param>
406
+ /// <param name="timeout">The timeout.</param>
407
+ /// <param name="function">The function.</param>
408
+ /// <returns></returns>
409
+ public static IAsyncResult Update ( OAuthTokens tokens , decimal userid , TimeSpan timeout , Action < TwitterAsyncResponse < TwitterRelationship > > function )
410
+ {
411
+ Func < OAuthTokens , decimal , TwitterResponse < TwitterRelationship > > methodToCall = TwitterFriendship . Update ;
412
+
413
+ return methodToCall . BeginInvoke (
414
+ tokens ,
415
+ userid ,
416
+ result =>
417
+ {
418
+ result . AsyncWaitHandle . WaitOne ( timeout ) ;
419
+ try
420
+ {
421
+ function ( methodToCall . EndInvoke ( result ) . ToAsyncResponse ( ) ) ;
422
+ }
423
+ catch ( Exception ex )
424
+ {
425
+ function ( new TwitterAsyncResponse < TwitterRelationship > ( ) { Result = RequestResult . Unknown , ExceptionThrown = ex } ) ;
426
+ }
427
+ } ,
428
+ null ) ;
429
+ }
430
+
431
+ /// <summary>
432
+ /// Updates the friendship.
433
+ /// </summary>
434
+ /// <param name="tokens">The tokens.</param>
435
+ /// <param name="screenname">The screenname.</param>
436
+ /// <param name="options">The options.</param>
437
+ /// <param name="timeout">The timeout.</param>
438
+ /// <param name="function">The function.</param>
439
+ /// <returns></returns>
440
+ public static IAsyncResult Update ( OAuthTokens tokens , string screenname , UpdateFriendshipOptions options , TimeSpan timeout , Action < TwitterAsyncResponse < TwitterRelationship > > function )
441
+ {
442
+ Func < OAuthTokens , string , UpdateFriendshipOptions , TwitterResponse < TwitterRelationship > > methodToCall = TwitterFriendship . Update ;
443
+
444
+ return methodToCall . BeginInvoke (
445
+ tokens ,
446
+ screenname ,
447
+ options ,
448
+ result =>
449
+ {
450
+ result . AsyncWaitHandle . WaitOne ( timeout ) ;
451
+ try
452
+ {
453
+ function ( methodToCall . EndInvoke ( result ) . ToAsyncResponse ( ) ) ;
454
+ }
455
+ catch ( Exception ex )
456
+ {
457
+ function ( new TwitterAsyncResponse < TwitterRelationship > ( ) { Result = RequestResult . Unknown , ExceptionThrown = ex } ) ;
458
+ }
459
+ } ,
460
+ null ) ;
461
+ }
462
+
463
+ /// <summary>
464
+ /// Returns the numeric IDs for every user the specified user is does not want to see retweets from.
465
+ /// </summary>
466
+ /// <param name="tokens">The tokens.</param>
467
+ /// <param name="screenname">The screenname.</param>
468
+ /// <param name="timeout">The timeout.</param>
469
+ /// <param name="function">The function.</param>
470
+ /// <returns></returns>
471
+ public static IAsyncResult Update ( OAuthTokens tokens , string screenname , TimeSpan timeout , Action < TwitterAsyncResponse < TwitterRelationship > > function )
472
+ {
473
+ Func < OAuthTokens , string , TwitterResponse < TwitterRelationship > > methodToCall = TwitterFriendship . Update ;
474
+
475
+ return methodToCall . BeginInvoke (
476
+ tokens ,
477
+ screenname ,
478
+ result =>
479
+ {
480
+ result . AsyncWaitHandle . WaitOne ( timeout ) ;
481
+ try
482
+ {
483
+ function ( methodToCall . EndInvoke ( result ) . ToAsyncResponse ( ) ) ;
484
+ }
485
+ catch ( Exception ex )
486
+ {
487
+ function ( new TwitterAsyncResponse < TwitterRelationship > ( ) { Result = RequestResult . Unknown , ExceptionThrown = ex } ) ;
488
+ }
489
+ } ,
490
+ null ) ;
491
+ }
309
492
}
310
493
}
0 commit comments