1 parent a66d70d commit 9d9acaeCopy full SHA for 9d9acae
1 file changed
README.md
@@ -41,3 +41,36 @@ Download to a specific directory:
41
```bash
42
scdl https://soundcloud.com/cowboyclicker/stay --output ~/Music/
43
```
44
+
45
+## Library Usage
46
47
+### Installation
48
49
+```bash
50
+go get github.com/hellsontime/scdl
51
+```
52
53
+### Simple Usage
54
55
+```go
56
+import "github.com/hellsontime/scdl"
57
58
+// ...
59
60
+client, err := scdl.NewClient()
61
+if err != nil {
62
+ return err
63
+}
64
65
+// Fetch track metadata
66
+track, err := client.GetTrack("https://soundcloud.com/cowboyclicker/stay")
67
68
69
70
71
+// Download the track to the current directory
72
+path, err := client.Download(track, ".", nil) // progress callback is optional
73
74
75
76
0 commit comments