ossapi
ossapi copied to clipboard
Add remaining forum topic/post endpoints
Again, check the latest commit for changes relevant to forums: https://github.com/circleguard/ossapi/commit/64d75ead8dfeeb28d57223b48833685a423e89ad
- Added create-topic endpoint
- Added reply-topic endpoint
- Added edit-topic endpoint
- Added edit-post endpoint
Creating a topic with a poll is giving issues - notably because poll options are separated by new lines, but this does not seem to be working correctly.
I created an account on dev.ppy.sh to prevent the live forums from being spammed.
Example topic/post edits:
- https://dev.ppy.sh/community/forums/topics/92?n=1
- https://dev.ppy.sh/community/forums/topics/156?n=1
There are a lot of limitations on forum posts, and I'm not sure how best to document them within ossapi; e.g. not being able to reply to one's own forum topic - an error is thrown telling you to simply edit the post instead, for example.
will get to this soon but need to find the energy to set up an account on the dev server first
alright, maybe "soon" was ambitious...
@roansong can you resolve conflicts? preferring my _request
over your _call
method to perform a generic web request, I think mine is cleaner.
Until #36 is resolved, I think I'm going to forgo tests for anything that requires the creation of a new OssapiV2
instance. We can probably get around that temporarily here by just creating the original test's api
object with all of the available scopes instead of just "public", so no test method is constrained by the scope.
Going to take over this pr to also include a testing revamp. I've resolved merge conflicts and will set up a dev account for myself in the coming days so I can properly test the added methods.
You beauty - I was about to close this PR because I haven't touched it in so long
Have cleaned this up and tested everything against my own dev account. Let's get this in and finally check some forum endpoints off the list.
Thanks for the base PR @roansong!