Skip to:
Content
Pages
Categories
Search
Top
Bottom

Is there an API for bbPress

Viewing 25 replies - 51 through 75 (of 76 total)

  • TKServer
    Participant

    @tkserver

    Hey @casiepa I branched your git hub repo and added a user end point so I can continue development of my mobile bbPress app. I’ve used git hub a lot, but never branched someone else’s repo so I couldn’t quite figure out how to connect them, so I just manually uploaded.

    https://pbs.twimg.com/media/DB7SnCKV0AALQha.jpg


    TKServer
    Participant

    @tkserver

    Check it out. After hacking @casiepa’s branch to get user info, I how can view a topic in my mobile bbPress app! I’m getting the user’s avatar, display_name, topic title, date posted, forum name and of course the content of the topic!
    bbpress mobile app development


    TKServer
    Participant

    @tkserver

    I’ve hijacked this thread enough. Going to start one for the app.


    mapofemergence
    Participant

    @mapofemergence

    @tkserver, @casiepa glad to read you’re keeping up with the good work.

    I’m a bit swamped in these days, wrapping up my experience overseas and having to move back to the old continent next week.
    I’ll have a better look at the latest additions in Pascal’s repo and its fork by @tkserver.

    I’m looking forward to see how that all evolves and I’ll be more than happy to contribute, as soon as I’ll have some time.
    I’d just love to find some space to discuss about the design aspects of the API too, before diving too much into writing code and risk to bump into limitations late in the process.

    I keep reading you with great interest.
    Cheers,
    s t e


    TKServer
    Participant

    @tkserver

    @mapofemergence I really like what you’ve done with your api. It is robust and the documentation is excellent. I’m not sure if my forking of Pascal’s is any good as I’ve never worked on API stuff before, but many years of PHP and WP.

    I’ve started a new thread for discussion of my bbPress mobile app here:

    I’m building a bbPress iOS and Android app

    I’m excited. Check out the first image I posted in that thread!


    arn2k17
    Participant

    @arn2k17

    My bbpress Api not working. Why..?
    it happens to me..?


    TKServer
    Participant

    @tkserver

    Hey @mapofemergence where’s your git hub repo? I’m forking your API a bit. I’ve added reply count to your api and I’m using it since I can’t get anything other than a null response for topics with the @casiepa api.

    https://mapofemergence.github.io/BB-REST


    TKServer
    Participant

    @tkserver

    In addition to reply count I also added the author name and author avatar. That saved a TON of time and http calls. Huge speed increase.


    mapofemergence
    Participant

    @mapofemergence

    Hi @tkserver, sorry for my silence but in these days I’m a bit swamped with preparing to move back home after some time living and working abroad.

    I’m not sure what you mean by where’s my git repo; do you mean this?https://github.com/mapofemergence/BB-REST
    I believe it’s linked in my previous post and I see you have starred it, so I might have misunderstood the question. In that case, please expand a bit more 🙂

    BTW, in less than one week I’ll be back home so I should be a bit more responsive in replying.
    Sorry again,
    s t e


    TKServer
    Participant

    @tkserver

    YES that one. Thanks @mapofemergence no worries. Travel safe. Somehow I lost that link and there is no link from your documentation to the repo. I’ve been there before! Ok I will do some forking.


    TKServer
    Participant

    @tkserver

    Ok @mapofemergence it took me a bit to figure out how to fork on github (I use bitbucket normally). Here’s my fork which currently contains the addition of user name, user avatar, and forum name in the topics end point. This results in a huge speed increase over having to hit the forum api and user api while looping through the topics. So I’ve reduced the api calls from 20 down to 1 for a feed of the 10 latest topics!

    https://github.com/tkserver/BB-REST

    Hi @tkserver
    I will launch v1.0.3 today on https://wordpress.org/plugins/bbp-api/
    Sources are still on https://github.com/ePascalC/bbp-API/

    The routes have slightly changed to comply with standard bbPress settings, but when you get the specific forum, e.g. http://www.example.com/wp-json/bbp-api/v1/forums/forum/5914 it would give you the details of the forum and the list of the 20 recent topics with the title, reply_count, permalink, author and avatar.

    I see you also wanted the date posted, so let me add that one too before I commit.

    If you see other things to add, let me know. But no guarantee on my response time in these weeks 🙂
    Pascal.
    PS. are you on slack so we could discuss ?


    TKServer
    Participant

    @tkserver

    Great @casiepa I will check it out! For posts in a forum with user/avatar etc I’ve been using a modified version of the API from @mapofemergence which has been working well.


    TKServer
    Participant

    @tkserver

    I’m finding doing paging on forums which have posts and also have subforums to be a pain, LOL.

    Paging is my next step, probably this weekend. Why is subforums a pain? You need to list the subforums from the page, then jump to them, no ?


    TKServer
    Participant

    @tkserver

    I’ve made my own pagination which then makes sure the http calls are only for the number of records requested. I’m showing the subforums fine, and linking to them. The thing is a forum can be a parent of other forums so it can have posts in it along with the subforums. Somehow the paging is getting broken because I’m not accounting for posts vs subforums. I need to make some logic for that specific scenario.


    TKServer
    Participant

    @tkserver

    Well oops. I fell a little silly. I thought my paging was broken in the sub-forum scenario. It wasn’t. Turns out the parent form had only 10 total topics. So when I would go to page 2, there was nothing to show. LOL.


    TKServer
    Participant

    @tkserver

    Ok now that we are on the topic of subforums, I see an issue on the API end.

    I have a forum which is a parent of about six other forums. That forum has 10 posts in it. The sub forums have 121 posts in them. The total for the parent is showing as 131 because it is counting the subforums. The problem with this is that for my paging I’m using the topic count which breaks the app. The total topics are 131, but there’s only 10 topics to show.

    Does that make sense?


    TKServer
    Participant

    @tkserver

    Ok @casiepa I’m trying v1.0.3 of your api. Some of the routes are different.

    The users routes do not seem to work in 1.0.3
    wp-json/bbp-api/v1/users
    wp-json/bbp-api/v1/users/1

    Still checking… Will post more findings if there are any.


    TKServer
    Participant

    @tkserver

    This was missing from bbp-api.php:

    	register_rest_route( 'bbp-api/v1', '/users/(?P<id>\d+)', array(
    		'methods' => 'GET',
    		'callback' => 'bbp_api_users_one',
    	) );

    and users.php was also missing.

    I’m guessing that was intentional?


    TKServer
    Participant

    @tkserver

    I’ve set up a new slack account.

    Team URL: tkserver.slack.com

    I never had a /users. It need to see how this behaves because I don’t want to open up information of users that might not be public yet.

    And for slack, I was not referering to a slack team but just if you were already on wordpress.slack.com . Because it might be easier to discuss things 🙂

    Great idea, @tkserver you can sign up for the WordPress development Slack here:

    https://chat.wordpress.org/


    TKServer
    Participant

    @tkserver

    Wow am I so brain dead that I created that users end point on my own branch of your version 1.0.2 and don’t even remember? (just read previous posts and yes, apparently I did!) All I’m getting from that service is name and avatar, but that was because those were not in the latest topics or replies. If both of those had author name and avatar, I might have no need for a users endpoint unless one wanted to list posts or replies by user.

    I’m very close to releasing a read-only version of my app. A day or two likely.

    I just joined the WP slack but that’s way too busy and focused on wp core. I think a separate channel for bbPress or the api would be good.

    Well, if you list a forum, all topics already have author and avatar as well as all other info of the topic my 1.0.3 version 🙂
    Next step is the pagination and the same info for replies.

Viewing 25 replies - 51 through 75 (of 76 total)
  • You must be logged in to reply to this topic.
Skip to toolbar