Skip to content

Rename REST API to Event REST API.#864

Merged
mauteri merged 1 commit intomainfrom
rename-rest-api-class
Sep 7, 2024
Merged

Rename REST API to Event REST API.#864
mauteri merged 1 commit intomainfrom
rename-rest-api-class

Conversation

@mauteri
Copy link
Copy Markdown
Contributor

@mauteri mauteri commented Sep 7, 2024

Description of the Change

Rename Rest API class to Event Rest API. This class is specific to events and should be named accordingly. If we add new rest endpoints that do not have to do with events it will make sense to add a new API class for those.

Closes #

How to test the Change

Changelog Entry

Changed - Existing functionality

Credits

Props @mauteri

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Sep 7, 2024

PR Summary

  • File and Class Rename for Better Specificity
    The file class-rest-api.php has been renamed to class-event-rest-api.php, thus making its function in dealing with event-related REST API more apparent. The class and namespace references within the file have also been updated to match this change.

  • Update of Initial Settings
    In the class-setup.php file, Event_Rest_Api has been added to the list of classes that are put into action. This ensures that the newly renamed class is initialized properly.

  • Test File Rename and Refactoring
    Class and file class-test-rest-api.php related to testing has been renamed to class-test-event-rest-api.php, retaining consistency with the earlier mentioned renaming. Corresponding class and namespace references have been updated within this file too.

  • Update in Test Invocation
    The test class Test_Event_Rest_Api no longer uses the generic Rest_Api. Instead, it now utilizes the specific Event_Rest_Api, enhancing the effectiveness and specificity of the tests.

@mauteri mauteri marked this pull request as ready for review September 7, 2024 16:13
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 7, 2024

Preview changes with Playground

You can preview the least recent changes for PR#864 by following one of the links below:

⚠️ Note: The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions.

@mauteri mauteri merged commit 3d91f2b into main Sep 7, 2024
@mauteri mauteri deleted the rename-rest-api-class branch September 7, 2024 16:18
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.

1 participant