Skip to content

Conversation

@JonnyWong16
Copy link
Collaborator

@JonnyWong16 JonnyWong16 commented Dec 24, 2020

Description

Update LibrarySection.all() method to use LibrarySection.search() behind the scenes for more filtering/sorting options and faster results by taking advantage of pagination.

Breaking change:

  • Sorting when using LibrarySection.all('title:asc') now requires the sort keyword argument (e.g. LibrarySection.all(sort='title:asc')).

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the docstring for new or existing methods
  • I have added tests when applicable

@Hellowlol
Copy link
Collaborator

What was wrong with the test when maxresults wasnt used?

@JonnyWong16
Copy link
Collaborator Author

.search() retrieves all items when maxresults is not specified.

container_start=0 and container_size=1 would just make 4 API calls with each call returning one item to retrieve all 4 movies.

@Hellowlol Hellowlol self-requested a review December 29, 2020 20:57
@Hellowlol Hellowlol merged commit c6ac8ab into pushingkarmaorg:master Dec 30, 2020
@JonnyWong16 JonnyWong16 deleted the feature/librarysection_all branch May 13, 2021 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants