Exemplo n.º 1
0
class Game(Bombject):

    id = fields.Field()
    name = fields.Field()
    api_detail_url = fields.Field()
    site_detail_url = fields.Field()

    summary = fields.Field(api_name='deck')
    description = fields.Field()
    image = fields.Object(Image)
    published = fields.Datetime(dateformat='%Y-%m-%d %H:%M:%S',
                                api_name='date_added')
    updated = fields.Datetime(dateformat='%Y-%m-%d %H:%M:%S',
                              api_name='date_last_updated')

    characters = fields.Field()
    concepts = fields.Field()
    developers = fields.Field()
    platforms = fields.Field()
    publishers = fields.Field()

    @classmethod
    def get(cls, url, **kwargs):
        res = GameResult.get(url)
        res = res.filter()
        return res.results[0]
Exemplo n.º 2
0
 class WithTypes(self.cls):
     name  = fields.Field()
     value = fields.Field()
     when  = fields.Datetime()
Exemplo n.º 3
0
 class Timely(dataobject.DataObject):
     when = fields.Datetime()
Exemplo n.º 4
0
 class Child(Parent):
     ted = fields.Datetime()
Exemplo n.º 5
0
 class WithTypes(self.cls):
     name  = fields.Field()
     value = fields.Field()
     when  = fields.Datetime()
     bleh  = fields.Object(Blah)
Exemplo n.º 6
0
class Zot(RemoteObject):
    kind = fields.Constant("tag:api.example.com,2009;Zot")
    size = fields.Field()
    born = fields.Datetime()