-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathReaction.js
More file actions
31 lines (25 loc) · 819 Bytes
/
Reaction.js
File metadata and controls
31 lines (25 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// @flow
import { request, required } from './Client'
// flow types
import type { FetchOptions } from './Client';
type createReactionOnIssueParams = {
content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray",
}
export function createReactionOnIssue(
owner: string = required("owner"),
repo: string = required("repo"),
number: string = required("number"),
params: createReactionOnIssueParams,
options?: FetchOptions
): Promise<any> {
return request(`/repos/${owner}/${repo}/issues/${number}/reactions`, params, "DELETE", options);
}
type deleteReactionParams = {
}
export function deleteReaction(
id: string = required("id"),
params: deleteReactionParams,
options?: FetchOptions
): Promise<any> {
return request(`/reactions/${id}`, params, "DELETE", options);
}