biothings.web.analytics¶
biothings.web.analytics.channels¶
- class biothings.web.analytics.channels.GA4Channel(measurement_id, api_secret, uid_version=1)[source]¶
Bases:
Channel
biothings.web.analytics.events¶
- class biothings.web.analytics.events.Message(dict=None, /, **kwargs)[source]¶
Bases:
Event
Logical document that can be sent through services. Processable fields: title, body, url, url_text, image, image_altext Optionally define default field values below.
- DEFAULTS = {'image_altext': '<IMAGE>', 'title': 'Notification Message', 'url_text': 'View Details'}¶
- to_ADF()[source]¶
Generate ADF for Atlassian Jira payload. Overwrite this to build differently. https://developer.atlassian.com/cloud/jira/platform/apis/document/playground/
- to_email_payload(sendfrom, sendto)[source]¶
Build a MIMEMultipart message that can be sent as an email. https://docs.aws.amazon.com/ses/latest/DeveloperGuide/examples-send-using-smtp.html
- to_jira_payload(profile)[source]¶
Combine notification message with project profile to genereate jira issue tracking ticket request payload.
- to_slack_payload()[source]¶
Generate slack webhook notification payload. https://api.slack.com/messaging/composing/layouts