eventregistry 8.11.1 → 9.1.0

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.
Files changed (65) hide show
  1. package/dist/analytics.d.ts +82 -82
  2. package/dist/analytics.js +336 -330
  3. package/dist/analytics.js.map +1 -1
  4. package/dist/base.d.ts +82 -81
  5. package/dist/base.js +261 -219
  6. package/dist/base.js.map +1 -1
  7. package/dist/counts.d.ts +81 -81
  8. package/dist/counts.js +162 -149
  9. package/dist/counts.js.map +1 -1
  10. package/dist/dailyShares.d.ts +10 -10
  11. package/dist/dailyShares.js +90 -77
  12. package/dist/dailyShares.js.map +1 -1
  13. package/dist/data.d.ts +269 -268
  14. package/dist/data.js +3 -3
  15. package/dist/eventForText.d.ts +48 -48
  16. package/dist/eventForText.js +126 -123
  17. package/dist/eventForText.js.map +1 -1
  18. package/dist/eventRegistry.d.ts +244 -224
  19. package/dist/eventRegistry.js +1098 -1018
  20. package/dist/eventRegistry.js.map +1 -1
  21. package/dist/index.d.ts +21 -20
  22. package/dist/index.js +128 -122
  23. package/dist/index.js.map +1 -1
  24. package/dist/info.d.ts +61 -61
  25. package/dist/info.js +171 -158
  26. package/dist/info.js.map +1 -1
  27. package/dist/logger.d.ts +44 -0
  28. package/dist/logger.js +144 -0
  29. package/dist/logger.js.map +1 -0
  30. package/dist/query.d.ts +53 -53
  31. package/dist/query.js +333 -290
  32. package/dist/query.js.map +1 -1
  33. package/dist/queryArticle.d.ts +61 -61
  34. package/dist/queryArticle.js +183 -168
  35. package/dist/queryArticle.js.map +1 -1
  36. package/dist/queryArticles.d.ts +144 -160
  37. package/dist/queryArticles.js +729 -701
  38. package/dist/queryArticles.js.map +1 -1
  39. package/dist/queryEvent.d.ts +140 -140
  40. package/dist/queryEvent.js +587 -569
  41. package/dist/queryEvent.js.map +1 -1
  42. package/dist/queryEvents.d.ts +210 -210
  43. package/dist/queryEvents.js +825 -798
  44. package/dist/queryEvents.js.map +1 -1
  45. package/dist/queryMentions.d.ts +96 -96
  46. package/dist/queryMentions.js +637 -600
  47. package/dist/queryMentions.js.map +1 -1
  48. package/dist/queryStory.d.ts +58 -58
  49. package/dist/queryStory.js +194 -174
  50. package/dist/queryStory.js.map +1 -1
  51. package/dist/recent.d.ts +23 -23
  52. package/dist/recent.js +199 -179
  53. package/dist/recent.js.map +1 -1
  54. package/dist/returnInfo.d.ts +68 -66
  55. package/dist/returnInfo.js +332 -304
  56. package/dist/returnInfo.js.map +1 -1
  57. package/dist/topicPage.d.ts +157 -157
  58. package/dist/topicPage.js +599 -604
  59. package/dist/topicPage.js.map +1 -1
  60. package/dist/trends.d.ts +35 -35
  61. package/dist/trends.js +115 -102
  62. package/dist/trends.js.map +1 -1
  63. package/dist/types.d.ts +2453 -2155
  64. package/dist/types.js +2 -2
  65. package/package.json +13 -13
