daemionfox / patreon-feed

Patreon RSS library based on Patreon's API
41 stars 6 forks source link

Personal Patreon Feed #1

Closed criztovyl closed 6 years ago

criztovyl commented 6 years ago

I started to tinker around to also allow converting the personal Patreon feed into an RSS Feed.

Obviously you will need to login first, which is a POST to https://patreon.com/api/login (jo creates JSON):

$ curl -d "$(jo \
    data="$(jo \
        type=user \
        attributes="$(jo \
            email=$PATREON_USER \
            password="$PATREON_PASS" \
        )" \
    )" \
)"  \
-H "Content-Type: application/vnd.api+json" \
https://patreon.com/api/login?json-api-version=1.0

While I could not test it yet (Patreon rate-limited my tinkering ^^), it seems like you only need to change the filter https://github.com/daemionfox/patreon-feed/blob/e93bbe7de9454e5aa293a0b7bc87d93b86b37c45/src/Patreon/PatreonRSS.php#L63-L68 to

$filter = array(
    'is_following' => true
);

compared to https://www.patreon.com/api/stream?fields[post]=post_type,title&page[cursor]=null&filter[is_following]=true&json-api-use-default-includes=false&json-api-version=1.0, which I discovered using my brower's network console.

Because I have nothing for a PR yet I opened this issue. I will open a PR as soon as I have something. :)

daemionfox commented 6 years ago

Excellent! And boo on them for rate limiting