How prosaugat/nepal-cause-list-api works
Nepal Cause List API provides both a PHP client and a JSON REST interface for fetching daily, weekly, and supplementary cause lists from Nepal’s courts. In the REST workflow, a caller requests a court, list type, and Bikram Sambat date; the API checks its file cache and delegates a miss to the client, which dispatches to a court-specific scraper and returns normalized data. Court-directory and calendar-date capabilities are also exposed. Scraper details are only partly sampled, so court-site relationships follow the README; the Supreme Court’s Selenium dependency is documented there as well.
Main entry points: CauseListClient.php Cause-list client · Api.php REST API · SupremeCourtService.php Supreme scraper · Log.php Scraper logging
Components 13
API interface
- HTTP front controller
public/index.php - REST API
src/Http/Api.php
Client and calendar
- Cause-list client
src/CauseListClient.php - BS calendar
src/Courts/NepaliCalendar.php
Court scrapers
- High Court scraper
src/Courts/HighCourtService.php - District scraper
src/Courts/DistrictCourtService.php - Supreme scraper
src/Courts/SupremeCourtService.php - Special and Consumer scraper
src/Courts/CmsCourtService.php
Runtime support
- Response file cache
src/Support/FileCache.php - Scraper logging
src/Support/Log.php
Other components
- API caller
- Court websites
- Selenium hub
Connections 19
- API caller → HTTP front controller: sends request
README.md - HTTP front controller → REST API: invokes
public/index.php - REST API → Cause-list client: routes requests
src/Http/Api.php - REST API → Response file cache: reads cache
src/Http/Api.php - REST API → Response file cache: writes results
src/Http/Api.php - Cause-list client → BS calendar: gets BS date
src/CauseListClient.php - Cause-list client → High Court scraper: dispatches high court
src/CauseListClient.php - Cause-list client → District scraper: dispatches district court
src/CauseListClient.php - Cause-list client → Supreme scraper: dispatches Supreme Court
src/CauseListClient.php - Cause-list client → Special and Consumer scraper: dispatches CMS courts
src/CauseListClient.php - High Court scraper → Court websites: fetches lists
README.md - District scraper → Court websites: fetches lists
README.md - Special and Consumer scraper → Court websites: fetches lists
README.md - Supreme scraper → Court websites: fetches lists
README.md - Supreme scraper → Selenium hub: solves WAF challenge
README.md - High Court scraper → Scraper logging: logs errors
src/Courts/HighCourtService.php - District scraper → Scraper logging: logs errors
src/Courts/DistrictCourtService.php - Special and Consumer scraper → Scraper logging: logs errors
src/Courts/CmsCourtService.php - Supreme scraper → Scraper logging: logs errors
src/Courts/SupremeCourtService.php