Skip to content

Commit

Permalink
shorten struct name
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed Dec 2, 2024
1 parent 83390b5 commit fbb9528
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rest/applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit fbb9528

Please sign in to comment.