Source code for mini_project_1.search_requests

#!/usr/bin/python
# -*- coding: utf-8 -*-

"""Search for a ride request

The member should be able to see all his/her ride requests. Also the member
should be able to provide a location code or a city and see a listing of all
requests with a pickup location matching the location code or the city
entered. If there are more than 5 matches, at most 5 matches will be shown
at a time. The member should be able to select a request and message the
posting member, for example asking the member to check out a ride.
"""

from mini_project_1.common import ShellArgumentParser


[docs]def get_search_requests_lcode_parser() -> ShellArgumentParser: """Argparser for the :class:`.shell.MiniProjectShell` ``search_requests_lcode`` command""" parser = ShellArgumentParser( prog="search_requests_lcode", description="Search ride requests by location code") parser.add_argument("lcode", help="The location code to search by") return parser
[docs]def get_search_requests_city_parser() -> ShellArgumentParser: """Argparser for the :class:`.shell.MiniProjectShell` ``search_requests_city`` command""" parser = ShellArgumentParser( prog="search_requests_city", description="Search ride requests by city name") parser.add_argument("city", help="The name of the city to search by") return parser