Fixed warnings and polished publish script

This commit is contained in:
Jonas Dellinger 2020-06-04 20:56:47 +02:00
parent 14dd959354
commit fb5b81b747
4 changed files with 9 additions and 2 deletions

View File

@ -142,6 +142,7 @@ namespace SpotifyAPI.Web
/// <param name="mapper">A function which maps response objects to the next paging object</param>
/// <param name="paginator">Optional. If not supplied, DefaultPaginator will be used</param>
/// <typeparam name="T">The Paging-Type</typeparam>
/// <typeparam name="TNext">The Response-Type</typeparam>
/// <returns>A list containing all fetched pages</returns>
Task<IList<T>> PaginateAll<T, TNext>(
Paging<T, TNext> firstPage,

View File

@ -92,10 +92,11 @@ namespace SpotifyAPI.Web
{
new KeyValuePair<string, string>("refresh_token", request.RefreshToken)
};
#pragma warning disable CA2000
return apiConnector.Post<AuthorizationCodeRefreshResponse>(
request.RefreshUri, null, new FormUrlEncodedContent(form)
);
#pragma warning restore CA2000
}
public static Task<AuthorizationCodeTokenResponse> RequestToken(
@ -110,9 +111,11 @@ namespace SpotifyAPI.Web
new KeyValuePair<string, string>("code", request.Code)
};
#pragma warning disable CA2000
return apiConnector.Post<AuthorizationCodeTokenResponse>(
request.TokenUri, null, new FormUrlEncodedContent(form)
);
#pragma warning restore CA2000
}
public static Task<CredentialsTokenResponse> RequestToken(
@ -170,7 +173,9 @@ namespace SpotifyAPI.Web
string clientSecret)
{
var headers = BuildAuthHeader(clientId, clientSecret);
#pragma warning disable CA2000
return apiConnector.Post<T>(SpotifyUrls.OAuthToken, null, new FormUrlEncodedContent(form), headers);
#pragma warning restore CA2000
}
private static Dictionary<string, string> BuildAuthHeader(string clientId, string clientSecret)

View File

@ -142,6 +142,7 @@ namespace SpotifyAPI.Web
/// <param name="mapper">A function which maps response objects to the next paging object</param>
/// <param name="paginator">Optional. If not supplied, DefaultPaginator will be used</param>
/// <typeparam name="T">The Paging-Type</typeparam>
/// <typeparam name="TNext">The Response-Type</typeparam>
/// <returns>A list containing all fetched pages</returns>
public Task<IList<T>> PaginateAll<T, TNext>(
Paging<T, TNext> firstPage,

View File

@ -2,7 +2,7 @@
set -e
if [ -n "$APPVEYOR_REPO_TAG" ]; then
if [ "$APPVEYOR_REPO_TAG" = "true" ]; then
echo "Publishing..."
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe