From fbb9528a0ee5b2cff05eb49596149ca04edd89e1 Mon Sep 17 00:00:00 2001 From: sebm253 <42180891+sebm253@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:37:05 +0100 Subject: [PATCH] shorten struct name --- rest/applications.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rest/applications.go b/rest/applications.go index 410a83be..607860d9 100644 --- a/rest/applications.go +++ b/rest/applications.go @@ -37,7 +37,7 @@ type Applications interface { GetApplicationRoleConnectionMetadata(applicationID snowflake.ID, opts ...RequestOpt) ([]discord.ApplicationRoleConnectionMetadata, error) UpdateApplicationRoleConnectionMetadata(applicationID snowflake.ID, newRecords []discord.ApplicationRoleConnectionMetadata, opts ...RequestOpt) ([]discord.ApplicationRoleConnectionMetadata, error) - GetEntitlements(applicationID snowflake.ID, params QueryParamsGetEntitlements, opts ...RequestOpt) ([]discord.Entitlement, error) + GetEntitlements(applicationID snowflake.ID, params ParamsGetEntitlements, opts ...RequestOpt) ([]discord.Entitlement, error) GetEntitlement(applicationID snowflake.ID, entitlementID snowflake.ID, opts ...RequestOpt) (*discord.Entitlement, error) CreateTestEntitlement(applicationID snowflake.ID, entitlementCreate discord.TestEntitlementCreate, opts ...RequestOpt) (*discord.Entitlement, error) DeleteTestEntitlement(applicationID snowflake.ID, entitlementID snowflake.ID, opts ...RequestOpt) error @@ -52,8 +52,8 @@ type Applications interface { GetActivityInstance(applicationID snowflake.ID, instanceID string, opts ...RequestOpt) (*discord.ActivityInstance, error) } -// QueryParamsGetEntitlements holds query parameters for Applications.GetEntitlements (https://discord.com/developers/docs/resources/entitlement#list-entitlements) -type QueryParamsGetEntitlements struct { +// ParamsGetEntitlements holds query parameters for Applications.GetEntitlements (https://discord.com/developers/docs/resources/entitlement#list-entitlements) +type ParamsGetEntitlements struct { UserID snowflake.ID SkuIDs []snowflake.ID Before int @@ -64,7 +64,7 @@ type QueryParamsGetEntitlements struct { ExcludeDeleted bool } -func (p QueryParamsGetEntitlements) ToQueryValues() discord.QueryValues { +func (p ParamsGetEntitlements) ToQueryValues() discord.QueryValues { queryValues := discord.QueryValues{ "exclude_ended": p.ExcludeEnded, "exclude_deleted": p.ExcludeDeleted, @@ -220,7 +220,7 @@ func (s *applicationsImpl) UpdateApplicationRoleConnectionMetadata(applicationID return } -func (s *applicationsImpl) GetEntitlements(applicationID snowflake.ID, params QueryParamsGetEntitlements, opts ...RequestOpt) (entitlements []discord.Entitlement, err error) { +func (s *applicationsImpl) GetEntitlements(applicationID snowflake.ID, params ParamsGetEntitlements, opts ...RequestOpt) (entitlements []discord.Entitlement, err error) { err = s.client.Do(GetEntitlements.Compile(params.ToQueryValues(), applicationID), nil, &entitlements, opts...) return }