You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
With these two php files you are able to create your own Youtube to MP3 API with ability to search also.
4
4
5
-
# Available HTTP requests
5
+
# Possible HTTP requests
6
6
7
7
*`GET - convert.php`
8
8
@@ -18,12 +18,35 @@ With these two php files you are able to create your own Youtube to MP3 API with
18
18
| q | Yes | string | The query term to search for video's |
19
19
| max_results | No | integer | The max results of search results u want to get |
20
20
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 |
0 commit comments