Implement BmcSupporterService to verify supporters via BMC API with configurable caching. Add SupporterEmail and HideIfSupporter properties to all controls to automatically hide donation prompts for existing supporters. Replace PNG logo with SVG for crisp rendering at all scales. Add BmcOptions and BmcConfiguration for library-wide settings. Bump version to 1.1.0.
19 lines
583 B
C#
19 lines
583 B
C#
namespace BuyMeCofee.Maui;
|
|
|
|
/// <summary>
|
|
/// Configuration options for the Buy Me a Coffee library.
|
|
/// </summary>
|
|
public class BmcOptions
|
|
{
|
|
/// <summary>
|
|
/// Your Buy Me a Coffee API access token (from https://developers.buymeacoffee.com).
|
|
/// Required for supporter verification. This is the creator's token.
|
|
/// </summary>
|
|
public string? AccessToken { get; set; }
|
|
|
|
/// <summary>
|
|
/// How long to cache the supporter list before re-fetching. Default: 1 hour.
|
|
/// </summary>
|
|
public TimeSpan CacheDuration { get; set; } = TimeSpan.FromHours(1);
|
|
}
|