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

Function get_pb2_records_request

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

Source from the content-addressed store, hash-verified

1678
1679
1680def get_pb2_records_request(params, request_type='add'):
1681 # type: (KeeperParams, str) -> Union[record_pb2.RecordsUpdateRequest, record_pb2.RecordsAddRequest]
1682 rq_by_type = dict(add=record_pb2.RecordsAddRequest, update=record_pb2.RecordsUpdateRequest)
1683 new_rq_fn = rq_by_type.get(request_type.lower())
1684 if not new_rq_fn:
1685 raise Exception(f'Request type [{request_type} is unrecognized. Valid choices are [add, update]')
1686 else:
1687 rq = new_rq_fn()
1688 rq.client_time = utils.current_milli_time()
1689 rq.security_data_key_type = get_security_data_key_type(params)
1690 return rq
1691
1692
1693def 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