Is there an API for bbPress?

886 views Asked by At

I'm searching for an API for bbPress. I've searched here on SO but the posts I'm seeing are quite old. So is there an api for bbPress. If yes, please how do I access it?

If no, is there anyway I can implement user registration and login via an Android app?

3

There are 3 answers

4
Slava Abakumov On BEST ANSWER

Also, check this repository: https://github.com/buddypress/BP-REST

In general, BuddyPress REST API is in development. Current focus will be on members management and their profile fields. You can also check https://bpdevel.wordpress.com site, that's a development blog, where Boone is taking care of all the REST things (see latest posts).

User registration and log in can be implemented independently from BuddyPress, using default WordPress endpoints, that were shipped with the latest WordPress 4.7.

1
Dustin Snider On

All BuddyPress offers for API Documentation is the Codex: https://codex.buddypress.org/

If you want to know if there is a function that does x, then just look in the respective file and that should give you the information for the hooks you need, for example if it’s something to do with activity, then look at bp-activity.php I know this isn't perfect but it should give you what you are looking for. All the function names are very descriptive, so it shouldn’t take more than a few seconds to find a function that fits your needs.

Database classes can be found in these files: bp-{component name}/bp-{component name}-classes-php

Template functions can be found here: bp-{component name}/bp-{component name}-templatetags-php

Once you realize how files and functions within files are organized it should be pretty easy to find what you are looking for exactly. Hope this helps!

Alternatively, you could do something like webview around the login/registration page. Not ideal I know but is an option if you don't want to go through the hassle.

0
Slava Abakumov On

There is a bbPress API, which leverages WP JSON API v1.0:

https://github.com/thenbrent/BB-API

But you should consider upgrading it to v2.0 of an API, as it's much better.