Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull Followed Hastags Using Mastodon API #26

Open
karimlevallois opened this issue Dec 23, 2022 · 6 comments
Open

Pull Followed Hastags Using Mastodon API #26

karimlevallois opened this issue Dec 23, 2022 · 6 comments

Comments

@karimlevallois
Copy link

If running GMFActionDemo from GitHub rather than on the same server the instance is held means that we cannot pull in the followed hashtags from the Mastodon database. This leaves us with having to manage the hashtag list in the GitHub config file when ideally we would like to pull these automatically from a Mastodon API.

I have found an API that could do this per user and could be integrated into the project.

https://docs.joinmastodon.org/methods/followed_tags/

@cpwood
Copy link
Contributor

cpwood commented Jan 30, 2023

@g3rv4 is this something you would be willing to accept a PR for? I'm facing the same issue; I don't have access to my host's database (masto.host) but do have API access.

If implemented, would you want to retain the current database means of doing it? Or should the API approach replace it?

@cpwood
Copy link
Contributor

cpwood commented Jan 30, 2023

NB: think the connection string would still be required for pinned hashtags.

@g3rv4
Copy link
Owner

g3rv4 commented Jan 30, 2023

I would love a PR for it! I'd still retain the database path, because that lets me pull hashtags for all the users on my instance without them having to create an api key.

@cpwood
Copy link
Contributor

cpwood commented Jan 30, 2023

Great! I think I've managed to put something together this evening (i.e. "works on my computer!"). Will give it a bit more testing and come back to you with a PR soon.

@g3rv4
Copy link
Owner

g3rv4 commented Jan 30, 2023

feel free to open it as a draft pr so that we can collaborate on it early :)

@cpwood
Copy link
Contributor

cpwood commented Feb 4, 2023

Draft PR with you for review. I've tested the Tags: [] approach as well as the new API approach; I don't have a database to test against, however, so can't confirm there are no regression issues in that particular area. It should be fine, though (famous last words).

I did go a little bit beyond the specific requirement expressed in this ticket though; I struggled a bit getting my head around the configuration approach within the C# so did a bit of a refactor. Realise this wasn't requested and was a bit presumptuous, though, so I would understand if you wanted to reject it on that basis.

Looking forward to your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants