triangle-utils 1.4.146 → 1.4.147
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/src/UtilsTwitter.js
CHANGED
|
@@ -77,6 +77,7 @@ export class UtilsTwitter {
|
|
|
77
77
|
}
|
|
78
78
|
async get_tweets(user_id, options) {
|
|
79
79
|
const compile = options.compile !== undefined ? options.compile : true;
|
|
80
|
+
const verbosity = options.verbosity || 0;
|
|
80
81
|
const results = [];
|
|
81
82
|
let token = undefined;
|
|
82
83
|
for (let p = 0; options.num_pages === undefined || p < options.num_pages; p++) {
|
|
@@ -105,7 +106,9 @@ export class UtilsTwitter {
|
|
|
105
106
|
}
|
|
106
107
|
results.push(...(response.data || []));
|
|
107
108
|
token = (response.meta || {}).nextToken;
|
|
108
|
-
|
|
109
|
+
if (verbosity > 0) {
|
|
110
|
+
console.log("Token:", token);
|
|
111
|
+
}
|
|
109
112
|
if (token === undefined || !compile) {
|
|
110
113
|
return results;
|
|
111
114
|
}
|
package/package.json
CHANGED
package/src/UtilsTwitter.ts
CHANGED
|
@@ -89,9 +89,11 @@ export class UtilsTwitter {
|
|
|
89
89
|
max_twitter_tweet_id? : string,
|
|
90
90
|
min_publish_time? : string,
|
|
91
91
|
max_publish_time? : string,
|
|
92
|
-
num_pages? : number
|
|
92
|
+
num_pages? : number,
|
|
93
|
+
verbosity? : number
|
|
93
94
|
}) : Promise<any[]> {
|
|
94
95
|
const compile = options.compile !== undefined ? options.compile : true
|
|
96
|
+
const verbosity = options.verbosity || 0
|
|
95
97
|
const results : any[] = []
|
|
96
98
|
let token : string | undefined = undefined
|
|
97
99
|
for (let p = 0; options.num_pages === undefined || p < options.num_pages; p++) {
|
|
@@ -119,7 +121,9 @@ export class UtilsTwitter {
|
|
|
119
121
|
}
|
|
120
122
|
results.push(...(response.data || []))
|
|
121
123
|
token = (response.meta || {}).nextToken
|
|
122
|
-
|
|
124
|
+
if (verbosity > 0) {
|
|
125
|
+
console.log("Token:", token)
|
|
126
|
+
}
|
|
123
127
|
if (token === undefined || !compile) {
|
|
124
128
|
return results
|
|
125
129
|
}
|