@@ -19,7 +19,7 @@ const newCurationId = "89576";
1919 */
2020export type OpenProcessingCurationResponse = Array < {
2121 /** Sketch ID used for constructing URLs */
22- visualID : string ;
22+ visualID : number ;
2323 /** Title of sketch */
2424 title : string ;
2525 /** Description of sketch */
@@ -85,7 +85,7 @@ export const getCurationSketches = memoize(async (
8585 */
8686export type OpenProcessingSketchResponse = {
8787 /** Sketch ID used for constructing URLs */
88- visualID : string ;
88+ visualID : number ;
8989 /** Title of sketch */
9090 title : string ;
9191 /** Description of sketch */
@@ -108,7 +108,7 @@ export type OpenProcessingSketchResponse = {
108108 * @returns
109109 */
110110export const getSketch = memoize (
111- async ( id : string ) : Promise < OpenProcessingSketchResponse > => {
111+ async ( id : number ) : Promise < OpenProcessingSketchResponse > => {
112112 // check for memoized sketch in curation sketches
113113 const curationSketches = await getCurationSketches ( ) ;
114114 const memoizedSketch = curationSketches . find ( ( el ) => el . visualID === id ) ;
@@ -134,7 +134,7 @@ export const getSketch = memoize(
134134 * But only uses the width and height properties from this call
135135 * Width and height should instead be added to properties for `/api/sketch/:id` or `api/curation/:curationId/sketches` instead
136136 */
137- export const getSketchSize = memoize ( async ( id : string ) => {
137+ export const getSketchSize = memoize ( async ( id : number ) => {
138138 const sketch = await getSketch ( id )
139139 if ( sketch . mode !== 'p5js' ) {
140140 return { width : undefined , height : undefined } ;
@@ -164,16 +164,16 @@ export const getSketchSize = memoize(async (id: string) => {
164164 return { width : undefined , height : undefined } ;
165165} ) ;
166166
167- export const makeSketchLinkUrl = ( id : string ) =>
167+ export const makeSketchLinkUrl = ( id : number ) =>
168168 `https://openprocessing.org/sketch/${ id } ` ;
169169
170- export const makeSketchEmbedUrl = ( id : string ) =>
170+ export const makeSketchEmbedUrl = ( id : number ) =>
171171 `https://openprocessing.org/sketch/${ id } /embed/?plusEmbedFullscreen=true&plusEmbedInstructions=false` ;
172172
173- export const makeThumbnailUrl = ( id : string ) =>
173+ export const makeThumbnailUrl = ( id : number ) =>
174174 `https://openprocessing-usercontent.s3.amazonaws.com/thumbnails/visualThumbnail${ id } @2x.jpg` ;
175175
176- export const getSketchThumbnailSource = async ( id : string ) => {
176+ export const getSketchThumbnailSource = async ( id : number ) => {
177177 const manualThumbs = import . meta. glob < ImageMetadata > ( './images/*' , { import : 'default' } )
178178 const key = `./images/${ id } .png` ;
179179 if ( manualThumbs [ key ] ) {
0 commit comments