You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Introduces BP_API_Server class, which is an implementation of BP_Component. This class is responsible for managing endpoints, and will be the place where various request methods (GET, POST, internal, etc) and formats (JSON, XML, etc) will be translated into a common format for processing by the Request class. Note that *no authentication or authorization is yet in place*, so this code should *under no circumstances* be run on a live environment. See #10.
- Introduces BP_API_Server_Request class. This class takes the standardized request from BP_API_Server, handles authentication/authorization (todo), deals with error codes, normalizes some parameters. This code is purposefully BP-independent; in fact, at the moment, it's WP independent as well. See #9.
- Introduces BP_API_Server_Request_Action class. This class accepts request parameters passed from BP_API_Server_Request class, validates and sanitizes the parameters in BP- and WP-specific ways, and then calls BP-specific action methods which make direct calls to BP's internal APIs. The class then returns success/error codes to the parent. Note that the only action currently implemented is update_profile_field. See #8.
After some work and thought, I'm going to combine this class with the "request" class (see #9). There's no compelling reason to keep them separate. Keeping this ticket open for that reason.
A class that has wrapper methods for any sort of action you might want to perform via external API. Start with the following (requested by MLA):
Assigning to myself for now, but we can toss this around.
The text was updated successfully, but these errors were encountered: