Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Attributes | List of all members
main.Feed Class Reference
Inheritance diagram for main.Feed:

Public Member Functions

def ensureEncodedFeed (self, force=False)
 
def encode (self, enc, maxArticles, articleSet)
 

Static Public Attributes

 title = db.TextProperty()
 
 iconUrl = db.TextProperty()
 
 lastUpdated = db.IntegerProperty()
 
 encodedFeed3 = db.TextProperty()
 
 topArticles = db.ListProperty(db.Key)
 

Detailed Description

Definition at line 64 of file main.py.

Member Function Documentation

◆ encode()

def main.Feed.encode (   self,
  enc,
  maxArticles,
  articleSet 
)

Definition at line 82 of file main.py.

82 def encode(self, enc, maxArticles, articleSet):
83 enc.writeString(self.key().name())
84 enc.writeString(self.title)
85 enc.writeString(self.iconUrl)
86
87 logging.info('encoding feed: %s' % self.title)
88 encodedArts = []
89
90 for article in self.article_set.order('-date').fetch(limit=maxArticles):
91 encodedArts.append(article.encodeHeader())
92 articleSet.append(article.key())
93
94 enc.writeInt(len(encodedArts))
95 enc.writeRaw(''.join(encodedArts))
96
97
static void encode(uint8_t output[16], const uint32_t input[4])
Definition: SkMD5.cpp:240
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
static SkString join(const CommandLineFlags::StringArray &)
Definition: skpbench.cpp:741

◆ ensureEncodedFeed()

def main.Feed.ensureEncodedFeed (   self,
  force = False 
)

Definition at line 72 of file main.py.

72 def ensureEncodedFeed(self, force=False):
73 if force or self.encodedFeed3 is None:
74 enc = encoder.Encoder()
75 articleSet = []
76 self.encode(enc, MAX_ARTICLES, articleSet)
77 logging.info('articleSet length is %s' % len(articleSet))
78 self.topArticles = articleSet
79 self.encodedFeed3 = enc.getRaw()
80 self.put()
81

Member Data Documentation

◆ encodedFeed3

main.Feed.encodedFeed3 = db.TextProperty()
static

Definition at line 69 of file main.py.

◆ iconUrl

main.Feed.iconUrl = db.TextProperty()
static

Definition at line 66 of file main.py.

◆ lastUpdated

main.Feed.lastUpdated = db.IntegerProperty()
static

Definition at line 67 of file main.py.

◆ title

main.Feed.title = db.TextProperty()
static

Definition at line 65 of file main.py.

◆ topArticles

main.Feed.topArticles = db.ListProperty(db.Key)
static

Definition at line 70 of file main.py.


The documentation for this class was generated from the following file: