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

[FR] API to interact with the service #435

Open
lyz-code opened this issue Oct 25, 2024 · 4 comments
Open

[FR] API to interact with the service #435

lyz-code opened this issue Oct 25, 2024 · 4 comments
Assignees

Comments

@lyz-code
Copy link

Is your feature request related to a problem? Please describe.
I'm using another solution to sync my YouTube channels right now and I'm thinking on migrating to pinchflat. However I'd rather not migrate my +400 channels by hand.

Describe the solution you'd like
Have an API to interact with the platform to add new feeds

Describe alternatives you've considered
Load it from a config file, but it's already addressed here

Additional context
Thanks for creating and maintaining the program!

@Robsmon
Copy link

Robsmon commented Oct 25, 2024

I mean with an existing datamodel and all the other means to process this things exposing some endpoint like api/v1/ that accepts the standard CRUD operations for Media Profiles and Sources can not be that hard. Is there a framework for elixir focused on that? I would be willing to contribute some stuff but elixir is new for me and time is rare as usal.

@kieraneglin
Copy link
Owner

Hey there! Thanks for the report (:

I've thought about this a few times but I'd have to think about the best way to handle this. All the existing endpoints are in a position to be decent API endpoints, but I'd need to see how I can avoid duplicating a ton of logic. I can't promise a timeline on this, but I'll keep this issue open until I come to a decision 🤙

@PaulEins
Copy link

PaulEins commented Nov 2, 2024

Many thanks. i use the api key. Import from api key will be nice. i wait for this importend fighure. =)

@mattisaoldgit
Copy link

mattisaoldgit commented Nov 24, 2024

Just trying to be helpful.....I had a big Takeout CSV I wanted to stick into the amazing project Pinchflat.

I looked at the sources, files and structure and the amount of json scared me, so I decided to leave them alone :)

So this is really not what you should do, but I didn't want copy'n'paste 240 lines. I also only suggest you do this on your own hosted hardware and you may want to chunk things down, so the "Googly One of the Tubes" does not get upset with you.

I used some python along with playwright, to cut a long story short, it reads the CSV, then loads chrome up, inputs the fields, clicks save and waits for goodness to be reported and then reloads the page and starts over until the end of the CSV.

I have never done it before and took me about 90mins to get right with AI help (I am too lazy/old to start from scratch).

If I don't get yelled at too much for suggesting this I could stick the code somewhere if it helps, but if you know a bit of Python, it is really simple (and if you don't my code won't help).

EDIT: Just had a thought, I am guessing you could figure out what the URL the page sends to PF and use curl to be better? That's basically a cheating API :) Don't have time for a few days to check that and I am sure better brains know already :)

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

No branches or pull requests

5 participants