Comments 1 - 6 of 6 Search these comments
curl 'https://patrick.net/?key='$pkey \
-H 'Accept: application/json' \
-H "Cookie: patricknetuser=$puser; patricknetpass=$ppass"
curl 'https://patrick.net/comments?a=Hircus&start=2720&key='$pkey \
-H 'Accept: application/json' \
-H "Cookie: patricknetuser=$puser; patricknetpass=$ppass"
curl -i 'https://patrick.net/user/Hircus?page=1&order=new&key='$pkey \
-H 'Accept: application/json' \
-H "Cookie: patricknetuser=$puser; patricknetpass=$ppass"
First, you must create an account via the browser and email loop. There is no api for that. If you already have an account, you're all set there.
Then, you get your user id, hashed password, and key like this:
The response will be like this:
Then most of the functions on the site will return json instead of html if you hit them with an "Accept: application/json" header like this:
Please let me know if you might use this api and I'll document it better and fill in more of the routes. I have api-ified most of the routes, the most notable exception being image upload, which does not work via the api yet.
If you're familiar with the browser dev tools, you can look at the network requests and just add 'Accept: application/json' and most of them should work as an api.
Please regard the api so far as UNSTABLE and don't build anything too important on it. Any part could change at any time.