Git Product home page Git Product logo

Comments (5)

ih-hira avatar ih-hira commented on August 20, 2024

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.

KoditkarVedant avatar KoditkarVedant commented on August 20, 2024

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.

ih-hira avatar ih-hira commented on August 20, 2024

Ok, So, I am sharing my idea of how we can do that from my understanding.

  1. 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.
  2. 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
  3. 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.

KoditkarVedant avatar KoditkarVedant commented on August 20, 2024

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.

Scantheus avatar Scantheus commented on August 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.