Added help text for endpoints.

This commit is contained in:
mmuffins 2018-05-27 22:41:10 +02:00
parent f7b26a4055
commit 89405d6bed
4 changed files with 48 additions and 1 deletions

View File

@ -9,21 +9,33 @@ using System.Threading.Tasks;
namespace SteamStorefrontAPI namespace SteamStorefrontAPI
{ {
/// <summary>
/// Endpoint returning details for an application in the steam store.</summary>
public static class AppDetails public static class AppDetails
{ {
private static HttpClient client = new HttpClient(); private static HttpClient client = new HttpClient();
private const string steamBaseUri = "http://store.steampowered.com/api/appdetails"; private const string steamBaseUri = "http://store.steampowered.com/api/appdetails";
/// Retrieves details for the specified application via an asynchronous operation.</summary>
/// <param name="AppId">Steam App ID.</param>
public static async Task<SteamApp> GetAsync(int AppId) public static async Task<SteamApp> GetAsync(int AppId)
{ {
return await GetAsync(AppId, "", ""); return await GetAsync(AppId, "", "");
} }
/// Retrieves details for the specified application via an asynchronous operation.</summary>
/// <param name="AppId">Steam App ID.</param>
/// <param name="CountryCode">Two letter country code to customise currency and date values.</param>
public static async Task<SteamApp> GetAsync(int AppId, string CountryCode) public static async Task<SteamApp> GetAsync(int AppId, string CountryCode)
{ {
return await GetAsync(AppId, CountryCode, ""); return await GetAsync(AppId, CountryCode, "");
} }
/// <summary>
/// Retrieves details for the specified application via an asynchronous operation.</summary>
/// <param name="AppId">Steam App ID.</param>
/// <param name="CountryCode">Two letter country code to customise currency and date values.</param>
/// <param name="Language">Full name of the language in english used for string localization e.g. title, description, release dates.</param>
public static async Task<SteamApp> GetAsync(int AppId, string CountryCode, string Language) public static async Task<SteamApp> GetAsync(int AppId, string CountryCode, string Language)
{ {
string steamUri = $"{steamBaseUri}?appids={AppId}"; string steamUri = $"{steamBaseUri}?appids={AppId}";

View File

@ -9,22 +9,32 @@ using System.Threading.Tasks;
namespace SteamStorefrontAPI namespace SteamStorefrontAPI
{ {
/// <summary>
/// Endpoint returning a list of featured items in the steam store.</summary>
public static class Featured public static class Featured
{ {
private static HttpClient client = new HttpClient(); private static HttpClient client = new HttpClient();
private const string steamBaseUri = "https://store.steampowered.com/api/featured"; private const string steamBaseUri = "https://store.steampowered.com/api/featured";
/// <summary>
/// Retrieves a list of featured items via an asynchronous operation.</summary>
public static async Task<FeaturedApps> GetAsync() public static async Task<FeaturedApps> GetAsync()
{ {
return await GetAsync(null, null); return await GetAsync(null, null);
} }
/// <summary>
/// Retrieves a list of featured items via an asynchronous operation.</summary>
/// <param name="CountryCode">Two letter country code to customise currency and date values.</param>
public static async Task<FeaturedApps> GetAsync(string CountryCode) public static async Task<FeaturedApps> GetAsync(string CountryCode)
{ {
return await GetAsync(CountryCode, null); return await GetAsync(CountryCode, null);
} }
/// <summary>
/// Retrieves a list of featured items via an asynchronous operation.</summary>
/// <param name="CountryCode">Two letter country code to customise currency and date values.</param>
/// <param name="Language">Full name of the language in english used for string localization e.g. name, description.</param>
public static async Task<FeaturedApps> GetAsync(string CountryCode, string Language) public static async Task<FeaturedApps> GetAsync(string CountryCode, string Language)
{ {
string steamUri = steamBaseUri; string steamUri = steamBaseUri;

View File

@ -9,21 +9,32 @@ using System.Threading.Tasks;
namespace SteamStorefrontAPI namespace SteamStorefrontAPI
{ {
/// <summary>
/// Endpoint returning a list of featured items, grouped by category, in the steam store.</summary>
public static class FeaturedCategories public static class FeaturedCategories
{ {
private static HttpClient client = new HttpClient(); private static HttpClient client = new HttpClient();
private const string steamBaseUri = "https://store.steampowered.com/api/featuredcategories"; private const string steamBaseUri = "https://store.steampowered.com/api/featuredcategories";
/// <summary>
/// Retrieves a list of featured items, grouped by category, via an asynchronous operation.</summary>
public static async Task<List<FeaturedCategory>> GetAsync() public static async Task<List<FeaturedCategory>> GetAsync()
{ {
return await GetAsync(null, null); return await GetAsync(null, null);
} }
/// <summary>
/// Retrieves a list of featured items, grouped by category, via an asynchronous operation.</summary>
/// <param name="CountryCode">Two letter country code to customise currency and date values.</param>
public static async Task<List<FeaturedCategory>> GetAsync(string CountryCode) public static async Task<List<FeaturedCategory>> GetAsync(string CountryCode)
{ {
return await GetAsync(CountryCode, null); return await GetAsync(CountryCode, null);
} }
/// <summary>
/// Retrieves a list of featured items, grouped by category, via an asynchronous operation.</summary>
/// <param name="CountryCode">Two letter country code to customise currency and date values.</param>
/// <param name="Language">Full name of the language in english used for string localization e.g. name, description.</param>
public static async Task<List<FeaturedCategory>> GetAsync(string CountryCode, string Language) public static async Task<List<FeaturedCategory>> GetAsync(string CountryCode, string Language)
{ {
string steamUri = steamBaseUri; string steamUri = steamBaseUri;

View File

@ -9,21 +9,35 @@ using System.Threading.Tasks;
namespace SteamStorefrontAPI namespace SteamStorefrontAPI
{ {
/// <summary>
/// Endpoint returning details for a package in the steam store.</summary>
public static class PackageDetails public static class PackageDetails
{ {
private static HttpClient client = new HttpClient(); private static HttpClient client = new HttpClient();
private const string steamBaseUri = "http://store.steampowered.com/api/packagedetails"; private const string steamBaseUri = "http://store.steampowered.com/api/packagedetails";
/// <summary>
/// Retrieves details for the specified package via an asynchronous operation.</summary>
/// <param name="PackageId">Steam package ID.</param>
public static async Task<PackageInfo> GetAsync(int PackageId) public static async Task<PackageInfo> GetAsync(int PackageId)
{ {
return await GetAsync(PackageId, null, null); return await GetAsync(PackageId, null, null);
} }
/// <summary>
/// Retrieves details for the specified package via an asynchronous operation.</summary>
/// <param name="PackageId">Steam package ID.</param>
/// <param name="CountryCode">Two letter country code to customise currency and date values.</param>
public static async Task<PackageInfo> GetAsync(int PackageId, string CountryCode) public static async Task<PackageInfo> GetAsync(int PackageId, string CountryCode)
{ {
return await GetAsync(PackageId, CountryCode, null); return await GetAsync(PackageId, CountryCode, null);
} }
/// <summary>
/// Retrieves details for the specified package via an asynchronous operation.</summary>
/// <param name="PackageId">Steam package ID.</param>
/// <param name="CountryCode">Two letter country code to customise currency and date values.</param>
/// <param name="Language">Full name of the language in english used for string localization e.g. title, description, release dates.</param>
public static async Task<PackageInfo> GetAsync(int PackageId, string CountryCode, string Language) public static async Task<PackageInfo> GetAsync(int PackageId, string CountryCode, string Language)
{ {
string steamUri = $"{steamBaseUri}?packageids={PackageId}"; string steamUri = $"{steamBaseUri}?packageids={PackageId}";