Ejemplo n.º 1
0
 def getTemplate2(self, music):
     print(music)
     bodyTemplate = BodyTemplate2()
     bodyTemplate.setToken(music['token'])
     bodyTemplate.setBackGroundImage(self.DEFAULT_IMAGE)
     bodyTemplate.setTitle(music['singer'])
     bodyTemplate.setPlainContent(music['name'])
     renderTemplate = RenderTemplate(bodyTemplate)
     return renderTemplate
Ejemplo n.º 2
0
 def getTemplate2(self, music):
     print(music)
     bodyTemplate = BodyTemplate2()
     bodyTemplate.set_token(music['token'])
     bodyTemplate.set_background_image(self.DEFAULT_IMAGE)
     bodyTemplate.set_title(music['singer'])
     bodyTemplate.set_plain_content(music['name'])
     renderTemplate = RenderTemplate(bodyTemplate)
     return renderTemplate
Ejemplo n.º 3
0
 def setUp(self):
     self.template = BodyTemplate2()
     self.template.set_plain_content('test')
     self.template.set_image('http://www.baidu.com')
     self.template.set_background_image('http://www.baidu.com')
     self.template.set_token('0c71de96-15d2-4e79-b97e-e52cec25c254')
Ejemplo n.º 4
0
 def setUp(self):
     self.template = BodyTemplate2()
     self.template.set_plain_content('plain context by set')
     self.template.set_image('http://image-uri.com', '123', '234')
     self.renderTemplate = RenderTemplate(self.template)