Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Fix #200

Open
JeffRossMT opened this issue Nov 9, 2021 · 2 comments · May be fixed by #217
Open

Documentation Fix #200

JeffRossMT opened this issue Nov 9, 2021 · 2 comments · May be fixed by #217

Comments

@JeffRossMT
Copy link

jross@ip_cam:/home/jross/python-amcrest $ diff -u3 README.rst.orig README.rst
--- README.rst.orig	Tue Nov  9 11:18:17 2021
+++ README.rst	Tue Nov  9 11:19:22 2021
@@ -58,7 +58,7 @@
     'version=2.420.AC00.15.R\r\nBuildDate=2016-09-08'

     #Capture snapshot
-    camera.snapshot(0, "/home/user/Desktop/snapshot00.jpeg")
+    camera.snapshot(channel=0, path_file="/home/user/Desktop/snapshot00.jpeg")
     <requests.packages.urllib3.response.HTTPResponse object at 0x7f84945083c8>

     #Capture audio
@tchellomello
Copy link
Owner

@JeffRossMT thanks! Could you create a PR for this?

@JeffRossMT
Copy link
Author

Well, all that is apparently beyond me. I set up an ssh key and used ssh to clone the repo.
jross@ip_cam:/home/jross/python-amcrest $ nano README.rst
jross@ip_cam:/home/jross/python-amcrest $ git add README.rst
jross@ip_cam:/home/jross/python-amcrest $ git commit
[master f9e0375] Remove 2.7 since it is no longer supported and httpx is not available for 2.7 Correct the snapshot sample to update to the new syntax.
1 file changed, 2 insertions(+), 2 deletions(-)
jross@ip_cam:/home/jross/python-amcrest $ git push
ERROR: Permission to tchellomello/python-amcrest.git denied to JeffRossMT.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Here's a more complete diff:

jross@ip_cam:/home/jross/python-amcrest $ diff -U3 README.rst.orig README.rst
--- README.rst.orig	Wed Nov 10 09:59:55 2021
+++ README.rst	Wed Nov 10 09:51:43 2021
@@ -14,7 +14,7 @@
 .. image:: https://img.shields.io/pypi/pyversions/amcrest.svg
     :target: https://pypi.python.org/pypi/amcrest

-A Python 2.7/3.x module for `Amcrest Cameras <https://www.amcrest.com/>`_ using the SDK HTTP API. Amcrest and Dahua devices share similar firmwares. Dahua Cameras and NVRs also work with this module.
+A Python 3.x module for `Amcrest Cameras <https://www.amcrest.com/>`_ using the SDK HTTP API. Amcrest and Dahua devices share similar firmwares. Dahua Cameras and NVRs also work with this module.

 Documentation: `http://python-amcrest.readthedocs.io/ <http://python-amcrest.readthedocs.io/>`_

@@ -58,7 +58,7 @@
     'version=2.420.AC00.15.R\r\nBuildDate=2016-09-08'

     #Capture snapshot
-    camera.snapshot(0, "/home/user/Desktop/snapshot00.jpeg")
+    camera.snapshot(channel=0, path_file="/home/user/Desktop/snapshot00.jpeg")
     <requests.packages.urllib3.response.HTTPResponse object at 0x7f84945083c8>

     #Capture audio

Took me a while to figure this API breaking change so I thought I'd share it back to help others.

@JYOuyang JYOuyang linked a pull request May 17, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants