Forum Replies Created
-
In reply to: I’m building a bbPress iOS and Android app
Woohoo! The first version of my bbPress app for Android is now available! It’s read only, as there’s no API for posting or logging in yet.
https://play.google.com/store/apps/details?id=com.tmkpro.utehub
In reply to: Is there an API for bbPressDo you have author/avatar in replies too? Then there would be no need for users end point. Paging is huge. I’m using @mapofemergence API for paging currently.
I’ve now joined the #bbpress slack!
In reply to: Is there an API for bbPressWow 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.
In reply to: Is there an API for bbPressI’ve set up a new slack account.
Team URL: tkserver.slack.com
In reply to: Is there an API for bbPressThis 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?
In reply to: Is there an API for bbPressOk @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/1Still checking… Will post more findings if there are any.
In reply to: Is there an API for bbPressOk 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?
In reply to: Is there an API for bbPressWell 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.
In reply to: Is there an API for bbPressI’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.
In reply to: Is there an API for bbPressI’m finding doing paging on forums which have posts and also have subforums to be a pain, LOL.
In reply to: Is there an API for bbPressGreat @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.
In reply to: Is there an API for bbPressOk @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!
In reply to: Is there an API for bbPressYES 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.
In reply to: I’m building a bbPress iOS and Android appHere’s the latest topics now that I’ve added reply count:
https://t.co/5064UdEBwD mobile app update: Not a lot of visible changes, but huge huge gains in speed getting data. #GoUtes pic.twitter.com/lpmtUVIP1R
— Ute Hub (@Ute_Hub) June 18, 2017
Here’s the new stats page:…also added stats section to the https://t.co/5064UdEBwD mobile app. pic.twitter.com/Qzezx9e8Ms
— Ute Hub (@Ute_Hub) June 18, 2017
In reply to: Is there an API for bbPressIn 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.
In reply to: Is there an API for bbPressHey @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.
In reply to: I’m building a bbPress iOS and Android appFor “latest posts” and other reusable listings of topics by forum or even by search (photo in first post of this thread) I need or will build a topic end point with these items:
- Topic title
- Topic author name and hashtag
- Topic date
- Reply count
- Forum name
Currently both API’s I’m using pull in all the topic content and a bunch of other stuff which slows down the query. I only want to pull the topic content when I’m showing it in the topic view.
For the forum name, author name/hash, and reply count I currently have to hit the api with 2nd, 3rd, and 4th http requests to the user endpoint, forum endpoint, and reply endpoint to get the data based on the id number. So that’s like 4x the api calls. It’s not snappy when I’m showing say the last 10 topics.
In reply to: I’m building a bbPress iOS and Android appThanks @casiepa. As of yesterday I can now hit single topics and the replies show below. I would like to do a threaded formatting like the home page of UteHub.com but that would require recursion of the replies somehow, or using my custom walker or the bbpress reply walker to generate the API output.
I will have many ideas as I go and communicate them.
In reply to: I’m building a bbPress iOS and Android appI may end up making my own custom api specifically for each call I need. For instance, I’m calling the forum API on latest posts each time it iterates through, so that means 10 http calls. I think if I could build that into the response I could cut those queries by 90%!
In reply to: I’m building a bbPress iOS and Android appHere’s a video of my current progress.
In reply to: Is there an API for bbPress@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 excited. Check out the first image I posted in that thread!
In reply to: Is there an API for bbPressI’ve hijacked this thread enough. Going to start one for the app.
In reply to: Is there an API for bbPressCheck 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!
In reply to: Is there an API for bbPressHey @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.
In reply to: Is there an API for bbPressShould not be too hard to implement into /bbp-api/topics/id (https://github.com/ePascalC/bbp-API/wiki/API-routes)
You get the topic data there and then an extra array with all replies.
Along those same lines, an object including the authorId, author name, and author hashtag in the api would eliminate a need for another custom api call for user info. WP does not allow hitting user info publicly to prevent name scraping I guess.