# coding=utf-8 class Constants(object): def __init__(self): pass def enum(**self): return type('Enum', (), self) __VERSION__ = '1.0' __HTTP_GET__ = 0 __HTTP_POST__ = 1 _METHOD_MAP = {'GET': __HTTP_GET__, 'POST': __HTTP_POST__} http_server = "https://api-push.vivo.com.cn" ''' targetMessage parameter name ''' http_param_reg_ids = "regIds" http_param_aliases = "aliases" http_param_task_id = "taskId" ''' pushMessage parameter name ''' http_param_tag_expression = "tagExpression" http_param_or_tags = "orTags" http_param_and_tags = "andTags" http_param_not_tags = "notTags" http_param_segment_name = "segmentName" http_param_reg_id = "regId" http_param_content = "content" http_param_title = "title" http_param_ali_as = "alias" http_param_notify_type = "notifyType" http_param_time_to_live = "timeToLive" http_param_skip_type = "skipType" http_param_skip_content = "skipContent" http_param_network_type = "networkType" http_param_client_custom_map = "clientCustomMap" http_param_extra = "extra" http_param_callback = "callback" http_param_callback_param = "callback.param" http_param_request_id = "requestId" http_param_classification = "classification" http_param_push_mode = "pushMode" http_param_task_ids = "taskIds" ''' tagMessage parameter name ''' http_param_name = "name" http_param_old_name = "oldName" http_param_new_name = "newName" http_param_desc = "desc" http_param_group = "group" http_param_type = "type" http_param_ids = "ids" http_param_tag_list = "tagList" http_param_expression = "expression" request_path = enum( GET_TOKEN=["/message/auth"], PUSH_TO_SINGLE=['/message/send'], SAVE_LIST_PAYLOAD=['/message/saveListPayload '], PUSH_TO_LIST=['/message/pushToList'], PUSH_TO_ALL=['/message/all'], PUSH_TO_TAG=['/message/tagPush'], GET_STATISTICS=['/report/getStatistics'], ADD_TAG=['/tag/add'], UPDATE_TAG=['/tag/update'], ADD_MEMBERS=['/tag/addMembers'], REMOVE_MEMBERS=['/tag/removeMembers'], ADD_TAG_GROUP=['/tagGroup/add'], UPDATE_TAG_GROUP=['/tagGroup/update'], ADD_TAG_TO_GROUP=['/tagGroup/addToGroup'], ADD_TAG_SEGMENT=['/tagSegment/add'], UPDATE_TAG_SEGMENT=['/tagSegment/update'], )