本文整理汇总了Python中mcfw.serialization.ds_long函数的典型用法代码示例。如果您正苦于以下问题:Python ds_long函数的具体用法?Python ds_long怎么用?Python ds_long使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ds_long函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: _deserialize_advanced_order_category
def _deserialize_advanced_order_category(stream):
c = AdvancedOrderCategory()
ds_long(stream) # version
c.id = ds_unicode(stream)
c.name = ds_unicode(stream)
c.items = _deserialize_advanced_order_item_list(stream)
return c
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py
示例2: _deserialize_text_widget
def _deserialize_text_widget(stream, w):
version = ds_long(stream)
w.value = ds_unicode(stream)
w.place_holder = ds_unicode(stream)
w.max_chars = ds_long(stream)
w.keyboard_type = ds_unicode(stream) if version >= 2 else TextWidget.keyboard_type.default
return w
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py
示例3: deserialize_advanced_order
def deserialize_advanced_order(stream):
ds_long(stream)
w = AdvancedOrder()
w.currency = ds_unicode(stream)
w.leap_time = ds_long(stream)
w.categories = _deserialize_advanced_order_category_list(stream)
return w
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py
示例4: _deserialize_news_sender
def _deserialize_news_sender(stream):
_ = ds_long(stream) # version
sender = NewsSenderTO()
sender.email = ds_unicode(stream)
sender.name = ds_unicode(stream)
sender.avatar_id = ds_long(stream)
return sender
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:7,代码来源:news.py
示例5: deserialize_pay_widget_result
def deserialize_pay_widget_result(stream):
ds_long(stream) # version
result = PayWidgetResult()
result.transaction_id = ds_unicode(stream)
result.provider_id = ds_unicode(stream)
result.status = ds_unicode(stream)
return result
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py
示例6: deserialize_oauth
def deserialize_oauth(stream):
ds_long(stream) # version
w = Oauth()
w.url = ds_unicode(stream)
w.success_message = ds_unicode(stream)
w.caption = ds_unicode(stream)
return w
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py
示例7: _deserialize_base_payment_method
def _deserialize_base_payment_method(stream):
version = ds_long(stream) # version
if version > 1:
if not ds_bool(stream):
return None
return BasePaymentMethod(currency=ds_unicode(stream),
amount=ds_long(stream),
precision=ds_long(stream))
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:8,代码来源:forms.py
示例8: _deserialize_attachment
def _deserialize_attachment(stream, version):
a = Attachment()
a.index = ds_long(stream)
a.content_type = ds_unicode(stream)
a.download_url = ds_unicode(stream)
a.size = ds_long(stream)
a.name = None if version < 2 else ds_unicode(stream)
return a
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:8,代码来源:messaging.py
示例9: _deserialize_payment_method
def _deserialize_payment_method(stream):
c = PaymentMethod()
ds_long(stream) # version
c.provider_id = ds_unicode(stream)
c.currency = ds_unicode(stream)
c.amount = ds_long(stream)
c.precision = ds_long(stream)
return c
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:8,代码来源:forms.py
示例10: _deserialize_button
def _deserialize_button(stream, version):
b = Button()
b.id = ds_unicode(stream)
b.index = ds_long(stream)
b.caption = ds_unicode(stream)
b.action = ds_unicode(stream)
b.ui_flags = ds_long(stream) if version >= 2 else 0
return b
开发者ID:gitter-badger,项目名称:rogerthat-backend,代码行数:8,代码来源:messaging.py
示例11: _ds_thumbnail
def _ds_thumbnail(stream):
has_thumbnail = ds_bool(stream)
if has_thumbnail:
return Thumbnail(
url=ds_unicode(stream),
height=ds_long(stream),
width=ds_long(stream),
)
return None
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:9,代码来源:messaging.py
示例12: deserialize_form_result
def deserialize_form_result(stream):
ds_long(stream) # version
type = ds_unicode(stream) # @ReservedAssignment
if not type:
return None
fr = FormResult()
fr.type = type
fr.result = WIDGET_RESULT_MAPPING[fr.type].model_deserialize(stream)
return fr
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:9,代码来源:forms.py
示例13: _deserialize_payment_method
def _deserialize_payment_method(stream):
c = PaymentMethod()
version = ds_long(stream) # version
c.provider_id = ds_unicode(stream)
c.currency = ds_unicode(stream)
c.amount = ds_long(stream)
c.precision = ds_long(stream)
c.calculate_amount = ds_bool(stream) if version > 1 else False
c.target = ds_unicode(stream) if version > 1 else None
return c
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:10,代码来源:forms.py
示例14: deserialize_location_widget_result
def deserialize_location_widget_result(stream):
version = ds_long(stream)
result = LocationWidgetResult()
result.horizontal_accuracy = ds_float(stream)
result.latitude = ds_float(stream)
result.longitude = ds_float(stream)
result.altitude = ds_float(stream)
result.timestamp = 0 if version < 2 else ds_long(stream)
result.vertical_accuracy = -1 if version < 2 else ds_float(stream)
return result
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:10,代码来源:forms.py
示例15: _deserialize_kv_store
def _deserialize_kv_store(stream):
ds_long(stream) # version
ancestor_key = ds_str(stream)
if ancestor_key is None:
return None
kv_store = KVStore(db.Key(ancestor_key))
kv_store._bucket_sizes = _deserialize_dict(stream, ds_long, ds_long)
kv_store._keys = _deserialize_dict(stream, ds_unicode, ds_long)
kv_store._blob_keys = _deserialize_dict(stream, ds_unicode, ds_long_list)
return kv_store
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:10,代码来源:keyvalue.py
示例16: _deserialize_message_embedded_app
def _deserialize_message_embedded_app(stream):
# type: (StringIO.StringIO) -> MessageEmbeddedApp
ds_long(stream) # version
obj = MessageEmbeddedApp()
obj.context = ds_unicode(stream)
obj.description = ds_unicode(stream)
obj.id = ds_unicode(stream)
obj.image_url = ds_unicode(stream)
obj.result = ds_unicode(stream)
obj.title = ds_unicode(stream)
return obj
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:11,代码来源:messaging.py
示例17: _deserialize_news_target_audience
def _deserialize_news_target_audience(stream, version):
target_audience = None
if ds_bool(stream): # target audience enabled
target_audience = NewsTargetAudienceTO()
target_audience.min_age = ds_long(stream)
target_audience.max_age = ds_long(stream)
target_audience.gender = ds_long(stream)
if version >= 6:
target_audience.connected_users_only = ds_bool(stream)
return target_audience
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:11,代码来源:news.py
示例18: _deserialize_member_status
def _deserialize_member_status(stream, version):
r = MemberStatus()
r.status = ds_long(stream)
r.received_timestamp = ds_long(stream)
r.acked_timestamp = ds_long(stream)
r.index = ds_long(stream)
r.dismissed = ds_bool(stream)
r.button_index = ds_long(stream)
r.custom_reply = ds_unicode(stream)
r.form_result = deserialize_form_result(stream) if version >= 2 else None
r.ack_device = ds_unicode(stream) if version >= 3 else None
return r
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:12,代码来源:messaging.py
示例19: _setup
def _setup(self):
if self._initialized:
return
if not self._stream:
raise Exception("NewsStatisticPerApp not ready, but setup was called.")
self._data = defaultdict(NewsItemStatistics)
ds_long(self._stream) # version
for _ in xrange(ds_long(self._stream)):
app_id = ds_unicode(self._stream)
self._data[app_id] = _deserialize_news_item_statistics(self._stream)
self._initialized = True
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:14,代码来源:news.py
示例20: _deserialize_advanced_order_item
def _deserialize_advanced_order_item(stream):
version = ds_long(stream)
i = AdvancedOrderItem()
i.id = ds_unicode(stream)
i.name = ds_unicode(stream)
i.description = ds_unicode(stream)
i.value = ds_long(stream)
i.unit = ds_unicode(stream)
i.unit_price = ds_long(stream)
i.step = ds_long(stream)
i.step_unit = ds_unicode(stream)
i.step_unit_conversion = ds_long(stream)
i.image_url = ds_unicode(stream) if version >= 2 else None
i.has_price = ds_bool(stream) if version >= 3 else True
return i
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:15,代码来源:forms.py
注:本文中的mcfw.serialization.ds_long函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论