Ejemplo n.º 1
0
 def add_collection_item(self, item, count):
     item_name = item[1:] if item[:1] == '@' else item
     coll_items = self.get_collection_items()
     coll_count = obj2dict(coll_items).get(item_name, 0) + count
     self.get_state().collectionItems.__setattr__(item_name, coll_count)
Ejemplo n.º 2
0
 def add_collection_item(self, item, count):
     item_name = item[1:] if item[:1] == '@' else item
     coll_items = self.get_collection_items()
     coll_count = obj2dict(coll_items).get(item_name, 0) + count
     self.get_state().collectionItems.__setattr__(item_name, coll_count)
Ejemplo n.º 3
0
 def send(self, data):
     data = obj2dict(data)
     assert 'type' in data
     request = self.factory.create_request(data)
     return dict2obj(request.send(self.connection))
Ejemplo n.º 4
0
 def send(self, data):
     data = obj2dict(data)
     assert 'type' in data
     request = self.factory.create_request(data)
     return dict2obj(request.send(self.connection))