-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add support for SYNO.Core.Share.Snapshot #58
Comments
I will accept a PR of course !
I don't see Thanks. |
Also take care of #59 |
#61 is not solving this right ? Let me know when you are doing the snapshot work 😉 |
@Quentame I can work on it this week. I want to support creating, updating, and deleting snapshots, how do you want to name these functions? Proposed -
Keep in mind I'd eventually like to extend this functionality to other resources (like shares!) Do you want to merge #62 before I start or should I work against that pull request? |
I may merge it before yes. Proposed name functions are nice 😉 |
#62 should be merge already but has an bug. So master, maybe your PR will go first. Or we will rebase later 😊. |
@Quentame after creating or deleting a snapshot we need to run Alternatively we could leave that to the user. Thoughts? |
@Quentame -
As you can see they are using "SYNO.Entry.Request" for mutating API calls. Do you want to add
Alternatively we could make it a little more RESTful by implementing this in
and hide the weird implementation. Also, Syno's API is weird, right? I've never seen anything else like it. |
I think you are right, call |
Emmmm, I prefer the second approach. Or maybe the
Sure, there is ugly and weird things going on this API 😅 python-synology/synology_dsm/synology_dsm.py Lines 96 to 103 in 27379e7
|
I think SYNO.Entry.Request is being used for most mutating API calls. I'm going to implement I've got snapshot lists working -
|
I haven't forgotten about this. Right now I can't create a snapshot via this SDK but if I copy the URL I'm creating from the debug logs and paste it into a browser the snapshot gets created. The request looks like this -
I've tried setting |
Are you getting something new on this ? |
Hi, @Quentame. I was looking to use this package for a personal project and I noticed this issue to implement snapshots, but I think it refers to functionality in the core Synology, not the Surveillance Station. The code I'm using to fetch snapshots from the Surveillance Station is something like: SNAPSHOT_PATH_TEMPLATE = '/webapi/entry.cgi?camStm=1&version=2&cameraId={camera_id}&api=%22SYNO.SurveillanceStation.Camera%22&method=GetSnapshot'
url_path = SNAPSHOT_PATH_TEMPLATE.format(camera_id=camera_id)
response = self._request(url_path, cookies=self.cookies())
f.write(response.content) Looking at all messages on this thread, I can't help but think that I'm missing something. Is the intention to support Thanks! edit: I think I just answered my own question. What I'm looking for is here: https://github.com/ProtoThis/python-synology/blob/master/src/synology_dsm/api/surveillance_station/__init__.py#L93. I should have looked before asking - apologies for the noise. |
Would you accept a pull request that implements list, create, and delete @ SYNO.Core.Share.Snapshot?
If yes, does it belong at
synology_dsm/api/core/share/snapshot
orsynology_dsm/api/core/snapshot
? A trace of a request points atapi=SYNO.Core.Share.Snapshot
.The text was updated successfully, but these errors were encountered: