Python
Installation
pip3 install enalog
Usage
In a file where you want to push an event from import the package:
from enalog import push_event
Then you can push an event:
push_event(api_token='dummy_token', event={
'project': 'EnaLog',
'name': 'user-subscribed',
'description': 'User subscribed to EnaLog',
'icon': '💰',
'tags': ['enalog'],
'meta': {
'user_name': 'Sam Newby',
},
'push': True,
'user_id': '1234'
});
Return value
The push_event
function returns a dictionary response that you can inpsect if you want:
{
"status_code": 200,
"message": "Event successfully sent to EnaLog"
}
The status_code
and message
will return the relevant data if the request fails.