@@ -1,224 +1,244 @@
1
- import { AxiosResponse } from "axios";
2
- import * as winston from "winston";
3
- import { ReturnInfo } from "./returnInfo";
4
- import { EventRegistryStatic } from "./types";
5
- import { QueryArticle } from "./queryArticle";
6
- import { QueryArticles } from "./queryArticles";
7
- import { QueryEvents } from "./queryEvents";
8
- import { QueryEvent } from "./queryEvent";
9
- /**
10
- * @class EventRegistry
11
- * Main class responsible for obtaining results form the Event Registry
12
- */
13
- export declare class EventRegistry {
14
- logger: winston.Logger;
15
- requestLogger: winston.Logger;
16
- private config;
17
- private headers;
18
- private dailyAvailableRequests;
19
- private remainingAvailableRequests;
20
- private lastQueryTime;
21
- private _logRequests;
22
- private readonly lock;
23
- private readonly stopStatusCodes;
24
- constructor(config?: EventRegistryStatic.Config);
25
- /**
26
- * Should all requests be logged to a file or not?
27
- */
28
- setLogging(logging: boolean): void;
29
- readonly allowUseOfArchive: boolean;
30
- readonly verboseOutput: boolean;
31
- /**
32
- * Main method for executing the search queries.
33
- * @param query instance of Query class
34
- */
35
- execQuery(query: any, allowUseOfArchive?: boolean): Promise<any>;
36
- jsonRequestAnalytics(path: string, parameters?: any, headers?: any, cookies?: any): Promise<AxiosResponse>;
37
- /**
38
- * Make a request for json data
39
- * @param path url on er (e.g. "/api/v1/article")
40
- * @param parameters Optional parameters to be included in the request
41
- */
42
- jsonRequest(path: string, parameters?: any, allowUseOfArchive?: boolean): Promise<any>;
43
- /**
44
- * get the number of requests that are still available for the user today. Information is only accessible after you make some query.
45
- */
46
- getRemainingAvailableRequests(): number;
47
- /**
48
- * get the total number of requests that the user can make in a day. Information is only accessible after you make some query.
49
- */
50
- getDailyAvailableRequests(): number;
51
- /**
52
- * Return the headers returned in the response object of the last executed request
53
- */
54
- getLastHeaders(): {};
55
- /**
56
- * Get a value of the header headerName that was set in the headers in the last response object
57
- */
58
- getLastHeader(headerName: string, dfltVal?: any): any;
59
- /**
60
- * print some statistics about the last executed request
61
- */
62
- printLastReqStats(): void;
63
- /**
64
- * return true or false depending on whether the last request used the archive or not
65
- */
66
- getLastReqArchiveUse(): boolean;
67
- /**
68
- * Return the number of used and total available tokens. Can be used at any time (also before making queries)
69
- */
70
- getUsageInfo(): Promise<EventRegistryStatic.UsageInfo>;
71
- getServiceStatus(): Promise<EventRegistryStatic.UsageInfo>;
72
- getUrl(query: QueryArticles | QueryArticle | QueryEvents | QueryEvent): string;
73
- /**
74
- * Return a list of concepts that contain the given prefix.
75
- * Returned matching concepts are sorted based on their frequency of occurrence in news (from most to least frequent)
76
- * @param prefix input text that should be contained in the concept
77
- * @param args Object which contains a host of optional parameters
78
- */
79
- suggestConcepts(prefix: string, args?: EventRegistryStatic.SuggestConceptsArguments): Promise<any>;
80
- /**
81
- * Return a list of dmoz categories that contain the prefix
82
- * @param prefix input text that should be contained in the category name
83
- * @param args Object which contains a host of optional parameters
84
- */
85
- suggestCategories(prefix: string, args?: EventRegistryStatic.SuggestCategoriesArguments): Promise<any>;
86
- /**
87
- * Return a list of news sources that match the prefix
88
- * @param prefix input text that should be contained in the source name or uri
89
- * @param args Object which contains a host of optional parameters
90
- */
91
- suggestNewsSources(prefix: string, args?: EventRegistryStatic.SuggestNewsSourcesArguments): Promise<any>;
92
- /**
93
- * Return a list of news source groups that match the prefix
94
- * @param prefix input text that should be contained in the source group name or uri
95
- * @param args Object which contains a host of optional parameters
96
- */
97
- suggestSourceGroups(prefix: string, args?: EventRegistryStatic.SuggestSourceGroupsArguments): Promise<any>;
98
- /**
99
- * Return a list of geo locations (cities or countries) that contain the prefix
100
- * @param prefix input text that should be contained in the location name
101
- * @param args Object which contains a host of optional parameters
102
- */
103
- suggestLocations(prefix: string, args?: EventRegistryStatic.SuggestLocationsArguments): Promise<any>;
104
- /**
105
- * Return a list of geo locations (cities or places) that are close to the provided (lat, long) values
106
- * @param latitude latitude part of the coordinate
107
- * @param longitude longitude part of the coordinate
108
- * @param radiusKm radius in kilometers around the coordinates inside which the locations should be returned
109
- * @param args Object which contains a host of optional parameters
110
- */
111
- suggestLocationsAtCoordinate(latitude: number, longitude: number, radiusKm: number, args?: EventRegistryStatic.SuggestLocationsAtCoordinateArguments): Promise<any>;
112
- /**
113
- * Return a list of news sources that are close to the provided (lat, long) values
114
- * @param latitude latitude part of the coordinate
115
- * @param longitude longitude part of the coordinate
116
- * @param radiusKm radius in kilometers around the coordinates inside which the news sources should be located
117
- * @param count number of returned suggestions
118
- */
119
- suggestSourcesAtCoordinate(latitude: number, longitude: number, radiusKm: number, count?: number, ...otherParams: any[]): Promise<any>;
120
- /**
121
- * Return a list of news sources that are close to the provided (lat, long) values
122
- * @param conceptUri concept that represents a geographic location for which we would like to obtain a list of sources located at the place
123
- * @param args Object which contains a host of optional parameters
124
- */
125
- suggestSourcesAtPlace(conceptUri: string, args?: EventRegistryStatic.SuggestSourcesAtPlaceArguments): Promise<any>;
126
- /**
127
- * Return a list of news sources that match the prefix
128
- * @param prefix: input text that should be contained in the author name and source url
129
- * @param page: page of results
130
- * @param count: number of returned suggestions
131
- */
132
- suggestAuthors(prefix: string, page?: number, count?: number, ...otherParams: any[]): Promise<any>;
133
- /**
134
- * Return a list of concept classes that match the given prefix
135
- * @param prefix input text that should be contained in the category name
136
- * @param args Object which contains a host of optional parameters
137
- */
138
- suggestConceptClasses(prefix: string, args?: EventRegistryStatic.SuggestConceptClassesArguments): Promise<any>;
139
- /**
140
- * return a concept uri that is the best match for the given concept label
141
- * if there are multiple matches for the given conceptLabel,
142
- * they are sorted based on their frequency of occurrence in news (most to least frequent)
143
- * @param conceptLabel partial or full name of the concept for which to return the concept uri
144
- * @param args Object which contains a host of optional parameters
145
- */
146
- getConceptUri(conceptLabel: string, args?: EventRegistryStatic.GetConceptUriArguments): Promise<any>;
147
- /**
148
- * Return a location uri that is the best match for the given location label
149
- * @param locationLabel partial or full location name for which to return the location uri
150
- * @param args Object which contains a host of optional parameters
151
- */
152
- getLocationUri(locationLabel: string, args?: EventRegistryStatic.GetLocationUriArguments): Promise<any>;
153
- /**
154
- * Return a category uri that is the best match for the given label
155
- * @param categoryLabel partial or full name of the category for which to return category uri
156
- */
157
- getCategoryUri(categoryLabel: string): Promise<any>;
158
- /**
159
- * Return the news source that best matches the source name
160
- * @param sourceName partial or full name of the source or source uri for which to return source uri
161
- * @param dataType: return the source uri that provides content of these data types
162
- */
163
- getNewsSourceUri(sourceName: string, dataType?: EventRegistryStatic.DataType[] | EventRegistryStatic.DataType): Promise<any>;
164
- /**
165
- * alternative (shorter) name for the method getNewsSourceUri()
166
- */
167
- getSourceUri(sourceName: string, dataType?: EventRegistryStatic.DataType[] | EventRegistryStatic.DataType): Promise<any>;
168
- /**
169
- * Return the URI of the source group that best matches the name
170
- * @param sourceGroupName partial or full name of the source group
171
- */
172
- getSourceGroupUri(sourceGroupName: string): Promise<any>;
173
- /**
174
- * Return a uri of the concept class that is the best match for the given label
175
- * @param classLabel partial or full name of the concept class for which to return class uri
176
- * @param lang language in which the class label is specified
177
- */
178
- getConceptClassUri(classLabel: string, lang?: string): Promise<any>;
179
- /**
180
- * Return detailed information about a particular concept
181
- * @param conceptUri uri of the concept
182
- * @param returnInfo what details about the concept should be included in the returned information
183
- */
184
- getConceptInfo(conceptUri: string, returnInfo?: ReturnInfo): Promise<any>;
185
- /**
186
- * return author uri that is the best match for the given author name (and potentially source url)
187
- * if there are multiple matches for the given author name, they are sorted based on the number of articles they have written (from most to least frequent)
188
- * @param authorName: partial or full name of the author, potentially also containing the source url (e.g. "george brown nytimes")
189
- */
190
- getAuthorUri(authorName: string): Promise<any>;
191
- static getUriFromUriWgt(uriWgtList: string[]): string[];
192
- /**
193
- * If you have article urls and you want to query them in ER you first have to obtain their uris in the ER.
194
- * @param articleUrls a single article url or a list of article urls
195
- */
196
- getArticleUris(articleUrls: string | string[]): Promise<any>;
197
- /**
198
- * Return information about the latest imported article
199
- */
200
- getSourceGroups(): Promise<any>;
201
- /**
202
- * Return info about the source group
203
- */
204
- getSourceGroup(sourceGroupUri: string): Promise<any>;
205
- private initRequestLogger;
206
- }
207
- /**
208
- * @class ArticleMapper
209
- * Create instance of article mapper it will map from article urls to article uris
210
- * the mappings can be remembered so it will not repeat requests for the same article urls
211
- */
212
- export declare class ArticleMapper {
213
- private er;
214
- private articleUrlToUri;
215
- private rememberMappings;
216
- constructor(er: EventRegistry, rememberMapping?: boolean);
217
- /**
218
- * Given the article url, return an array with 0, 1 or more article uris.
219
- * Not all returned article uris are necessarily valid anymore.
220
- * For news sources of lower importance we remove the duplicated articles and just keep the latest content
221
- * @param articleUrl string containing the article url
222
- */
223
- getArticleUri(articleUrl: string): Promise<any>;
224
- }
1
+ import { AxiosResponse } from "axios";
2
+ import { ReturnInfo } from "./returnInfo";
3
+ import { ER } from "./types";
4
+ import { QueryArticle } from "./queryArticle";
5
+ import { QueryArticles } from "./queryArticles";
6
+ import { QueryEvents } from "./queryEvents";
7
+ import { QueryEvent } from "./queryEvent";
8
+ import { Logger } from "./logger";
9
+ /**
10
+ * @class EventRegistry
11
+ * Main class responsible for obtaining results form the Event Registry
12
+ */
13
+ export declare class EventRegistry {
14
+ logger: Logger;
15
+ private config;
16
+ private headers;
17
+ private dailyAvailableRequests;
18
+ private remainingAvailableRequests;
19
+ private lastQueryTime;
20
+ private _logRequests;
21
+ private readonly lock;
22
+ private readonly stopStatusCodes;
23
+ constructor(config?: ER.Config);
24
+ /**
25
+ * Should all requests be logged to a file or not?
26
+ */
27
+ setLogging(logging: boolean): void;
28
+ get allowUseOfArchive(): boolean;
29
+ get verboseOutput(): boolean;
30
+ /**
31
+ * Main method for executing the search queries.
32
+ * @param query instance of Query class
33
+ */
34
+ execQuery<T = ER.SuccessfulResponse<unknown>>(query: any, allowUseOfArchive?: boolean): Promise<ER.Response<T>>;
35
+ jsonRequestAnalytics<T = unknown>(path: string, parameters?: any, headers?: any, cookies?: any): Promise<AxiosResponse<T>>;
36
+ /**
37
+ * Make a request for json data
38
+ * @param path url on er (e.g. "/api/v1/article")
39
+ * @param parameters Optional parameters to be included in the request
40
+ */
41
+ jsonRequest<T = unknown>(path: string, parameters?: any, allowUseOfArchive?: boolean): Promise<AxiosResponse<T>>;
42
+ /**
43
+ * get the number of requests that are still available for the user today. Information is only accessible after you make some query.
44
+ */
45
+ getRemainingAvailableRequests(): number;
46
+ /**
47
+ * get the total number of requests that the user can make in a day. Information is only accessible after you make some query.
48
+ */
49
+ getDailyAvailableRequests(): number;
50
+ /**
51
+ * Return the headers returned in the response object of the last executed request
52
+ */
53
+ getLastHeaders(): {};
54
+ /**
55
+ * Get a value of the header headerName that was set in the headers in the last response object
56
+ */
57
+ getLastHeader(headerName: string, dfltVal?: string): any;
58
+ /**
59
+ * print some statistics about the last executed request
60
+ */
61
+ printLastReqStats(): void;
62
+ /**
63
+ * return true or false depending on whether the last request used the archive or not
64
+ */
65
+ getLastReqArchiveUse(): boolean;
66
+ /**
67
+ * Return the number of used and total available tokens. Can be used at any time (also before making queries)
68
+ */
69
+ getUsageInfo(): Promise<ER.UsageInfo>;
70
+ getServiceStatus(): Promise<ER.UsageInfo>;
71
+ getUrl(query: QueryArticles | QueryArticle | QueryEvents | QueryEvent): string;
72
+ /**
73
+ * Return a list of concepts that contain the given prefix.
74
+ * Returned matching concepts are sorted based on their frequency of occurrence in news (from most to least frequent)
75
+ * @param prefix input text that should be contained in the concept
76
+ * @param args Object which contains a host of optional parameters
77
+ */
78
+ suggestConcepts(prefix: string, args?: ER.SuggestConceptsArguments): Promise<unknown>;
79
+ /**
80
+ * Return a list of dmoz categories that contain the prefix
81
+ * @param prefix input text that should be contained in the category name
82
+ * @param args Object which contains a host of optional parameters
83
+ */
84
+ suggestCategories(prefix: string, args?: ER.SuggestCategoriesArguments): Promise<unknown>;
85
+ /**
86
+ * Return a list of news sources that match the prefix
87
+ * @param prefix input text that should be contained in the source name or uri
88
+ * @param args Object which contains a host of optional parameters
89
+ */
90
+ suggestNewsSources(prefix: string, args?: ER.SuggestNewsSourcesArguments): Promise<unknown>;
91
+ /**
92
+ * Return a list of news source groups that match the prefix
93
+ * @param prefix input text that should be contained in the source group name or uri
94
+ * @param args Object which contains a host of optional parameters
95
+ */
96
+ suggestSourceGroups(prefix: string, args?: ER.SuggestSourceGroupsArguments): Promise<unknown>;
97
+ /**
98
+ * Return a list of geo locations (cities or countries) that contain the prefix
99
+ * @param prefix input text that should be contained in the location name
100
+ * @param args Object which contains a host of optional parameters
101
+ */
102
+ suggestLocations(prefix: string, args?: ER.SuggestLocationsArguments): Promise<ER.Location[]>;
103
+ /**
104
+ * Return a list of geo locations (cities or places) that are close to the provided (lat, long) values
105
+ * @param latitude latitude part of the coordinate
106
+ * @param longitude longitude part of the coordinate
107
+ * @param radiusKm radius in kilometers around the coordinates inside which the locations should be returned
108
+ * @param args Object which contains a host of optional parameters
109
+ */
110
+ suggestLocationsAtCoordinate(latitude: number, longitude: number, radiusKm: number, args?: ER.SuggestLocationsAtCoordinateArguments): Promise<unknown>;
111
+ /**
112
+ * Return a list of news sources that are close to the provided (lat, long) values
113
+ * @param latitude latitude part of the coordinate
114
+ * @param longitude longitude part of the coordinate
115
+ * @param radiusKm radius in kilometers around the coordinates inside which the news sources should be located
116
+ * @param count number of returned suggestions
117
+ */
118
+ suggestSourcesAtCoordinate(latitude: number, longitude: number, radiusKm: number, count?: number, ...otherParams: any[]): Promise<unknown>;
119
+ /**
120
+ * Return a list of news sources that are close to the provided (lat, long) values
121
+ * @param conceptUri concept that represents a geographic location for which we would like to obtain a list of sources located at the place
122
+ * @param args Object which contains a host of optional parameters
123
+ */
124
+ suggestSourcesAtPlace(conceptUri: string, args?: ER.SuggestSourcesAtPlaceArguments): Promise<unknown>;
125
+ /**
126
+ * Return a list of news sources that match the prefix
127
+ * @param prefix: input text that should be contained in the author name and source url
128
+ * @param page: page of results
129
+ * @param count: number of returned suggestions
130
+ */
131
+ suggestAuthors(prefix: string, page?: number, count?: number, ...otherParams: any[]): Promise<unknown>;
132
+ /**
133
+ * Return a list of event types that match the prefix
134
+ * @param prefix: input text that should be contained in the industry name
135
+ * @param page: page of results
136
+ * @param count: number of returned suggestions
137
+ */
138
+ suggestEventTypes(prefix: string, page?: number, count?: number, ...otherParams: any[]): Promise<unknown>;
139
+ /**
140
+ * Return a list of industries that match the prefix. Note: Industries can only be used when querying mentions (QueryMentions, QueryMentionsIter)
141
+ * @param prefix: input text that should be contained in the industry name
142
+ * @param page: page of results
143
+ * @param count: number of returned suggestions
144
+ */
145
+ suggestIndustries(prefix: string, page?: number, count?: number, ...otherParams: any[]): Promise<unknown>;
146
+ /**
147
+ * Return a list of SDG uris. Note: Industries can only be used when querying mentions (QueryMentions, QueryMentionsIter)
148
+ */
149
+ getSdgUris(): Promise<unknown>;
150
+ /**
151
+ * Return a list of SASB uris. Note: SASB uris can only be used when querying mentions (QueryMentions, QueryMentionsIter)
152
+ */
153
+ getSasbUris(): Promise<unknown>;
154
+ /**
155
+ * Return a list of concept classes that match the given prefix
156
+ * @param prefix input text that should be contained in the category name
157
+ * @param args Object which contains a host of optional parameters
158
+ */
159
+ suggestConceptClasses(prefix: string, args?: ER.SuggestConceptClassesArguments): Promise<unknown>;
160
+ /**
161
+ * return a concept uri that is the best match for the given concept label
162
+ * if there are multiple matches for the given conceptLabel,
163
+ * they are sorted based on their frequency of occurrence in news (most to least frequent)
164
+ * @param conceptLabel partial or full name of the concept for which to return the concept uri
165
+ * @param args Object which contains a host of optional parameters
166
+ */
167
+ getConceptUri(conceptLabel: string, args?: ER.GetConceptUriArguments): Promise<any>;
168
+ /**
169
+ * Return a location uri that is the best match for the given location label
170
+ * @param locationLabel partial or full location name for which to return the location uri
171
+ * @param args Object which contains a host of optional parameters
172
+ */
173
+ getLocationUri(locationLabel: string, args?: ER.GetLocationUriArguments): Promise<string>;
174
+ /**
175
+ * Return a category uri that is the best match for the given label
176
+ * @param categoryLabel partial or full name of the category for which to return category uri
177
+ */
178
+ getCategoryUri(categoryLabel: string): Promise<any>;
179
+ /**
180
+ * Return the news source that best matches the source name
181
+ * @param sourceName partial or full name of the source or source uri for which to return source uri
182
+ * @param dataType: return the source uri that provides content of these data types
183
+ */
184
+ getNewsSourceUri(sourceName: string, dataType?: ER.DataType[] | ER.DataType): Promise<any>;
185
+ /**
186
+ * alternative (shorter) name for the method getNewsSourceUri()
187
+ */
188
+ getSourceUri(sourceName: string, dataType?: ER.DataType[] | ER.DataType): Promise<any>;
189
+ /**
190
+ * Return the URI of the source group that best matches the name
191
+ * @param sourceGroupName partial or full name of the source group
192
+ */
193
+ getSourceGroupUri(sourceGroupName: string): Promise<any>;
194
+ /**
195
+ * Return a uri of the concept class that is the best match for the given label
196
+ * @param classLabel partial or full name of the concept class for which to return class uri
197
+ * @param lang language in which the class label is specified
198
+ */
199
+ getConceptClassUri(classLabel: string, lang?: string): Promise<any>;
200
+ /**
201
+ * Return detailed information about a particular concept
202
+ * @param conceptUri uri of the concept
203
+ * @param returnInfo what details about the concept should be included in the returned information
204
+ */
205
+ getConceptInfo(conceptUri: string, returnInfo?: ReturnInfo): Promise<unknown>;
206
+ /**
207
+ * return author uri that is the best match for the given author name (and potentially source url)
208
+ * if there are multiple matches for the given author name, they are sorted based on the number of articles they have written (from most to least frequent)
209
+ * @param authorName: partial or full name of the author, potentially also containing the source url (e.g. "george brown nytimes")
210
+ */
211
+ getAuthorUri(authorName: string): Promise<any>;
212
+ static getUriFromUriWgt(uriWgtList: string[]): string[];
213
+ /**
214
+ * If you have article urls and you want to query them in ER you first have to obtain their uris in the ER.
215
+ * @param articleUrls a single article url or a list of article urls
216
+ */
217
+ getArticleUris(articleUrls: string | string[]): Promise<unknown>;
218
+ /**
219
+ * Return information about the latest imported article
220
+ */
221
+ getSourceGroups(): Promise<unknown>;
222
+ /**
223
+ * Return info about the source group
224
+ */
225
+ getSourceGroup(sourceGroupUri: string): Promise<unknown>;
226
+ }
227
+ /**
228
+ * @class ArticleMapper
229
+ * Create instance of article mapper it will map from article urls to article uris
230
+ * the mappings can be remembered so it will not repeat requests for the same article urls
231
+ */
232
+ export declare class ArticleMapper {
233
+ private er;
234
+ private articleUrlToUri;
235
+ private rememberMappings;
236
+ constructor(er: EventRegistry, rememberMapping?: boolean);
237
+ /**
238
+ * Given the article url, return an array with 0, 1 or more article uris.
239
+ * Not all returned article uris are necessarily valid anymore.
240
+ * For news sources of lower importance we remove the duplicated articles and just keep the latest content
241
+ * @param articleUrl string containing the article url
242
+ */
243
+ getArticleUri(articleUrl: string): Promise<any>;
244
+ }