Skip to content
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

Change rest-api namespace to wp-notifications/v1 #194

Closed
johnhooks opened this issue Mar 30, 2023 · 2 comments · Fixed by #178 or #283
Closed

Change rest-api namespace to wp-notifications/v1 #194

johnhooks opened this issue Mar 30, 2023 · 2 comments · Fixed by #178 or #283
Assignees
Labels
[Scope] Service The core logic of the WP Notify project.

Comments

@johnhooks
Copy link
Collaborator

johnhooks commented Mar 30, 2023

What problem does this address?

The plugin should not use the core wp/v2 namespace

What is your proposed solution?

@TimothyBJacobs suggested wp-notifications/v1 in #179, which sounds good.

Another thought is to stick with the "Notify" name and do wp-notify/v1, this is shorter, and if this does merge into core, the "wp-notify" namespace/prefix used everywhere would simply become "wp".

@johnhooks johnhooks added the [Scope] Service The core logic of the WP Notify project. label Mar 30, 2023
@Sephsekla
Copy link
Collaborator

This is good call, and I think having a version in there is smart.

I'd prefer to go with wp-notifications over wp-notify, we switched over for a reason and we should try and be as consistent as we can.

@johnhooks
Copy link
Collaborator Author

johnhooks commented Mar 31, 2023

@Sephsekla with this change, /wp-json/wp-notifications/v1/notifications seems like an odd endpoint. How do you feel about /wp-json/wp-notifications/v1/messages? In consideration that it would be part of:

/wp-json/wp-notifications/v1/messages
/wp-json/wp-notifications/v1/channels
/wp-json/wp-notifications/v1/subscriptions

Also the class name with namespace would be more descriptive. Example:

WP/Notifications/Message and WP/Notifications/Message_Controller

Rather than:

WP/Notifications/Notification and WP/Notifications/Notification_Controller

Just thoughts. I'm leaving it as /wp-json/wp-notifications/v1/notifications unless I hear otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Scope] Service The core logic of the WP Notify project.
Projects
None yet
2 participants