コード例 #1
0
def PullResourceUuidList(scrollId):
    env = conf.get('common', 'runEnv')
    baseUrl = conf.get(env, 'marketingopenapi_url')
    appId = conf.get('common', 'appId')
    key = conf.get('common', 'key')
    time_sign = get_now_time_sign()
    header = {
        "Content-Type": "application/json;charset=UTF-8",
        "appId": appId,
        "timeSign": str(time_sign),
        "signature": get_signature(appId, key, time_sign)
    }
    requests_url = baseUrl + '/company/pullResourceUuidList'
    payload = {
        "dto": {
            # "endUpdatedTime": "2020-07-09 01:00:02",
            "scrollId": scrollId,
            # "startUpdatedTime": "2019-03-06 12:00:00",
            "useAsc": "true",
            "windowSize": 100
        },
        "resourceType": "PROPERTY_BASE"
    }
    r = requests.post(requests_url, json=payload, headers=header)
    return r.json()
コード例 #2
0
 def setUp(self):
     env = conf.get('common', 'runEnv')
     self.baseUrl = conf.get(env, 'marketingopenapi_url')
     self.appId = conf.get('common', 'appId')
     self.key = conf.get('common', 'key')
     time_sign = get_now_time_sign()
     self.header = {
         "Content-Type": "application/json;charset=UTF-8",
         "appId": self.appId,
         "timeSign": str(time_sign),
         "signature": get_signature(self.appId, self.key, time_sign)
     }