Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.

Add expiration date support for shared links#287

Closed
TRoc81 wants to merge 2 commits into
owncloud:masterfrom
TRoc81:master
Closed

Add expiration date support for shared links#287
TRoc81 wants to merge 2 commits into
owncloud:masterfrom
TRoc81:master

Conversation

@TRoc81

@TRoc81 TRoc81 commented Feb 12, 2024

Copy link
Copy Markdown

Added support for expiration date on shared links

Added support for expiration date on shared links
Updated comments for expiration date
Comment thread owncloud/owncloud.py

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might suggest snake casing the two words expire_date as they are camel cased in the official API:

https://doc.owncloud.com/server/next/developer_manual/core/apis/ocs-share-api.html#create-a-new-share

@onyx-and-iris

Copy link
Copy Markdown

Good update, it would be worth adding expiration to the returned ShareInfo object as well.

Here's an example implementation, perhaps it can be improved upon:

                "name": data_el.find("name").text,
                "expiration": int(
                    round(
                        datetime.datetime.strptime(
                            data_el.find("expiration").text, "%Y-%m-%d %H:%M:%S"
                        ).timestamp()
                    )
                ),

It would also be worth expanding the test case.

@DeepDiver1975

Copy link
Copy Markdown
Member

This repository is being archived and is no longer maintained. Closing this as part of archival. Thank you for your contribution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants