2
2
using System ;
3
3
using System . Collections . Generic ;
4
4
using System . Threading . Tasks ;
5
+ using SpotifyAPI . Web . Models ;
5
6
6
7
namespace SpotifyAPI . Web
7
8
{
@@ -14,44 +15,44 @@ public interface IClient : IDisposable
14
15
/// </summary>
15
16
/// <param name="url">An URL</param>
16
17
/// <returns></returns>
17
- string Download ( string url ) ;
18
+ Tuple < ResponseInfo , string > Download ( string url ) ;
18
19
19
20
/// <summary>
20
21
/// Downloads data async from an URL and returns it
21
22
/// </summary>
22
23
/// <param name="url"></param>
23
24
/// <returns></returns>
24
- Task < string > DownloadAsync ( string url ) ;
25
+ Task < Tuple < ResponseInfo , string > > DownloadAsync ( string url ) ;
25
26
26
27
/// <summary>
27
28
/// Downloads data from an URL and returns it
28
29
/// </summary>
29
30
/// <param name="url">An URL</param>
30
31
/// <returns></returns>
31
- byte [ ] DownloadRaw ( string url ) ;
32
+ Tuple < ResponseInfo , byte [ ] > DownloadRaw ( string url ) ;
32
33
33
34
/// <summary>
34
35
/// Downloads data async from an URL and returns it
35
36
/// </summary>
36
37
/// <param name="url"></param>
37
38
/// <returns></returns>
38
- Task < byte [ ] > DownloadRawAsync ( string url ) ;
39
+ Task < Tuple < ResponseInfo , byte [ ] > > DownloadRawAsync ( string url ) ;
39
40
40
41
/// <summary>
41
42
/// Downloads data from an URL and converts it to an object
42
43
/// </summary>
43
44
/// <typeparam name="T">The Type which the object gets converted to</typeparam>
44
45
/// <param name="url">An URL</param>
45
46
/// <returns></returns>
46
- T DownloadJson < T > ( string url ) ;
47
+ Tuple < ResponseInfo , T > DownloadJson < T > ( string url ) ;
47
48
48
49
/// <summary>
49
50
/// Downloads data async from an URL and converts it to an object
50
51
/// </summary>
51
52
/// <typeparam name="T">The Type which the object gets converted to</typeparam>
52
53
/// <param name="url">An URL</param>
53
54
/// <returns></returns>
54
- Task < T > DownloadJsonAsync < T > ( string url ) ;
55
+ Task < Tuple < ResponseInfo , T > > DownloadJsonAsync < T > ( string url ) ;
55
56
56
57
/// <summary>
57
58
/// Uploads data from an URL and returns the response
@@ -60,7 +61,7 @@ public interface IClient : IDisposable
60
61
/// <param name="body">The Body-Data (most likely a JSON String)</param>
61
62
/// <param name="method">The Upload-method (POST,DELETE,PUT)</param>
62
63
/// <returns></returns>
63
- string Upload ( string url , string body , string method ) ;
64
+ Tuple < ResponseInfo , string > Upload ( string url , string body , string method ) ;
64
65
65
66
/// <summary>
66
67
/// Uploads data async from an URL and returns the response
@@ -69,7 +70,7 @@ public interface IClient : IDisposable
69
70
/// <param name="body">The Body-Data (most likely a JSON String)</param>
70
71
/// <param name="method">The Upload-method (POST,DELETE,PUT)</param>
71
72
/// <returns></returns>
72
- Task < string > UploadAsync ( string url , string body , string method ) ;
73
+ Task < Tuple < ResponseInfo , string > > UploadAsync ( string url , string body , string method ) ;
73
74
74
75
/// <summary>
75
76
/// Uploads data from an URL and returns the response
@@ -78,7 +79,7 @@ public interface IClient : IDisposable
78
79
/// <param name="body">The Body-Data (most likely a JSON String)</param>
79
80
/// <param name="method">The Upload-method (POST,DELETE,PUT)</param>
80
81
/// <returns></returns>
81
- byte [ ] UploadRaw ( string url , string body , string method ) ;
82
+ Tuple < ResponseInfo , byte [ ] > UploadRaw ( string url , string body , string method ) ;
82
83
83
84
/// <summary>
84
85
/// Uploads data async from an URL and returns the response
@@ -87,7 +88,7 @@ public interface IClient : IDisposable
87
88
/// <param name="body">The Body-Data (most likely a JSON String)</param>
88
89
/// <param name="method">The Upload-method (POST,DELETE,PUT)</param>
89
90
/// <returns></returns>
90
- Task < byte [ ] > UploadRawAsync ( string url , string body , string method ) ;
91
+ Task < Tuple < ResponseInfo , byte [ ] > > UploadRawAsync ( string url , string body , string method ) ;
91
92
92
93
/// <summary>
93
94
/// Uploads data from an URL and converts the response to an object
@@ -97,7 +98,7 @@ public interface IClient : IDisposable
97
98
/// <param name="body">The Body-Data (most likely a JSON String)</param>
98
99
/// <param name="method">The Upload-method (POST,DELETE,PUT)</param>
99
100
/// <returns></returns>
100
- T UploadJson < T > ( string url , string body , string method ) ;
101
+ Tuple < ResponseInfo , T > UploadJson < T > ( string url , string body , string method ) ;
101
102
102
103
/// <summary>
103
104
/// Uploads data async from an URL and converts the response to an object
@@ -107,7 +108,7 @@ public interface IClient : IDisposable
107
108
/// <param name="body">The Body-Data (most likely a JSON String)</param>
108
109
/// <param name="method">The Upload-method (POST,DELETE,PUT)</param>
109
110
/// <returns></returns>
110
- Task < T > UploadJsonAsync < T > ( string url , string body , string method ) ;
111
+ Task < Tuple < ResponseInfo , T > > UploadJsonAsync < T > ( string url , string body , string method ) ;
111
112
112
113
/// <summary>
113
114
/// Sets a specific Header
0 commit comments