mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-23 14:46:26 +00:00
Fixed warnings and polished publish script
This commit is contained in:
parent
14dd959354
commit
fb5b81b747
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user