def delete_multiple_ids(cls, ids, revision_notes, agent=default_agent): request_queue = RequestQueue() for id, note in zip(ids, revision_notes): request_queue.delete_request( cls.get_uri(id, agent), {'Authorization': 'Bearer {}'.format(agent.oauth_acess_token), 'Content-Type': 'application/json'}, {"revision": {"note": note}} ) request_queue.send_all()
def get_multiple_ids_json_derived(classes, ids, included, agent): request_queue = RequestQueue() responses_json = [] # First round of requests for cls, id in zip(classes, ids): responses_json.append( cls.add_id_get(id, request_queue, agent) ) request_queue.send_all() # Second round of requests (uses data from the first one) for cls, response in zip(classes, responses_json): cls.add_id_get_more(response, request_queue, included) request_queue.send_all() return responses_json