def get_all_groups(token): url = 'http://srv-pnew-01-test.ponyex.local:1001/api/v1/user-profile-groups/get-limit/1000' with allure.step('Отправил запрос на получение всех групп пользователей'): r = send_request.get_request( url, headers={'Authorization': f'Bearer {token}'}) return json.loads(r.text)
def get_polygon_with_coordinates_by_address_id(token, id_, number): url = f'http://geography-backend-edu.pegasus.ponyex.local/api/v1/geography/get-polygon-with-coordinates-by-address-id/{id_}?waybillNumber={number}' headers = {'Authorization': f'Bearer {token}'} data = {'id': id_, 'waybillNumber': number} with allure.step('Поиск координат полигона адреса объекта по id объекта'): r = send_request.get_request(url, headers=headers, params=data) return json.loads(r.text)
def get_by_id(token, id_): url = f'http://geography-backend-edu.pegasus.ponyex.local//api/v1/addresses/get-by-id/{id_}' headers = {'Authorization': f'Bearer {token}'} data = {'id': id_} with allure.step('Поиск адреса объекта по id объекта'): r = send_request.get_request(url, headers=headers, params=data) return json.loads(r.text)
def find_object(token, id_): url = f'http://events-backend-edu.pegasus.ponyex.local/api/v1/pegasus-events71/get-events-by-event-block-id/{id_}' headers = {'Authorization': f'Bearer {token}'} data = {'id': id_} with allure.step('Поиск объекта с id: ' + id_): r = get_request(url, headers=headers, params=data) return json.loads(r.text)