Project-Books / books-api

GraphQL Books API
https://project-books.github.io/#books-api
MIT License
36 stars 59 forks source link

Return URL for book covers in response #131

Closed knjk04 closed 2 years ago

knjk04 commented 2 years ago

Example of one of our covers: https://bapiimagesdev.blob.core.windows.net/covers/1/small.jpg

The prefix will always be https://bapiimagesdev.blob.core.windows.net/covers/. The 1 refers to a unique ID that refers to that specific book. The file name can either be called 'small', 'medium' or 'large', followed by an extension type (currently, we only accept .jpg and .png ).

A book can have many covers: https://github.com/Project-Books/books-api/blob/main/src/main/java/com/karankumar/booksapi/model/Book.java#L105.

This method https://github.com/Project-Books/books-api/blob/main/src/main/java/com/karankumar/booksapi/model/cover/Cover.java#L75 returns the full URL to an image.

In methods like getPathToSmall(), we construct the full URL: https://github.com/Project-Books/books-api/blob/main/src/main/java/com/karankumar/booksapi/model/cover/Cover.java#L75. We need to return this for the smallFileType, mediumFileType and largeFileType

knjk04 commented 2 years ago

@jhanna60 as discussed over Slack. Could you reply to this saying that you're happy to pick this up? Then, your username will come up for me to assign in the assignees list

jhanna60 commented 2 years ago

Happy to pick this up @knjk04