@the-convocation/twitter-scraper 0.0.9 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +81 -76
- package/dist/api.js.map +1 -1
- package/dist/auth.js +122 -118
- package/dist/auth.js.map +1 -1
- package/dist/profile.js +108 -102
- package/dist/profile.js.map +1 -1
- package/dist/scraper.js +156 -152
- package/dist/scraper.js.map +1 -1
- package/dist/search.js +90 -83
- package/dist/search.js.map +1 -1
- package/dist/timeline-async.js +63 -58
- package/dist/timeline-async.js.map +1 -1
- package/dist/timeline.js +233 -227
- package/dist/timeline.js.map +1 -1
- package/dist/trends.js +49 -45
- package/dist/trends.js.map +1 -1
- package/dist/tweets.js +64 -58
- package/dist/tweets.js.map +1 -1
- package/dist/types/api.d.ts +15 -15
- package/dist/types/auth.d.ts +54 -54
- package/dist/types/profile.d.ts +66 -66
- package/dist/types/scraper.d.ts +101 -101
- package/dist/types/search.d.ts +18 -18
- package/dist/types/timeline-async.d.ts +14 -14
- package/dist/types/timeline.d.ts +153 -153
- package/dist/types/trends.d.ts +2 -2
- package/dist/types/tweets.d.ts +51 -51
- package/package.json +1 -1
package/dist/types/search.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { TwitterGuestAuth } from './auth';
|
|
2
|
-
import { Profile } from './profile';
|
|
3
|
-
import { QueryProfilesResponse, QueryTweetsResponse } from './timeline';
|
|
4
|
-
import { Tweet } from './tweets';
|
|
5
|
-
/**
|
|
6
|
-
* The categories that can be used in Twitter searches.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum SearchMode {
|
|
9
|
-
Top = 0,
|
|
10
|
-
Latest = 1,
|
|
11
|
-
Photos = 2,
|
|
12
|
-
Videos = 3,
|
|
13
|
-
Users = 4
|
|
14
|
-
}
|
|
15
|
-
export declare function searchTweets(query: string, maxTweets: number, includeReplies: boolean, searchMode: SearchMode, auth: TwitterGuestAuth): AsyncGenerator<Tweet>;
|
|
16
|
-
export declare function searchProfiles(query: string, maxProfiles: number, auth: TwitterGuestAuth): AsyncGenerator<Profile>;
|
|
17
|
-
export declare function fetchSearchTweets(query: string, maxTweets: number, includeReplies: boolean, searchMode: SearchMode, auth: TwitterGuestAuth, cursor?: string): Promise<QueryTweetsResponse>;
|
|
18
|
-
export declare function fetchSearchProfiles(query: string, maxProfiles: number, auth: TwitterGuestAuth, cursor?: string): Promise<QueryProfilesResponse>;
|
|
1
|
+
import { TwitterGuestAuth } from './auth';
|
|
2
|
+
import { Profile } from './profile';
|
|
3
|
+
import { QueryProfilesResponse, QueryTweetsResponse } from './timeline';
|
|
4
|
+
import { Tweet } from './tweets';
|
|
5
|
+
/**
|
|
6
|
+
* The categories that can be used in Twitter searches.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum SearchMode {
|
|
9
|
+
Top = 0,
|
|
10
|
+
Latest = 1,
|
|
11
|
+
Photos = 2,
|
|
12
|
+
Videos = 3,
|
|
13
|
+
Users = 4
|
|
14
|
+
}
|
|
15
|
+
export declare function searchTweets(query: string, maxTweets: number, includeReplies: boolean, searchMode: SearchMode, auth: TwitterGuestAuth): AsyncGenerator<Tweet>;
|
|
16
|
+
export declare function searchProfiles(query: string, maxProfiles: number, auth: TwitterGuestAuth): AsyncGenerator<Profile>;
|
|
17
|
+
export declare function fetchSearchTweets(query: string, maxTweets: number, includeReplies: boolean, searchMode: SearchMode, auth: TwitterGuestAuth, cursor?: string): Promise<QueryTweetsResponse>;
|
|
18
|
+
export declare function fetchSearchProfiles(query: string, maxProfiles: number, auth: TwitterGuestAuth, cursor?: string): Promise<QueryProfilesResponse>;
|
|
19
19
|
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Profile } from './profile';
|
|
2
|
-
import { Tweet } from './tweets';
|
|
3
|
-
export interface FetchProfilesResponse {
|
|
4
|
-
profiles: Profile[];
|
|
5
|
-
next?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare type FetchProfiles = (query: string, maxProfiles: number, cursor: string | undefined) => Promise<FetchProfilesResponse>;
|
|
8
|
-
export interface FetchTweetsResponse {
|
|
9
|
-
tweets: Tweet[];
|
|
10
|
-
next?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare type FetchTweets = (query: string, maxTweets: number, cursor: string | undefined) => Promise<FetchTweetsResponse>;
|
|
13
|
-
export declare function getUserTimeline(query: string, maxProfiles: number, fetchFunc: FetchProfiles): AsyncGenerator<Profile>;
|
|
14
|
-
export declare function getTweetTimeline(query: string, maxTweets: number, fetchFunc: FetchTweets): AsyncGenerator<Tweet>;
|
|
1
|
+
import { Profile } from './profile';
|
|
2
|
+
import { Tweet } from './tweets';
|
|
3
|
+
export interface FetchProfilesResponse {
|
|
4
|
+
profiles: Profile[];
|
|
5
|
+
next?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare type FetchProfiles = (query: string, maxProfiles: number, cursor: string | undefined) => Promise<FetchProfilesResponse>;
|
|
8
|
+
export interface FetchTweetsResponse {
|
|
9
|
+
tweets: Tweet[];
|
|
10
|
+
next?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare type FetchTweets = (query: string, maxTweets: number, cursor: string | undefined) => Promise<FetchTweetsResponse>;
|
|
13
|
+
export declare function getUserTimeline(query: string, maxProfiles: number, fetchFunc: FetchProfiles): AsyncGenerator<Profile>;
|
|
14
|
+
export declare function getTweetTimeline(query: string, maxTweets: number, fetchFunc: FetchTweets): AsyncGenerator<Tweet>;
|
|
15
15
|
//# sourceMappingURL=timeline-async.d.ts.map
|
package/dist/types/timeline.d.ts
CHANGED
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
import { LegacyUserRaw, Profile } from './profile';
|
|
2
|
-
import { PlaceRaw, Tweet } from './tweets';
|
|
3
|
-
export interface Hashtag {
|
|
4
|
-
text?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface TimelineMediaBasicRaw {
|
|
7
|
-
media_url_https?: string;
|
|
8
|
-
type?: string;
|
|
9
|
-
url?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface TimelineUrlBasicRaw {
|
|
12
|
-
expanded_url?: string;
|
|
13
|
-
url?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ExtSensitiveMediaWarningRaw {
|
|
16
|
-
adult_content?: boolean;
|
|
17
|
-
graphic_violence?: boolean;
|
|
18
|
-
other?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface VideoVariant {
|
|
21
|
-
bitrate?: number;
|
|
22
|
-
url?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface VideoInfo {
|
|
25
|
-
variants?: VideoVariant[];
|
|
26
|
-
}
|
|
27
|
-
export interface TimelineMediaExtendedRaw {
|
|
28
|
-
id_str?: string;
|
|
29
|
-
media_url_https?: string;
|
|
30
|
-
ext_sensitive_media_warning?: ExtSensitiveMediaWarningRaw;
|
|
31
|
-
type?: string;
|
|
32
|
-
url?: string;
|
|
33
|
-
video_info?: VideoInfo;
|
|
34
|
-
}
|
|
35
|
-
export interface TimelineTweetRaw {
|
|
36
|
-
conversation_id_str?: string;
|
|
37
|
-
created_at?: string;
|
|
38
|
-
favorite_count?: number;
|
|
39
|
-
full_text?: string;
|
|
40
|
-
entities?: {
|
|
41
|
-
hashtags?: Hashtag[];
|
|
42
|
-
media?: TimelineMediaBasicRaw[];
|
|
43
|
-
urls?: TimelineUrlBasicRaw[];
|
|
44
|
-
};
|
|
45
|
-
extended_entities?: {
|
|
46
|
-
media?: TimelineMediaExtendedRaw[];
|
|
47
|
-
};
|
|
48
|
-
in_reply_to_status_id_str?: string;
|
|
49
|
-
place?: PlaceRaw;
|
|
50
|
-
reply_count?: number;
|
|
51
|
-
retweet_count?: number;
|
|
52
|
-
retweeted_status_id_str?: string;
|
|
53
|
-
quoted_status_id_str?: string;
|
|
54
|
-
time?: string;
|
|
55
|
-
user_id_str?: string;
|
|
56
|
-
}
|
|
57
|
-
export interface TimelineGlobalObjectsRaw {
|
|
58
|
-
tweets?: {
|
|
59
|
-
[key: string]: TimelineTweetRaw | undefined;
|
|
60
|
-
};
|
|
61
|
-
users?: {
|
|
62
|
-
[key: string]: LegacyUserRaw | undefined;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
export interface TimelineDataRawCursor {
|
|
66
|
-
value?: string;
|
|
67
|
-
cursorType?: string;
|
|
68
|
-
}
|
|
69
|
-
export interface TimelineDataRawEntity {
|
|
70
|
-
id?: string;
|
|
71
|
-
}
|
|
72
|
-
export interface TimelineDataRawModuleItem {
|
|
73
|
-
clientEventInfo?: {
|
|
74
|
-
details?: {
|
|
75
|
-
guideDetails?: {
|
|
76
|
-
transparentGuideDetails?: {
|
|
77
|
-
trendMetadata?: {
|
|
78
|
-
trendName?: string;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
export interface TimelineDataRawAddEntry {
|
|
86
|
-
content?: {
|
|
87
|
-
item?: {
|
|
88
|
-
content?: {
|
|
89
|
-
tweet?: TimelineDataRawEntity;
|
|
90
|
-
user?: TimelineDataRawEntity;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
operation?: {
|
|
94
|
-
cursor?: TimelineDataRawCursor;
|
|
95
|
-
};
|
|
96
|
-
timelineModule?: {
|
|
97
|
-
items?: {
|
|
98
|
-
item?: TimelineDataRawModuleItem;
|
|
99
|
-
}[];
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
export interface TimelineDataRawPinEntry {
|
|
104
|
-
content?: {
|
|
105
|
-
item?: {
|
|
106
|
-
content?: {
|
|
107
|
-
tweet?: TimelineDataRawEntity;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
export interface TimelineDataRawReplaceEntry {
|
|
113
|
-
content?: {
|
|
114
|
-
operation?: {
|
|
115
|
-
cursor?: TimelineDataRawCursor;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
export interface TimelineDataRawInstruction {
|
|
120
|
-
addEntries?: {
|
|
121
|
-
entries?: TimelineDataRawAddEntry[];
|
|
122
|
-
};
|
|
123
|
-
pinEntry?: {
|
|
124
|
-
entry?: TimelineDataRawPinEntry;
|
|
125
|
-
};
|
|
126
|
-
replaceEntry?: {
|
|
127
|
-
entry?: TimelineDataRawReplaceEntry;
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
export interface TimelineDataRaw {
|
|
131
|
-
instructions?: TimelineDataRawInstruction[];
|
|
132
|
-
}
|
|
133
|
-
export interface TimelineRaw {
|
|
134
|
-
globalObjects?: TimelineGlobalObjectsRaw;
|
|
135
|
-
timeline?: TimelineDataRaw;
|
|
136
|
-
}
|
|
137
|
-
export declare function parseTweet(timeline: TimelineRaw, id: string): Tweet | null;
|
|
138
|
-
/**
|
|
139
|
-
* A paginated tweets API response. The `next` field can be used to fetch the next page of results.
|
|
140
|
-
*/
|
|
141
|
-
export interface QueryTweetsResponse {
|
|
142
|
-
tweets: Tweet[];
|
|
143
|
-
next?: string;
|
|
144
|
-
}
|
|
145
|
-
export declare function parseTweets(timeline: TimelineRaw): QueryTweetsResponse;
|
|
146
|
-
/**
|
|
147
|
-
* A paginated profiles API response. The `next` field can be used to fetch the next page of results.
|
|
148
|
-
*/
|
|
149
|
-
export interface QueryProfilesResponse {
|
|
150
|
-
profiles: Profile[];
|
|
151
|
-
next?: string;
|
|
152
|
-
}
|
|
153
|
-
export declare function parseUsers(timeline: TimelineRaw): QueryProfilesResponse;
|
|
1
|
+
import { LegacyUserRaw, Profile } from './profile';
|
|
2
|
+
import { PlaceRaw, Tweet } from './tweets';
|
|
3
|
+
export interface Hashtag {
|
|
4
|
+
text?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TimelineMediaBasicRaw {
|
|
7
|
+
media_url_https?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TimelineUrlBasicRaw {
|
|
12
|
+
expanded_url?: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ExtSensitiveMediaWarningRaw {
|
|
16
|
+
adult_content?: boolean;
|
|
17
|
+
graphic_violence?: boolean;
|
|
18
|
+
other?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface VideoVariant {
|
|
21
|
+
bitrate?: number;
|
|
22
|
+
url?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface VideoInfo {
|
|
25
|
+
variants?: VideoVariant[];
|
|
26
|
+
}
|
|
27
|
+
export interface TimelineMediaExtendedRaw {
|
|
28
|
+
id_str?: string;
|
|
29
|
+
media_url_https?: string;
|
|
30
|
+
ext_sensitive_media_warning?: ExtSensitiveMediaWarningRaw;
|
|
31
|
+
type?: string;
|
|
32
|
+
url?: string;
|
|
33
|
+
video_info?: VideoInfo;
|
|
34
|
+
}
|
|
35
|
+
export interface TimelineTweetRaw {
|
|
36
|
+
conversation_id_str?: string;
|
|
37
|
+
created_at?: string;
|
|
38
|
+
favorite_count?: number;
|
|
39
|
+
full_text?: string;
|
|
40
|
+
entities?: {
|
|
41
|
+
hashtags?: Hashtag[];
|
|
42
|
+
media?: TimelineMediaBasicRaw[];
|
|
43
|
+
urls?: TimelineUrlBasicRaw[];
|
|
44
|
+
};
|
|
45
|
+
extended_entities?: {
|
|
46
|
+
media?: TimelineMediaExtendedRaw[];
|
|
47
|
+
};
|
|
48
|
+
in_reply_to_status_id_str?: string;
|
|
49
|
+
place?: PlaceRaw;
|
|
50
|
+
reply_count?: number;
|
|
51
|
+
retweet_count?: number;
|
|
52
|
+
retweeted_status_id_str?: string;
|
|
53
|
+
quoted_status_id_str?: string;
|
|
54
|
+
time?: string;
|
|
55
|
+
user_id_str?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface TimelineGlobalObjectsRaw {
|
|
58
|
+
tweets?: {
|
|
59
|
+
[key: string]: TimelineTweetRaw | undefined;
|
|
60
|
+
};
|
|
61
|
+
users?: {
|
|
62
|
+
[key: string]: LegacyUserRaw | undefined;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export interface TimelineDataRawCursor {
|
|
66
|
+
value?: string;
|
|
67
|
+
cursorType?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface TimelineDataRawEntity {
|
|
70
|
+
id?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface TimelineDataRawModuleItem {
|
|
73
|
+
clientEventInfo?: {
|
|
74
|
+
details?: {
|
|
75
|
+
guideDetails?: {
|
|
76
|
+
transparentGuideDetails?: {
|
|
77
|
+
trendMetadata?: {
|
|
78
|
+
trendName?: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export interface TimelineDataRawAddEntry {
|
|
86
|
+
content?: {
|
|
87
|
+
item?: {
|
|
88
|
+
content?: {
|
|
89
|
+
tweet?: TimelineDataRawEntity;
|
|
90
|
+
user?: TimelineDataRawEntity;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
operation?: {
|
|
94
|
+
cursor?: TimelineDataRawCursor;
|
|
95
|
+
};
|
|
96
|
+
timelineModule?: {
|
|
97
|
+
items?: {
|
|
98
|
+
item?: TimelineDataRawModuleItem;
|
|
99
|
+
}[];
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export interface TimelineDataRawPinEntry {
|
|
104
|
+
content?: {
|
|
105
|
+
item?: {
|
|
106
|
+
content?: {
|
|
107
|
+
tweet?: TimelineDataRawEntity;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export interface TimelineDataRawReplaceEntry {
|
|
113
|
+
content?: {
|
|
114
|
+
operation?: {
|
|
115
|
+
cursor?: TimelineDataRawCursor;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export interface TimelineDataRawInstruction {
|
|
120
|
+
addEntries?: {
|
|
121
|
+
entries?: TimelineDataRawAddEntry[];
|
|
122
|
+
};
|
|
123
|
+
pinEntry?: {
|
|
124
|
+
entry?: TimelineDataRawPinEntry;
|
|
125
|
+
};
|
|
126
|
+
replaceEntry?: {
|
|
127
|
+
entry?: TimelineDataRawReplaceEntry;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export interface TimelineDataRaw {
|
|
131
|
+
instructions?: TimelineDataRawInstruction[];
|
|
132
|
+
}
|
|
133
|
+
export interface TimelineRaw {
|
|
134
|
+
globalObjects?: TimelineGlobalObjectsRaw;
|
|
135
|
+
timeline?: TimelineDataRaw;
|
|
136
|
+
}
|
|
137
|
+
export declare function parseTweet(timeline: TimelineRaw, id: string): Tweet | null;
|
|
138
|
+
/**
|
|
139
|
+
* A paginated tweets API response. The `next` field can be used to fetch the next page of results.
|
|
140
|
+
*/
|
|
141
|
+
export interface QueryTweetsResponse {
|
|
142
|
+
tweets: Tweet[];
|
|
143
|
+
next?: string;
|
|
144
|
+
}
|
|
145
|
+
export declare function parseTweets(timeline: TimelineRaw): QueryTweetsResponse;
|
|
146
|
+
/**
|
|
147
|
+
* A paginated profiles API response. The `next` field can be used to fetch the next page of results.
|
|
148
|
+
*/
|
|
149
|
+
export interface QueryProfilesResponse {
|
|
150
|
+
profiles: Profile[];
|
|
151
|
+
next?: string;
|
|
152
|
+
}
|
|
153
|
+
export declare function parseUsers(timeline: TimelineRaw): QueryProfilesResponse;
|
|
154
154
|
//# sourceMappingURL=timeline.d.ts.map
|
package/dist/types/trends.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TwitterGuestAuth } from './auth';
|
|
2
|
-
export declare function getTrends(auth: TwitterGuestAuth): Promise<string[]>;
|
|
1
|
+
import { TwitterGuestAuth } from './auth';
|
|
2
|
+
export declare function getTrends(auth: TwitterGuestAuth): Promise<string[]>;
|
|
3
3
|
//# sourceMappingURL=trends.d.ts.map
|
package/dist/types/tweets.d.ts
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { TwitterGuestAuth } from './auth';
|
|
2
|
-
import { QueryTweetsResponse } from './timeline';
|
|
3
|
-
export interface Video {
|
|
4
|
-
id: string;
|
|
5
|
-
preview: string;
|
|
6
|
-
url?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface PlaceRaw {
|
|
9
|
-
id?: string;
|
|
10
|
-
place_type?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
full_name?: string;
|
|
13
|
-
country_code?: string;
|
|
14
|
-
country?: string;
|
|
15
|
-
bounding_box?: {
|
|
16
|
-
type?: string;
|
|
17
|
-
coordinates?: number[][][];
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* A parsed Tweet object.
|
|
22
|
-
*/
|
|
23
|
-
export interface Tweet {
|
|
24
|
-
hashtags: string[];
|
|
25
|
-
html?: string;
|
|
26
|
-
id?: string;
|
|
27
|
-
inReplyToStatus?: Tweet;
|
|
28
|
-
isQuoted?: boolean;
|
|
29
|
-
isPin?: boolean;
|
|
30
|
-
isReply?: boolean;
|
|
31
|
-
isRetweet?: boolean;
|
|
32
|
-
likes?: number;
|
|
33
|
-
permanentUrl?: string;
|
|
34
|
-
photos: string[];
|
|
35
|
-
place?: PlaceRaw;
|
|
36
|
-
quotedStatus?: Tweet;
|
|
37
|
-
replies?: number;
|
|
38
|
-
retweets?: number;
|
|
39
|
-
retweetedStatus?: Tweet;
|
|
40
|
-
text?: string;
|
|
41
|
-
timeParsed?: Date;
|
|
42
|
-
timestamp?: number;
|
|
43
|
-
urls: string[];
|
|
44
|
-
userId?: string;
|
|
45
|
-
username?: string;
|
|
46
|
-
videos: Video[];
|
|
47
|
-
sensitiveContent?: boolean;
|
|
48
|
-
}
|
|
49
|
-
export declare function fetchTweets(user: string, maxTweets: number, includeReplies: boolean, cursor: string | undefined, auth: TwitterGuestAuth): Promise<QueryTweetsResponse>;
|
|
50
|
-
export declare function getTweets(user: string, maxTweets: number, includeReplies: boolean, auth: TwitterGuestAuth): AsyncGenerator<Tweet>;
|
|
51
|
-
export declare function getTweet(id: string, includeReplies: boolean, auth: TwitterGuestAuth): Promise<Tweet | null>;
|
|
1
|
+
import { TwitterGuestAuth } from './auth';
|
|
2
|
+
import { QueryTweetsResponse } from './timeline';
|
|
3
|
+
export interface Video {
|
|
4
|
+
id: string;
|
|
5
|
+
preview: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PlaceRaw {
|
|
9
|
+
id?: string;
|
|
10
|
+
place_type?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
full_name?: string;
|
|
13
|
+
country_code?: string;
|
|
14
|
+
country?: string;
|
|
15
|
+
bounding_box?: {
|
|
16
|
+
type?: string;
|
|
17
|
+
coordinates?: number[][][];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A parsed Tweet object.
|
|
22
|
+
*/
|
|
23
|
+
export interface Tweet {
|
|
24
|
+
hashtags: string[];
|
|
25
|
+
html?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
inReplyToStatus?: Tweet;
|
|
28
|
+
isQuoted?: boolean;
|
|
29
|
+
isPin?: boolean;
|
|
30
|
+
isReply?: boolean;
|
|
31
|
+
isRetweet?: boolean;
|
|
32
|
+
likes?: number;
|
|
33
|
+
permanentUrl?: string;
|
|
34
|
+
photos: string[];
|
|
35
|
+
place?: PlaceRaw;
|
|
36
|
+
quotedStatus?: Tweet;
|
|
37
|
+
replies?: number;
|
|
38
|
+
retweets?: number;
|
|
39
|
+
retweetedStatus?: Tweet;
|
|
40
|
+
text?: string;
|
|
41
|
+
timeParsed?: Date;
|
|
42
|
+
timestamp?: number;
|
|
43
|
+
urls: string[];
|
|
44
|
+
userId?: string;
|
|
45
|
+
username?: string;
|
|
46
|
+
videos: Video[];
|
|
47
|
+
sensitiveContent?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export declare function fetchTweets(user: string, maxTweets: number, includeReplies: boolean, cursor: string | undefined, auth: TwitterGuestAuth): Promise<QueryTweetsResponse>;
|
|
50
|
+
export declare function getTweets(user: string, maxTweets: number, includeReplies: boolean, auth: TwitterGuestAuth): AsyncGenerator<Tweet>;
|
|
51
|
+
export declare function getTweet(id: string, includeReplies: boolean, auth: TwitterGuestAuth): Promise<Tweet | null>;
|
|
52
52
|
//# sourceMappingURL=tweets.d.ts.map
|
package/package.json
CHANGED