MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / get_pb2_records_request

Function get_pb2_records_request

keepercommander/api.py:1705–1715  ·  view source on GitHub ↗
(params, request_type='add')

Source from the content-addressed store, hash-verified

1703
1704
1705def get_pb2_records_request(params, request_type='add'):
1706 # type: (KeeperParams, str) -> Union[record_pb2.RecordsUpdateRequest, record_pb2.RecordsAddRequest]
1707 rq_by_type = dict(add=record_pb2.RecordsAddRequest, update=record_pb2.RecordsUpdateRequest)
1708 new_rq_fn = rq_by_type.get(request_type.lower())
1709 if not new_rq_fn:
1710 raise Exception(f'Request type [{request_type} is unrecognized. Valid choices are [add, update]')
1711 else:
1712 rq = new_rq_fn()
1713 rq.client_time = utils.current_milli_time()
1714 rq.security_data_key_type = get_security_data_key_type(params)
1715 return rq
1716
1717
1718def get_records_add_request(params): # type: (KeeperParams) -> record_pb2.RecordsAddRequest

Callers 2

get_records_add_requestFunction · 0.85

Calls 2

getMethod · 0.80

Tested by

no test coverage detected