@@ -32,146 +32,114 @@ amuseProvider.setUserToken("USER_TOKEN")
3232amuseProvider.setUserCountryCode (" USER_COUNTRY_CODE" )
3333```
3434
35- ### Retrieve multiple Albums from Apple Music catalog by ids.
35+ ### Retrieve Apple Music catalog resources by ids.
3636
37- ``` swift
38- amuseProvider.catalog (.albums , ids : [" 123" , " 456" , " 789" ])
39- .sink { _ in
40- } receiveValue : { response in
41- print (response.data )
42- }
43- ```
44-
45- ### Retrieve multiple Artists from Apple Music catalog by ids.
37+ Supported values are: ` albums, artists, musicVideos, playlists, songs ` .
4638
4739``` swift
48- amuseProvider.catalog (.artists , ids : [" 123" , " 456" , " 789" ])
49- .sink { _ in
50- } receiveValue : { response in
51- print (response.data )
52- }
40+ let response = try await amuseProvider.catalog (.albums , ids : [" 123" , " 456" , " 789" ])
41+ print (response.data )
5342```
5443
55- ### Retrieve multiple Music Videos from Apple Music catalog by ids.
56-
5744``` swift
58- amuseProvider.catalog (.musicVideos , ids : [" 123" , " 456" , " 789" ])
59- .sink { _ in
60- } receiveValue : { response in
61- print (response.data )
62- }
63- ```
64-
65- ### Retrieve multiple Playlists from Apple Music catalog by ids.
66-
67- ``` swift
68- amuseProvider.catalog (.playlists , ids : [" 123" , " 456" , " 789" ])
45+ amuseProvider.catalog (.albums , ids : [" 123" , " 456" , " 789" ])
6946 .sink { _ in
7047 } receiveValue : { response in
7148 print (response.data )
7249 }
7350```
7451
75- ### Retrieve multiple Songs from Apple Music catalog by ids .
52+ ### Search on Apple Music catalog.
7653
7754``` swift
78- amuseProvider.catalog (.songs , ids : [" 123" , " 456" , " 789" ])
79- .sink { _ in
80- } receiveValue : { response in
81- print (response.data )
82- }
55+ let response = try await amuseProvider.catalogSearch (searchTerm : " YOUR_QUERY_TEXT" )
56+ print (response.results ? .albums )
57+ print (response.results ? .artists )
58+ print (response.results ? .musicVideos )
59+ print (response.results ? .playlists )
60+ print (response.results ? .songs )
61+ print (response.results ? .stations )
8362```
8463
85- ### Search on Apple Music catalog.
86-
8764``` swift
8865amuseProvider.catalogSearch (searchTerm : " YOUR_QUERY_TEXT" )
8966 .sink { _ in
9067 } receiveValue : { response in
9168 // content will be found under results properties.
9269 print (response.results ? .albums )
9370 print (response.results ? .artists )
71+ print (response.results ? .musicVideos )
9472 print (response.results ? .playlists )
9573 print (response.results ? .songs )
74+ print (response.results ? .stations )
9675 }
9776```
9877
99- ### Search on Apple Music catalog for specific types.
78+ ### Search on Apple Music catalog for specific resources types.
10079
10180``` swift
102- amuseProvider.catalogSearch ([.playlists , .songs ], searchTerm : " YOUR_QUERY_TEXT" )
103- .sink { _ in
104- } receiveValue : { response in
105- print (response.results ? .playlists )
106- print (response.results ? .songs )
107- }
81+ let response = try await amuseProvider.catalogSearch ([.playlists , .songs ], searchTerm : " YOUR_QUERY_TEXT" )
82+ print (response.results ? .playlists )
83+ print (response.results ? .songs )
10884```
10985
110- ### Retrieve All User's Library Albums.
111-
11286``` swift
113- amuseProvider.library (. albums )
87+ amuseProvider.catalogSearch ([. playlists , . songs ], searchTerm : " YOUR_QUERY_TEXT " )
11488 .sink { _ in
11589 } receiveValue : { response in
116- print (response.data )
90+ print (response.results ? .playlists )
91+ print (response.results ? .songs )
11792 }
11893```
11994
120- ### Retrieve All User's Library Artists .
95+ ### Retrieve User Library resources .
12196
122- ``` swift
123- amuseProvider.library (.artists )
124- .sink { _ in
125- } receiveValue : { response in
126- print (response.data )
127- }
128- ```
129-
130- ### Retrieve All User Library Music Videos.
97+ Supported values are: ` albums, artists, musicVideos, playlists, songs ` .
13198
13299``` swift
133- amuseProvider.library (.musicVideos )
134- .sink { _ in
135- } receiveValue : { response in
136- print (response.data )
137- }
100+ let response = try await dataProvider.library (.albums )
101+ print (response.data )
138102```
139103
140- ### Retrieve All User's Library Playlists.
141-
142104``` swift
143- amuseProvider.library (.playlists )
105+ amuseProvider.library (.albums )
144106 .sink { _ in
145107 } receiveValue : { response in
146108 print (response.data )
147109 }
148110```
149111
150- ### Retrieve All User's Library Songs .
112+ ### Search on User Library.
151113
152114``` swift
153- amuseProvider.library (.songs )
154- .sink { _ in
155- } receiveValue : { response in
156- print (response.data )
157- }
115+ let response = try await amuseProvider.librarySearch (searchTerm : " YOUR_QUERY_TEXT" )
116+ print (response.results ? .albums )
117+ print (response.results ? .artists )
118+ print (response.results ? .musicVideos )
119+ print (response.results ? .playlists )
120+ print (response.results ? .songs )
158121```
159122
160- ### Search on User's Library.
161-
162123``` swift
163124amuseProvider.librarySearch (searchTerm : " YOUR_QUERY_TEXT" )
164125 .sink { _ in
165126 } receiveValue : { response in
166127 // content will be found under results properties.
167128 print (response.results ? .albums )
168129 print (response.results ? .artists )
130+ print (response.results ? .musicVideos )
169131 print (response.results ? .playlists )
170132 print (response.results ? .songs )
171133 }
172134```
173135
174- ### Search on User's Library for specific types.
136+ ### Search on User Library for specific resources types.
137+
138+ ``` swift
139+ let response = try await amuseProvider.librarySearch ([.playlists , .songs ], searchTerm : " YOUR_QUERY_TEXT" )
140+ print (response.results ? .playlists )
141+ print (response.results ? .songs )
142+ ```
175143
176144``` swift
177145amuseProvider.librarySearch ([.playlists , .songs ], searchTerm : " YOUR_QUERY_TEXT" )
0 commit comments