Skip to content

Feature/comments #111

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

Merged
merged 43 commits into from
Feb 6, 2023
Merged

Feature/comments #111

merged 43 commits into from
Feb 6, 2023

Conversation

johguentner
Copy link
Member

add comment entity, collection and endpoints

  • create comment entity with all available attributes
  • create comment collection for a simple representation as list
  • create endpoint for comment listing, based on block_id
  • create endpoint for comment creation, based on page_id or discussion_id
  • add comment endpoint access to Notion::class

johguentner and others added 21 commits February 4, 2023 18:21
- move properties created_time, last_updated_time, etc. to its own trait
- remove attributes and methods from entity classes (which are applied by traid)
- apply traid to according entity classes (database, page and block)
- add created_by, last_updated_by to this new trait
- refactor rawTitle into richTitle
- add description and rawDescription (with according fill and getter)
- within the database entity
- add description example to stub
- to ``HasTimestamps``
- for improved readability
- move page logic of ``HasParent`` to its on trait and did minor refactoring
- add ``HasParent`` to Database and Block entity
- tests already exist for page entity
- add to database and block tests
- add raw parent property to stubs within block and database
- add missing prop to stub
- add check for property within database test
- the handling of archived-flags can be added to entities by this trait
- add trait to database, page and block
- to database, block and pages
- change stubs regarding the archived-flag, to force testing to check for ``true`` as archived
- and do filling of ``id`` and ``object`` within a entity base class method
- call ``::fillEntityBase`` form the ``fillFromRaw`` within all according entitites
- add test-cases for checking ``getObjectType``
- create comment entity with all available attributes
- create comment collection for a simple representation as list
- create endpoint for comment listing, based on ``block_id``
- create endpoint for comment creation, based on ``page_id`` or ``discussion_id``
- add comment endpoint access to ``Notion::class``
@johguentner johguentner added this to the 🍵 v1.1.0 milestone Feb 5, 2023
@what-the-diff
Copy link

what-the-diff bot commented Feb 5, 2023

  • Added Comments Endpoint
  • Added CommentCollection Entity Collection
  • Added Comment Entity
  • Updated Block to use HasTimestamps, HasArchive and HasParent Traits (instead of duplicating code)
  • Added HasTimestamps, HasArchive and HasParent traits to Entity class
  • Refactored Page::fillFromRaw() method into fillEntityBase(), fillProperties(), etc methods
  • Implemented the same refactor for PropertyItem classes (SelectItem, User)
  • Updated tests accordingly
  • The EndpointPagesTest.php file was changed to add a new assertion that checks if the page is archived or not
  • The response_specific_block_200.json stub was updated with an additional property "archived" and its value set to true, as well as adding parent type and id properties
  • In the response specific database 200 json stub, we added a description field for our grocery list example in addition to updating some of the existing fields such as title and color
  • Finally, in our pages endpoint test we also update one of our assertions so it now asserts that this particular page has been archived (true) instead of false which used to be asserted before

@johguentner johguentner modified the milestones: 🍵 v1.1.0, 🌳 v1.0.0 Feb 6, 2023
@johguentner johguentner requested a review from mechelon February 6, 2023 09:28
@johguentner johguentner merged commit b3bb528 into dev Feb 6, 2023
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 this pull request may close these issues.

2 participants