Skip to content

Hassan-W/dcgroup-assignment

Repository files navigation

Welcome to Hassan Wehbe's Interview Assignment




This is a simple php project that filters a list of offers fetched from an api link

This project can be run either as a web interface or as a CLI script

1- CLI Script

To run the CLI script, simply call the run.php file as stated in the assignment documentation

Example:
    php .\run.php count_by_offer_id 123
                    OR
    php .\run.php count_by_price_range 12 300
Note:

Before running the above scripts please make sure to run the following script in an another terminal to serve the web api

   php .\run.php web



2- Web Interface

Simply run the below command and navigate to 127.0.0.1 in your browser

   php .\run.php web



Each request to "getOffer.php" & "run.php" is logged in the logs folder according to the day date and -cli postfix if it was done by the CLI


run ./test.php to test multiple cases of the cli script, and the results will appear in the log file




Done By:
Hassan Wehbe

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages