Skip to content

Commit fb5b81b

Browse files
committed
Fixed warnings and polished publish script
1 parent 14dd959 commit fb5b81b

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎SpotifyAPI.Web/Clients/Interfaces/ISpotifyClient.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public interface ISpotifyClient
142142
/// <param name="mapper">A function which maps response objects to the next paging object</param>
143143
/// <param name="paginator">Optional. If not supplied, DefaultPaginator will be used</param>
144144
/// <typeparam name="T">The Paging-Type</typeparam>
145+
/// <typeparam name="TNext">The Response-Type</typeparam>
145146
/// <returns>A list containing all fetched pages</returns>
146147
Task<IList<T>> PaginateAll<T, TNext>(
147148
Paging<T, TNext> firstPage,

‎SpotifyAPI.Web/Clients/OAuthClient.cs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,11 @@ public static Task<AuthorizationCodeRefreshResponse> RequestToken(
9292
{
9393
new KeyValuePair<string, string>("refresh_token", request.RefreshToken)
9494
};
95-
95+
#pragma warning disable CA2000
9696
return apiConnector.Post<AuthorizationCodeRefreshResponse>(
9797
request.RefreshUri, null, new FormUrlEncodedContent(form)
9898
);
99+
#pragma warning restore CA2000
99100
}
100101

101102
public static Task<AuthorizationCodeTokenResponse> RequestToken(
@@ -110,9 +111,11 @@ public static Task<AuthorizationCodeTokenResponse> RequestToken(
110111
new KeyValuePair<string, string>("code", request.Code)
111112
};
112113

114+
#pragma warning disable CA2000
113115
return apiConnector.Post<AuthorizationCodeTokenResponse>(
114116
request.TokenUri, null, new FormUrlEncodedContent(form)
115117
);
118+
#pragma warning restore CA2000
116119
}
117120

118121
public static Task<CredentialsTokenResponse> RequestToken(
@@ -170,7 +173,9 @@ private static Task<T> SendOAuthRequest<T>(
170173
string clientSecret)
171174
{
172175
var headers = BuildAuthHeader(clientId, clientSecret);
176+
#pragma warning disable CA2000
173177
return apiConnector.Post<T>(SpotifyUrls.OAuthToken, null, new FormUrlEncodedContent(form), headers);
178+
#pragma warning restore CA2000
174179
}
175180

176181
private static Dictionary<string, string> BuildAuthHeader(string clientId, string clientSecret)

‎SpotifyAPI.Web/Clients/SpotifyClient.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public async Task<IList<T>> PaginateAll<T>(Task<Paging<T>> firstPageTask, IPagin
142142
/// <param name="mapper">A function which maps response objects to the next paging object</param>
143143
/// <param name="paginator">Optional. If not supplied, DefaultPaginator will be used</param>
144144
/// <typeparam name="T">The Paging-Type</typeparam>
145+
/// <typeparam name="TNext">The Response-Type</typeparam>
145146
/// <returns>A list containing all fetched pages</returns>
146147
public Task<IList<T>> PaginateAll<T, TNext>(
147148
Paging<T, TNext> firstPage,

‎publish.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
if [ -n "$APPVEYOR_REPO_TAG" ]; then
5+
if [ "$APPVEYOR_REPO_TAG" = "true" ]; then
66
echo "Publishing..."
77

88
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe

0 commit comments

Comments
 (0)