Open davidnewcomb opened 7 years ago
I've got plans to prepare API and to rewrite code to use it internally as well so this is something that will appear eventually. No ETA yet though.
I have been building one (of sorts) as I go along, which you can have once it starts to turn into something worth committing of course!
While trying to reuse as much of your code as I can I have noticed several annoyances that have been making that job more difficult. I am referring to looking up a thread/post.
Many of your calls require me to give the slug as part of the Thread search. In fact almost all of them require thread_id, forum_id, category_id as well as slug. So the model (technically) allows for the same Thread to be used in multiple categories across multiple forums with different posts depending on which category or forum you are currently in - I think.
Most of the time I just have a thread id so I have to circumvent your calls and go under the covers with a Thread::find("id")
myself otherwise I have to do extra look ups find the extra bits I need in order to look up a record.
More seriously though why do I need the slug to lookup a thread. The slug is dynamically generated and subject to change.
If I remember correctly the general idea behind this was to prevent potential mistakes when referring to a thread or post. Right now I don't think it's necessary so this for sure needs to change.
I'm trying to integrate the Podium software into my site. For example showing a couple of posts in a thread so I can display them as a preview on a different page or automatically creating a new thread when certain actions happen in my application.
I want to avoid reading through all your code, not forever! but to a certain extent I shouldn't have to. I am trying to treat your application as a forum manager that I can talk to and control without needing to know too much about the guts of how you have done it.
I'm really missing some kind of PodiumService class that I can use to get at the functions I need to do. My preliminary reading of the code says that it's all there but its spread out across all the classes. So something simple that can draw all that functionality together would be great!