Skip to content

Commit

Permalink
eep
Browse files Browse the repository at this point in the history
  • Loading branch information
avertrees committed Nov 25, 2024
1 parent 21db1a9 commit 91713cc
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
51 changes: 51 additions & 0 deletions __tests__/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"nyplAPI": {
"request": {
"query": "Search"
},
"response": {
"headers": {
"status": "success",
"code": "200",
"message": "ok"
},
"name": "Billy Rose Theatre Division",
"slug": "billy-rose-theatre-division",
"summary": "The Billy Rose Theatre Division of The New York Public Library is one of the largest and most comprehensive archives devoted to the theatrical arts. Encompassing dramatic performance in all its diversity, the division is an indispensable resource for artists, writers, researchers, scholars, students, and the general public.",
"nyplLink": "https://www.nypl.org/locations/lpa/billy-rose-theatre-division",
"numFound": "218",
"perPage": "48",
"page": "1",
"items": [
{
"title": "Publicity photograph of Maxine Elliott",
"uuid": "da343760-632a-013d-3a3b-0242ac110002",
"url": "https://digitalcollections.nypl.org/items/da343760-632a-013d-3a3b-0242ac110002",
"imageID": "58928240",
"containsMultipleImages": "true"
},
{
"title": "Mark Short, Mary Mannering, and Charles Richman in the stage production A Man's World",
"uuid": "22b8e920-632a-013d-4265-0242ac110003",
"url": "https://digitalcollections.nypl.org/items/22b8e920-632a-013d-4265-0242ac110003",
"imageID": "58928238",
"containsMultipleImages": "true"
},
{
"title": "Yaphet Kotto, Jimmy Pelham, and Maria Tucci in the stage production The Great White Hope",
"uuid": "ef2645d0-4eb3-013d-b578-0242ac110003",
"url": "https://digitalcollections.nypl.org/items/ef2645d0-4eb3-013d-b578-0242ac110003",
"imageID": "58926705",
"containsMultipleImages": "true"
},
{
"title": "Yaphet Kotto and Maria Tucci in the stage production The Great White Hope",
"uuid": "95d7c270-4eb3-013d-67ad-0242ac110003",
"url": "https://digitalcollections.nypl.org/items/95d7c270-4eb3-013d-67ad-0242ac110003",
"imageID": "58926707",
"containsMultipleImages": "true"
}
]
}
}
}
1 change: 1 addition & 0 deletions app/src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ export const getCollectionsData = async ({
perPage?: number; // OPEN QUESTION: perhaps remove the "perPage" field because the API default is 48 and that is what we want.
} = {}) => {
let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${collectionsSortOptions[sortID]}&q=${keyword}`;
console.log("apiUrl is: ", apiUrl);
const res = await apiResponse(apiUrl);
return res;
};

0 comments on commit 91713cc

Please sign in to comment.