Comments (5)
Do you need this implementation into your existing endpoints or into a new endpoint? If it is an existing endpoint, which endpoint needs to be modified? Is it UpdatePropertiesAsync?
from notion-sdk-net.
You can add new endpoint named UpdateAsync
in IPagesClient
. I'm thinking of deprecating the UpdatePropertiesAsync
endpoints in future. We may introduce a separate endpoint which is dedicated to just Delete a page.
from notion-sdk-net.
Ok, So, I am sharing my idea of how we can do that from my understanding.
- First of all, we have to keep in mind that a user can un-archive or restore a page at any time, so we have to make it soft delete.
- To make it soft delete, when a user makes a delete request like DeletePage(pageId, true) we just update the value of the archive property true or false
- When a user wants to Retrieve a page at that time we only return a page whose archive property is true.
Is it make sense or not with your requirements, please give your valuable feedback
from notion-sdk-net.
I think we can just implement UpdateAsync
endpoint for IPagesClient
at the moment & add Deprecated attribute on UpdatePropertiesAsync
endpoint.
This is not required but if need we can add ArchiveAsync
and UnArchiveAsync
but I'm not sure atm as Notion API is changing
and user can use UpdateAsync
if they want to un-archive a page. but if it is not much of work for you then go ahead.
I did not understood your third page I don't think this would affect any other API.
from notion-sdk-net.
I just came across this issue as well while adding delete.
Koditkar, I think your approach is correct. Outside of properties, only the IsArchived flag is modifiable on a page.
Something like UpdateAsync( pageId, properties, archive ).
This is consistent with your nice generic interface pattern.
from notion-sdk-net.
Related Issues (20)
- Add support for `public_url` on Page and Database object
- Support New Notion Error Codes
- Add support for `verification` page property HOT 1
- Querying wiki databases can return both Page and Database objects
- Why is the RichText property an IEnumerable?
- Is there a way to get API error codes aside from the logger?
- Integrate Release Drafter to automate the draft of a release.
- Add Authentication Endpoints
- Add missing type property in Paginated response.
- Add type specific pagination information
- Ajust breaking integration tests
- BlockId is getting sent in Append Children api request HOT 1
- RelationPropertySchema and RelationUpdatePropertySchema are broken.
- Deprecated API: client.Databases.RetrieveAsync HOT 2
- "GatewayTimeout" is misspelled in NotionAPIErrorCode Enum
- "Archived" property is getting deprecated HOT 1
- Adds support to read and write names for the file blocks.
- Date mentions are not correctly serialized
- Using Date mentions doesn't allow to exclude
- DateTime TimeZone is empty HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notion-sdk-net.