MyBB Community Forums

Full Version: preferred API style?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If I (or a group of us) were to create an API for MyBB, would you all prefer for the style?

1) Basic PHP class file to include in your scripts that has simple functions to call directly

2) A real API that you call via cURL


The thing is #1 is that it is faster and easier and would work great to integrate different software on the same server (like WP and MyBB) via plugins

#2 has an advantage of working cross-site/domain and with an API Key and user tokens, you can be secure in the connection. Drawback is that it is another http call to your sites.
#1, because it seems like a more likely situation for my situation. Plus I'd like up start from scratch with my WP-MyBB integration plugin, so #1 would be good for that.
Both if at all possible. #2 would mean we could develop for different languages than PHP (such as for mobile) so long as they can understand the output format. That would be greatly beneficial at this point I believe.
I agree that both are useful, but my thought would be to focus on one specific method first
If the first option was developed first, it could easily be used to create the second as it would reduce development time to use the existing functions.
exactly, make the first one a class and then a second file to wrap the first one for external handling
Sounds like the perfect approach to me. As I said before, I'm up for helping out.