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

BP API action class #8

Closed
boonebgorges opened this issue Mar 8, 2012 · 1 comment
Closed

BP API action class #8

boonebgorges opened this issue Mar 8, 2012 · 1 comment
Assignees
Milestone

Comments

@boonebgorges
Copy link
Member

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):

  • Group membership (join group, leave group)
  • Profile field management (get profile field data, update profile field data)

Assigning to myself for now, but we can toss this around.

@ghost ghost assigned boonebgorges Mar 8, 2012
boonebgorges added a commit that referenced this issue Mar 27, 2012
- 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.
@boonebgorges
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant