Eisblume
12/06/22 09:49PM
Api Help, pls?
so I created a little script to show me new posts in my discord, I know the (is it official idk) Discord server has a bot for that but this bot links to the file of the picture and not the post which always annoyed me, my script works fine until I encounter post which needs to be approved, as far as I can tell the API treats post which needs to approved like they don't exist is there any way to change this? or will my little bot be stuck until the post is approved?
Detour
12/06/22 10:19PM
Where are you getting the ID's for unapproved posts from? The API doesn't return them anywhere as far as I can tell.
Eisblume
12/06/22 10:30PM
oh I am just increasing the id number every time I got a post successfully, but id:158691 is unapproved so my script is stuck there
Detour
12/06/22 10:41PM
Yeah... maybe don't do that.

Instead just run an empty search instead and grab any post ID's you haven't seen before, that way you won't get stuck with unapproved/deleted posts.

page=dapi&s=post&q=index&json=1 will work for that.
Eisblume
12/06/22 10:52PM
yeah, that's smart, unapproved post will eventually show up, thx for that
1


Reply | Forum Index