Skip to content

Commit

Permalink
- changed the old api endpoint format to the new one
Browse files Browse the repository at this point in the history
- added EventRegistry.getServiceStatus() method that reports status of the services
- renamed filenames for tests so that we can isolate which tests to run
  • Loading branch information
gregorleban committed Oct 17, 2019
1 parent ee0704a commit f1fe419
Show file tree
Hide file tree
Showing 37 changed files with 427 additions and 564 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Change Log

## [v8.7]() (2019-10-16)

**Added**

- added `EventRegistry.getServiceStatus()` method that reports status of the services
- `ComplexQueryArticles` and `ComplexQueryEvents` classes now support in the constructor additional filters like `minSentiment`, `maxSentiment`, `minFacebookShares`, `endSourceRankPercentile`, etc.

**Updated**

- `ReturnInfo` classes (`ArticleInfoFlags`, `ConceptInfoFlags`, ...) were updated. Some obsolete parameters were removed and we have added support for kwdargs to supply some very rarely used parameters directly.
- `TopicPage.getArticles` and `TopicPage.getEvents` methods now support also `**kwargs` so that you can now also provide other available parameters that are less frequently used.

**Removed**

- removed `EventRegistry.suggestCustomConcepts()` and `EventRegistry.getCustomConceptUri()` methods. Not used anymore since we are not supporting anymore the correlation feature.


## [v8.6]() (2019-02-22)

**Added**
Expand Down
220 changes: 0 additions & 220 deletions eventregistry/Correlations.py

This file was deleted.

2 changes: 1 addition & 1 deletion eventregistry/Counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class CountsBase(QueryParamsBase):
def _getPath(self):
return "/json/counters"
return "/api/v1/counters"



Expand Down
4 changes: 2 additions & 2 deletions eventregistry/DailyShares.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self,


def _getPath(self):
return "/json/article"
return "/api/v1/article"


# get top shared events for today or any other day
Expand All @@ -53,4 +53,4 @@ def __init__(self,


def _getPath(self):
return "/json/event"
return "/api/v1/event"
4 changes: 2 additions & 2 deletions eventregistry/EventForText.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def compute(self,
compute the list of most similar events for the given text
"""
params = { "lang": lang, "text": text, "topClustersCount": self._nrOfEventsToReturn }
res = self._er.jsonRequest("/json/getEventForText/enqueueRequest", params)
res = self._er.jsonRequest("/api/v1/getEventForText/enqueueRequest", params)

requestId = res["requestId"]
for i in range(10):
time.sleep(1) # sleep for 1 second to wait for the clustering to perform computation
res = self._er.jsonRequest("/json/getEventForText/testRequest", { "requestId": requestId })
res = self._er.jsonRequest("/api/v1/getEventForText/testRequest", { "requestId": requestId })
if isinstance(res, list) and len(res) > 0:
return res
return None
Loading

0 comments on commit f1fe419

Please sign in to comment.