MissiaL / hikvision-client

Client for Hikvision devices
MIT License
209 stars 43 forks source link

"ISAPI" as a parameter #10

Closed fusiller closed 5 years ago

fusiller commented 5 years ago

Hello, thank you for this great piece of work. Could you please consider making the constant ISAPI a Client property so that we can change it to whatever is needed. In my case, with a Swann branded 15-100 DVR, it needs to read 'PSIA' instead of 'ISAPI'. May I suggest def init(self, host, login=None, password=None, isapi_prefix='ISAPI', timeout=3): """ :param host: Host for device ('http://192.168.0.2') :param login: (optional) Login for device :param password: (optional) Password for device :param timeout: (optional) Timeout for request """ self.host = host self.login = login self.password = password self.timeout = float(timeout) self.isapi_prefix = isapi_prefix self.req = self._check_session() self.count_events = 1

and use self.isapi_prefix instead of ISAPI in the rest of the code ?

Best regards, Alex

MissiaL commented 5 years ago

Could you prepare pull request with these changes?

MissiaL commented 5 years ago

Package was released 0.2.1