@@ -409,6 +409,35 @@ export class Qiita {
409
409
return this . delete ( `${ this . endpoint } ${ this . version } /comments/${ commentId } ` ) ;
410
410
}
411
411
412
+ /**
413
+ * コメントに付けられた絵文字リアクション一覧を作成日時の降順で返します。
414
+ * @param commentId コメントID
415
+ * @return 絵文字リアクション
416
+ */
417
+ public fetchCommentReactions = ( commentId : string , name : string ) : Promise < Qiita . Reaction [ ] > => {
418
+ return this . get ( `${ this . endpoint } ${ this . version } /comments/${ commentId } /reactions` ) ;
419
+ }
420
+
421
+ /**
422
+ * コメントに絵文字リアクションを付けます。
423
+ * @param commentId コメントID
424
+ * @param name 絵文字の識別子
425
+ * @return 絵文字リアクション
426
+ */
427
+ public createCommentReaction = ( commentId : string , name : string ) : Promise < Qiita . Reaction > => {
428
+ return this . post ( `${ this . endpoint } ${ this . version } /comments/${ commentId } /reactions` , { name } ) ;
429
+ }
430
+
431
+ /**
432
+ * コメントから絵文字リアクションを削除します。
433
+ * @param commentId コメントID
434
+ * @param name 絵文字の識別子
435
+ * @return 絵文字リアクション
436
+ */
437
+ public deleteCommentReaction = ( commentId : string , name : string ) : Promise < Qiita . Reaction > => {
438
+ return this . delete ( `${ this . endpoint } ${ this . version } /comments/${ commentId } /reactions` , { name } ) ;
439
+ }
440
+
412
441
413
442
/**
414
443
* タグ一覧を作成日時の降順で返します。
@@ -606,6 +635,35 @@ export class Qiita {
606
635
return this . post ( `${ this . endpoint } ${ this . version } /projects/${ projectId } /comments` , { body } ) ;
607
636
}
608
637
638
+ /**
639
+ * プロジェクトに付けられた絵文字リアクション一覧を作成日時の降順で返します。
640
+ * @param projectId プロジェクトID
641
+ * @return 絵文字リアクション一覧
642
+ */
643
+ public fetchProjectReactions = ( projectId : string ) : Promise < Qiita . Reaction [ ] > => {
644
+ return this . get ( `${ this . endpoint } ${ this . version } /projects/${ projectId } /reactions` ) ;
645
+ }
646
+
647
+ /**
648
+ * プロジェクトに絵文字リアクションを付けます。
649
+ * @param projectId プロジェクトID
650
+ * @param name 絵文字の識別子
651
+ * @return 絵文字リアクション
652
+ */
653
+ public createProjectReaction = ( projectId : string , name : string ) : Promise < Qiita . Reaction > => {
654
+ return this . post ( `${ this . endpoint } ${ this . version } /projects/${ projectId } /reactions` , { name } ) ;
655
+ }
656
+
657
+ /**
658
+ * プロジェクトから絵文字リアクションを削除します。
659
+ * @param projectId プロジェクトID
660
+ * @param name 絵文字の識別子
661
+ * @return 絵文字リアクション
662
+ */
663
+ public deleteProjectReaction = ( projectId : string , name : string ) : Promise < Qiita . Reaction > => {
664
+ return this . delete ( `${ this . endpoint } ${ this . version } /projects/${ projectId } /reactions` , { name } ) ;
665
+ }
666
+
609
667
610
668
/**
611
669
* 全てのユーザの一覧を作成日時の降順で取得します。
@@ -871,6 +929,35 @@ export class Qiita {
871
929
return this . delete ( `${ this . endpoint } ${ this . version } /items/${ itemId } /stock` ) ;
872
930
}
873
931
932
+ /**
933
+ * 記事に付けられた絵文字リアクション一覧を作成日時の降順で返します。
934
+ * @param itemId 投稿ID
935
+ * @return 絵文字リアクション
936
+ */
937
+ public fetchItemReactions = ( itemId : string ) : Promise < Qiita . Reaction [ ] > => {
938
+ return this . post ( `${ this . endpoint } ${ this . version } /items/${ itemId } /reactions` ) ;
939
+ }
940
+
941
+ /**
942
+ * 記事に絵文字リアクションを付けます。
943
+ * @param itemId 投稿ID
944
+ * @param name 絵文字の識別子
945
+ * @return 絵文字リアクション
946
+ */
947
+ public createItemReaction = ( itemId : string , name : string ) : Promise < Qiita . Reaction > => {
948
+ return this . post ( `${ this . endpoint } ${ this . version } /items/${ itemId } /reactions` , { name } ) ;
949
+ }
950
+
951
+ /**
952
+ * 記事から絵文字リアクションを削除します。
953
+ * @param itemId 投稿ID
954
+ * @param name 絵文字の識別子
955
+ * @return 絵文字リアクション
956
+ */
957
+ public deleteItemReaction = ( itemId : string , name : string ) : Promise < Qiita . Reaction > => {
958
+ return this . delete ( `${ this . endpoint } ${ this . version } /items/${ itemId } /reactions` , { name } ) ;
959
+ }
960
+
874
961
/**
875
962
* 投稿につけられた「いいね!」を作成日時の降順で返します。
876
963
* @param itemId 投稿のID
@@ -966,8 +1053,6 @@ export class Qiita {
966
1053
return this . delete ( `${ this . endpoint } ${ this . version } /team_invitations` ) ;
967
1054
}
968
1055
969
- // todo emoji reaction
970
-
971
1056
/**
972
1057
* アクセストークンに紐付いたユーザを返します。
973
1058
* @return 認証中のユーザ
0 commit comments