You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/objects/Badge.ts
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,19 @@ import {ShallowUser} from './ShallowUser';
2
2
3
3
import{TypeBadge}from'../result-types/TypeBadge';
4
4
5
+
/**
6
+
* The equivalent of [Type badge](https://api.stackexchange.com/docs/types/badge).<br>
7
+
* This object represents a Badge on a [Stack Exchange site](https://stackexchange.com/sites).<br>
8
+
* Some Badges, like "Autobiographer", are held in common across all Stack Exchange sites. Others, like most tag badges, vary on a site by site basis.<br>
9
+
* Remember that ids are never guaranteed to be the same between sites, even if a Badge exists on both sites.
10
+
*/
5
11
exportclassBadge{
6
12
7
13
publicawardCount: number;
8
14
15
+
/**
16
+
* Refers to a [[Badge]]
17
+
*/
9
18
publicbadgeId: number;
10
19
11
20
publicbadgeType: 'named'|'tag_based';
@@ -18,6 +27,9 @@ export class Badge {
18
27
19
28
publicrank: 'gold'|'silver'|'bronze';
20
29
30
+
/**
31
+
* *May be absent, in which case it is set to `null`*
* The equivalent of [Type comment](https://api.stackexchange.com/docs/types/comment).<br>
7
+
* All [[Question|Questions]] and [[Answer|Answers]] on a [Stack Exchange site](https://stackexchange.com/sites) can be commented on, and this object represents those Comments.<br>
8
+
* Comments can also be optionally directed at users, when this is the case the [[replyToUser]] property is set.
9
+
*/
5
10
exportclassComment{
6
11
7
12
publicbody?: string;
@@ -10,6 +15,9 @@ export class Comment {
10
15
11
16
publiccanFlag?: boolean;
12
17
18
+
/**
19
+
* Refers to a [[Comment]]
20
+
*/
13
21
publiccommentId: number;
14
22
15
23
publiccreationDate: Date;
@@ -18,12 +26,21 @@ export class Comment {
18
26
19
27
publiclink?: string;
20
28
29
+
/**
30
+
* *May be absent, in which case it is set to `null`*
31
+
*/
21
32
publicowner?: ShallowUser;
22
33
34
+
/**
35
+
* Refers to a [[Post]]
36
+
*/
23
37
publicpostId: number;
24
38
25
39
publicpostType?: 'question'|'answer';
26
40
41
+
/**
42
+
* *May be absent, in which case it is set to `null`*
0 commit comments