Skip to content

Commit

Permalink
Merge pull request #27 from Moesif/add-IdentifyCompany-configuration
Browse files Browse the repository at this point in the history
Update: moesifpythonrequest dependency to 0.1.9
  • Loading branch information
matthewoates authored Jun 17, 2019
2 parents ca4dcb7 + 2393a13 commit 7a06427
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ and returns true if you want to skip this particular event.
(optional, but highly recommended) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the user id used by your system. While Moesif tries to identify users automatically,
but different frameworks and your implementation might be very different, it would be helpful and much more accurate to provide this function.

##### __`IDENTIFY_COMPANY_OUTGOING`__
(optional) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the company id for this event.

##### __`GET_METADATA_OUTGOING`__
(optional) _(req, res) => dictionary_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and
returns a dictionary (must be able to be encoded into JSON). This allows
Expand All @@ -152,7 +155,7 @@ def identifyUser(req, res):

def identifyCompany(req, res):
# return the company id here
return "company_id_1"
return "12345"

def should_skip(req, res):
if "healthprobe" in req.path:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nose==1.3.7
isodatetimehandler==1.0.2
moesifapi==1.2.5
celery==4.1.0
moesifpythonrequest==0.1.8
moesifpythonrequest==0.1.9

0 comments on commit 7a06427

Please sign in to comment.