Is there an API for bbPress?

2019-07-23 19:17发布

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条回答
地球回转人心会变
2楼-- · 2019-07-23 19:28

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.

查看更多
Bombasti
3楼-- · 2019-07-23 19:32

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.

查看更多
不美不萌又怎样
4楼-- · 2019-07-23 19:37

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.

查看更多
登录 后发表回答