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="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>
|
/// <param name="paginator">Optional. If not supplied, DefaultPaginator will be used</param>
|
||||||
/// <typeparam name="T">The Paging-Type</typeparam>
|
/// <typeparam name="T">The Paging-Type</typeparam>
|
||||||
|
/// <typeparam name="TNext">The Response-Type</typeparam>
|
||||||
/// <returns>A list containing all fetched pages</returns>
|
/// <returns>A list containing all fetched pages</returns>
|
||||||
Task<IList<T>> PaginateAll<T, TNext>(
|
Task<IList<T>> PaginateAll<T, TNext>(
|
||||||
Paging<T, TNext> firstPage,
|
Paging<T, TNext> firstPage,
|
||||||
|
@ -92,10 +92,11 @@ namespace SpotifyAPI.Web
|
|||||||
{
|
{
|
||||||
new KeyValuePair<string, string>("refresh_token", request.RefreshToken)
|
new KeyValuePair<string, string>("refresh_token", request.RefreshToken)
|
||||||
};
|
};
|
||||||
|
#pragma warning disable CA2000
|
||||||
return apiConnector.Post<AuthorizationCodeRefreshResponse>(
|
return apiConnector.Post<AuthorizationCodeRefreshResponse>(
|
||||||
request.RefreshUri, null, new FormUrlEncodedContent(form)
|
request.RefreshUri, null, new FormUrlEncodedContent(form)
|
||||||
);
|
);
|
||||||
|
#pragma warning restore CA2000
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Task<AuthorizationCodeTokenResponse> RequestToken(
|
public static Task<AuthorizationCodeTokenResponse> RequestToken(
|
||||||
@ -110,9 +111,11 @@ namespace SpotifyAPI.Web
|
|||||||
new KeyValuePair<string, string>("code", request.Code)
|
new KeyValuePair<string, string>("code", request.Code)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma warning disable CA2000
|
||||||
return apiConnector.Post<AuthorizationCodeTokenResponse>(
|
return apiConnector.Post<AuthorizationCodeTokenResponse>(
|
||||||
request.TokenUri, null, new FormUrlEncodedContent(form)
|
request.TokenUri, null, new FormUrlEncodedContent(form)
|
||||||
);
|
);
|
||||||
|
#pragma warning restore CA2000
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Task<CredentialsTokenResponse> RequestToken(
|
public static Task<CredentialsTokenResponse> RequestToken(
|
||||||
@ -170,7 +173,9 @@ namespace SpotifyAPI.Web
|
|||||||
string clientSecret)
|
string clientSecret)
|
||||||
{
|
{
|
||||||
var headers = BuildAuthHeader(clientId, clientSecret);
|
var headers = BuildAuthHeader(clientId, clientSecret);
|
||||||
|
#pragma warning disable CA2000
|
||||||
return apiConnector.Post<T>(SpotifyUrls.OAuthToken, null, new FormUrlEncodedContent(form), headers);
|
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)
|
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="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>
|
/// <param name="paginator">Optional. If not supplied, DefaultPaginator will be used</param>
|
||||||
/// <typeparam name="T">The Paging-Type</typeparam>
|
/// <typeparam name="T">The Paging-Type</typeparam>
|
||||||
|
/// <typeparam name="TNext">The Response-Type</typeparam>
|
||||||
/// <returns>A list containing all fetched pages</returns>
|
/// <returns>A list containing all fetched pages</returns>
|
||||||
public Task<IList<T>> PaginateAll<T, TNext>(
|
public Task<IList<T>> PaginateAll<T, TNext>(
|
||||||
Paging<T, TNext> firstPage,
|
Paging<T, TNext> firstPage,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ -n "$APPVEYOR_REPO_TAG" ]; then
|
if [ "$APPVEYOR_REPO_TAG" = "true" ]; then
|
||||||
echo "Publishing..."
|
echo "Publishing..."
|
||||||
|
|
||||||
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
|
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