A "public" function in the InitHandler class. This function is called by the BackendController class. handle_sets_retrieve essentially calls Backend.all_sets() and returns the result to whoever called handle_sets_retrieve.
See the following diagram:
Parameters
None
Return Type
List[Set] (Set is an object defined by the Pokémon TCG API)
Example Pseudo-Code use of Function:
// Initialize an instance of InitHandler
INITIALIZE handler AS InitHandler
// Call the handle_sets_retrieve function
SET sets TO handler.handle_sets_retrieve()
// Check if sets is not empty
IF sets IS NOT EMPTY THEN
// Process the sets
FOR EACH set IN sets DO
// Perform actions with each set
DISPLAY set.name // For example, print or show the set name
END FOR
ELSE
// Handle the case where no sets were found
DISPLAY "No sets found."
END IF
Pseudo-Code Definition
FUNCTION handle_sets_retrieve()
// Call the Backend to retrieve all sets
SET sets TO Backend.all_sets()
// Return the list of sets
RETURN sets
END FUNCTION
handle_sets_retrieve
Design DocumentDescription
A "public" function in the
InitHandler
class. This function is called by theBackendController
class.handle_sets_retrieve
essentially callsBackend.all_sets()
and returns the result to whoever calledhandle_sets_retrieve
.See the following diagram:
Parameters
None
Return Type
List[Set]
(Set is an object defined by the Pokémon TCG API)Example Pseudo-Code use of Function:
Pseudo-Code Definition