Skip to content

fix: migrate get_ly_interpellations to v2 API - #50

Open
mao-wang wants to merge 1 commit into
davidycliao:masterfrom
mao-wang:fix/interpellations-v2-api
Open

mao-wang wants to merge 1 commit into
davidycliao:masterfrom
mao-wang:fix/interpellations-v2-api

Conversation

@mao-wang

Copy link
Copy Markdown

The legacy https://ly.govapi.tw/interpellation endpoint now returns 404. Switch to https://v2.ly.govapi.tw/interpellations, which takes Chinese query parameter names (English names are silently ignored).

  • Map legislator/term/session_period/meet_id to v2 parameter names
  • v2 has no session-times filter: build a plenary meet_id from term + session_period + session_times
  • Surface API error responses ({"error": true})
  • Keep the same output columns for backward compatibility
  • Add a term/session filter test

The legacy https://ly.govapi.tw/interpellation endpoint now returns 404.
Switch to https://v2.ly.govapi.tw/interpellations, which takes Chinese
query parameter names (English names are silently ignored).

- Map legislator/term/session_period/meet_id to v2 parameter names
- v2 has no session-times filter: build a plenary meet_id from
  term + session_period + session_times
- Surface API error responses ({"error": true})
- Keep the same output columns for backward compatibility
- Add a term/session filter test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant