NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

ccpServerNews.py (738B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\notifications\common\formatters\ccpServerNews.py
      2 from __future__ import absolute_import
      3 from .baseFormatter import BaseNotificationFormatter
      4 
      5 class CCPServerNewsFormatter(BaseNotificationFormatter):
      6 
      7     def __init__(self, subjectLabel = None, bodyLabel = None, subtextLabel = None):
      8         super(CCPServerNewsFormatter, self).__init__()
      9         self.subjectLabel = subjectLabel
     10         self.bodyLabel = bodyLabel
     11         self.subtextLabel = subtextLabel
     12 
     13     def Format(self, notification):
     14         notification.subject = notification.data.get('title', None)
     15         notification.body = notification.data.get('text', None)
     16         return notification