So some quick background: I'm trying to teach myself to code, but right now I'm really a beginner. I'm trying to help out my younger brother's school with setting up a moodle-powered online course system featuring videos of full classes, and I've run into a snag with the school's preferred video host.
Basically, here's my problem: The guys hosting the videos don't want to allow people to directly link to the videos, instead they built an API they want us to use that takes a POST request, then outputs a new URL, which expires after one use.
I've figured out how to use the API using POSTman or in the terminal
#for example:
# curl -F
# api_key='the api key they gave us' -F
# email='a user's email' -F
# destination='a subdirectory'
# 'the target URL'
What I can't figure out, is how to automate this process so that teachers can input the link to their video on our host's site ('somesite.com/videos/teacherx/') directly in the moodle class editor (if possible), so that whenever a student is taking the class they can click a link that runs the script, does the POST request, and redirects them to the new temporary URL.
In case you can't tell, I have no idea what I'm doing.
Thanks in advance