Skip to content

Commit ae19192

Browse files
Add possible http responses in readme
1 parent a0d5807 commit ae19192

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
With these two php files you are able to create your own Youtube to MP3 API with ability to search also.
44

5-
# Available HTTP requests
5+
# Possible HTTP requests
66

77
* `GET - convert.php`
88

@@ -18,12 +18,35 @@ With these two php files you are able to create your own Youtube to MP3 API with
1818
| q | Yes | string | The query term to search for video's |
1919
| max_results | No | integer | The max results of search results u want to get |
2020

21+
# Possible HTTP responses
22+
23+
* `JSON - convert.php`
24+
25+
| Parameter |Type | Description |
26+
|-----------|-------------|-------------|
27+
| error | boolean | Whether or not an error occured |
28+
| message | string | A simple message or the error message |
29+
30+
31+
| Parameter |Type | Description |
32+
|-----------|-------------|-------------|
33+
| error | boolean | false |
34+
| title | string | The title of the video that got converted |
35+
| duration | integer | The duration of the video that got converted (in seconds) |
36+
| file | string | The streamlink or downloadable mp3 file |
37+
38+
* `JSON - search.php`
39+
40+
| Parameter |Type | Description |
41+
|-----------|-------------|-------------|
42+
| error | boolean | Whether or not an error occured |
43+
| message | string | An error message |
44+
| results | array | An array with MAX_RESULTS entries. Each entry has: the video id, the channel name of the video, the video title and the full url to the video |
2145

2246
# Software requirements
2347

2448
* [youtube-dl](https://rg3.github.io/youtube-dl/)
25-
* [ffmpeg](https://www.ffmpeg.org/)
26-
* [libmp3lame](http://lame.sourceforge.net/)
49+
* [ffmpeg](https://www.ffmpeg.org/) (+ [libmp3lame](http://lame.sourceforge.net/))
2750

2851
# General installation
2952

0 commit comments

Comments
 (0)