TIL the @trakt API does not fully conform with RFC 8628, which expects the device token request to have the field "device_code", but the trakt.tv API expects a field named "code".
This is as far as I can tell the one and only reason I can't take the off-the-shelf #httr2 OAuth implementation and probably will have to kajigger the token stuff manually, which I hate 🙃
(Or I just keep my old #httr version which is "good enough" I guess)
#RStats
I thought I'd give #httr2 another go, but I still have no idea how to make an authenticated request to the trakt.tv API.
I still think it can't be *that* hard and I don't think the trakt API is *that* weird, but I have no idea whether it's just me not knowing what I'm doing or #httr2 maybe making assumptions that don't hold for this particular API or... Idunno. I guess I'll just leave my old-but-working #httr code in and call it good enough ¯\_(ツ)_/¯
I wasted so much time on trying to figure out using the #OCLC #API for a Shiny app because of poor documentation in both #httr and the API.
I mean, I did learn stuff in the process, and I knew close to nothing before starting, and I was over the moon once I got an access token back, but no one needs to spend so much time just trying things are random until it works.
Documentation is so important! Document everything!!
Looking forward to testing #httr2, it should really improve things. #RStats
#rstats #httr2 #httr #api #OCLC