It was bothering me that there is a Python tutorial that shows how to post to Mastodon with only the Requests module.
So I figured out how to do the same thing in Ruby using the HTTP gem.
First get your access token (use the web page below to figure that out)
https://dev.to/bitsrfr/getting-started-with-the-mastodon-api-41jj
I got some hints from this HTTP gem documentation
The reason I'm doing this is that my app needs basic functionality in terms of posting to Twitter and Mastodon, and the gems are a) overkill for that and b) the mastodon-api gem doesn't work with Ruby >= 2.7.
This will make my app MUCH simpler.
I ran into this problem yesterday (mastodon-api gem vs Ruby 2.7+) and it’s been fixed on the github HEAD, so it’ll work if you install from there.
(Now onward to getting gd2-ffij working on Raspbian.)
@suetanvil I had some success using the http gem. What I'm missing is a way to detect failure to post. I'll be working on that
And this one:
https://github.com/httprb/http/wiki/Passing-Parameters