def create_request_object(rel_url, req_type, req_to, job_id):
"""
Creates request strings to use for batch_requests,
based on rel_url
type: can be used to determine the type of request when reading
the response
to: can be used to link certain attributes (like 'reactions')
to the post they belong
"""
# print(rel_url)
return {
'req_type': req_type,
'req_to': req_to,
'job_id': job_id,
'req': {
"method": "GET",
"relative_url": "{}".format(rel_url)
}
}
评论列表
文章目录