Skip to content

Commit d0d31e5

Browse files
committed
Add fields parameter for tier
1 parent 479142f commit d0d31e5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.2.0] - 2024-10-12
9+
### Added
10+
- Added fields parameters for tier to IPatreonApi.GetIdentity and IPatreonApi.GetIdentityJson.
11+
812
## [1.1.1] - 2024-10-10
913
### Fixed
1014
- Fixed IPatreonApi.GetIdentityJson missing types error for source generated json deserialization.

Patreon.Api/IPatreonApi.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public interface IPatreonApi
1414
"email,first_name,full_name,image_url,last_name,thumb_url,url,vanity,is_email_verified";
1515
private const string DefaultMemberFields =
1616
"currently_entitled_amount_cents,lifetime_support_cents,campaign_lifetime_support_cents,last_charge_status,patron_status,last_charge_date,pledge_relationship_start,pledge_cadence";
17+
private const string DefaultTierFields = "title,amount_cents";
1718

1819
[Headers("Content-Type: application/x-www-form-urlencoded")]
1920
[Post("/oauth2/token")]
@@ -27,6 +28,7 @@ Task<PatreonIdentityResponse> GetIdentity(
2728
string? include = DefaultInclude,
2829
[AliasAs("fields[user]")] string? userFields = DefaultUserFields,
2930
[AliasAs("fields[member]")] string? memberFields = DefaultMemberFields,
31+
[AliasAs("fields[tier]")] string? tierFields = DefaultTierFields,
3032
[Property(nameof(AuthorizationTokens))] AuthorizationTokens? authorization = null,
3133
CancellationToken cancellationToken = default
3234
);
@@ -36,6 +38,7 @@ Task<JsonObject> GetIdentityJson(
3638
string? include = DefaultInclude,
3739
[AliasAs("fields[user]")] string? userFields = DefaultUserFields,
3840
[AliasAs("fields[member]")] string? memberFields = DefaultMemberFields,
41+
[AliasAs("fields[tier]")] string? tierFields = DefaultTierFields,
3942
[Property(nameof(AuthorizationTokens))] AuthorizationTokens? authorization = null,
4043
CancellationToken cancellationToken = default
4144
);

0 commit comments

Comments
 (0)