Skip to content

Commit

Permalink
feat(CDNRoutes): add storePageAsset() (#695)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Feb 15, 2023
1 parent c65e214 commit 4cf6fd2
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 8 deletions.
14 changes: 12 additions & 2 deletions deno/rest/v10/mod.ts
Expand Up @@ -1011,12 +1011,12 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/app-icons/{application.id}/{application.asset_id}.{png|jpeg|webp}`
* - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
return `/app-icons/${applicationId}/${applicationAssetId}.${format}` as const;
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1044,6 +1044,16 @@ export const CDNRoutes = {
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
},

/**
* Route for:
* - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
},

/**
* Route for:
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
Expand Down
14 changes: 12 additions & 2 deletions deno/rest/v9/mod.ts
Expand Up @@ -1020,12 +1020,12 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/app-icons/{application.id}/{application.asset_id}.{png|jpeg|webp}`
* - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
return `/app-icons/${applicationId}/${applicationAssetId}.${format}` as const;
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1053,6 +1053,16 @@ export const CDNRoutes = {
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
},

/**
* Route for:
* - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
},

/**
* Route for:
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
Expand Down
14 changes: 12 additions & 2 deletions rest/v10/index.ts
Expand Up @@ -1011,12 +1011,12 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/app-icons/{application.id}/{application.asset_id}.{png|jpeg|webp}`
* - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
return `/app-icons/${applicationId}/${applicationAssetId}.${format}` as const;
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1044,6 +1044,16 @@ export const CDNRoutes = {
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
},

/**
* Route for:
* - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
},

/**
* Route for:
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
Expand Down
14 changes: 12 additions & 2 deletions rest/v9/index.ts
Expand Up @@ -1020,12 +1020,12 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/app-icons/{application.id}/{application.asset_id}.{png|jpeg|webp}`
* - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
return `/app-icons/${applicationId}/${applicationAssetId}.${format}` as const;
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1053,6 +1053,16 @@ export const CDNRoutes = {
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
},

/**
* Route for:
* - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
},

/**
* Route for:
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
Expand Down

0 comments on commit 4cf6fd2

Please sign in to comment.