Comments (3)
Hi!
The API is implemented, you can view examples here, and all available routes at the official docs.
You almost got it right. Basically, the /api/tomp4 route is a POST request, so you have to do 2 things:
- Send the request using curl or postman, you can't send it through a browser
- Include the video URL as a body parameter, not a query parameter
This might seem confusing, but the API key must be kept as a query parameter (so you did that part right). The reason for this is not all requests have a body (like GET requests), so it rides along with the request URL instead for consistency.
Here's an example of what that would look like:
curl -XPOST -H "Content-type: application/json" -d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}' 'http://192.168.0.201:17442/api/tomp4?apiKey=692-xxx59df57b'
The "url" parameter is moved to the body, while the apiKey stays as a query param. If you have curl installed (most systems do), you can type this into your command line and it should work.
from youtubedl-material.
Thank you!
I am so used to API web requests, I thought that was how it was meant to work. I am off to learn about how to invoke a curl request in my php/javascript code.
Thanks again.
Love the app!
from youtubedl-material.
Glad you like it! :) Happy to help, don't hesitate to open up any more issues if you come across a problem/suggestion.
Apparently PHP does have a curl library, though JS and PHP can send POST requests natively as well (i.e. w/o a library). Anyways, I'll close out this issue, but if you run into any problems sending the API requests you can comment here and I'll be happy to help.
from youtubedl-material.
Related Issues (20)
- Gluetun Docker Support
- "Subscription: getting list of videos" takes long time HOT 3
- [FEATURE] Is it possible to override the download path for subscription
- [BUG] Container will not be able to run properly non-privileged HOT 1
- [FEATURE] Set default max quality in config
- How to reset Users account ?
- [BUG] Content does not refresh when switching between subs using side menu
- [BUG] Scheduling a task hangs application, won't start fully HOT 1
- [FEATURE] Make mounted folders paths configurable using environment variable
- [BUG]
- [BUG] Searching goes on forever HOT 2
- YoutubeDl material doesnt download a subscription. HOT 3
- [BUG] pm2 not declared as dependency
- [BUG] Skipping player responses from android clients HOT 1
- [BUG] Can't add subscriptions. It just loads forever and never adds the channel.
- [BUG] container won't start HOT 8
- [BUG] Video file name too long error
- [BUG] Thumbnails don't load if their path contains a "%" character HOT 1
- I'm looking for the best way to set the codecs for downloads
- [BUG] Cant delete individual notifications
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtubedl-material.