Support for search by source location, source groups; sorting by alexa rankings
Added
QueryArticles
andQueryEvents
: When creating an instance of the class using a parameter that is a list (such asconceptUri
,categoryUri
, ...) you can (should) now provide the list using theQueryItems.AND()
orQueryItems.OR()
methods to explicitly define whether BooleanAND
orOR
should be used between the multiple items. If just a list is provided instead, a warning will be displayed in the console output. If a single value is used for the parameter, it is still perfectly ok to provide it directly asstring
.QueryArticles
andQueryEvents
: Added two new supported parameterssourceLocationUri
andsourceGroupUri
. ParametersourceLocationUri
can be used to specify a location URI (obtained withEventRegistry.getLocationUri
) to use a set of news sources from a specific geographic location. The locations used can be cities or countries.sourceGroupUri
can be used to use in search a set of news sources that belong to a manually curated list of news sources (such as top business related sources, top entertainment sources, ...). See next item to see how to find the values for this parameter.EventRegistry
class. Added methodssuggestSourceGroups()
andgetSourceGroupUri()
that can be used to get the list of news source groups that match a given name/uri (suggestSourceGroups()
) or the single top suggestion (getSourceGroupUri()
). Source groups are that can be used to find or filter content to a specific set of publishers.- when querying a list of articles, valid
sortBy
values are now alsosourceAlexaGlobalRank
(global rank of the news source) andsourceAlexaCountryRank
(country rank of the news source). SourceInfoFlags
flagimage
was added which, ifTrue
addsimage
andthumbImage
fields to the returned source information.
Changed
QueryArticles
andQueryEvents
: Default values for parametersconceptUri
,categoryUri
and other parameters that accept lists were changed from[]
toNone
to reflect the preference for usingQueryItems
class when specifying an array of values.QueryArticles
andQueryEvents
: changed methodsetArticleUriList()
to a static methodinitWithArticleUriList()
to avoid mistakenly creating an instance with query parameters and additionaly caling thesetArticleUriList()
.QueryArticles
andQueryEvents
: methodinitWithComplexQuery()
now accepts also query as astring
value, not only instances ofComplexArticleQuery
andComplexEventQuery
.SourceInfoFlags
flagimportance
was changed toranking
since now we return multiple rankings for the sourceSourceInfoFlags
flagtags
was changed tosourceGroups
since termtags
was too generic.- Articles data model has changed:
socialScore
property is now namedshares
to better represent the content. The returned object can now include also shares on Google Plus, Pinterest, LinkedIn. The name of the parametersocialScore
inArticleInfoFlags
was also changed toshares
. - Source data model has changed:
importance
property was changed to an objectranking
containing multiple indicators of source importance.
Deprecated
- when sorting articles,
sortBy
valuesourceImportance
is now deprecated. Use valuesourceImportanceRank
. Is is equvalent to reversed value ofsourceImportance
therefore also make sure to negate your existing value ofsortByAsc
value. The parameter was changed to make it comparable to added sorting optionssourceAlexaGlobalRank
andsourceAlexaCountryRank
which also represent rankings (lower value means better value).
Removed
QueryArticles
andQueryEvents
: removed theconceptOper
parameter. It's functionality is now replaced by providing the array of values insideQueryItems.AND()
orQueryItems.OR()
.QueryArticles
andQueryEvents
: removed the utility methodsaddConcept()
,addLocation()
,addCategory()
,addNewsSource()
,addKeyword()
,setDateLimit()
,setDateMentionLimit()
. The values of these parameters should be set when initializing the object. The methods were removed since users used static methodinitWithComplexQuery()
and additionally calling these methods which had no effect on the results.