Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new URL encoding function to align with SEC API #40

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

jordan-gillard
Copy link
Contributor

This PR is creates the generate_search_url_for_kwargs function to align the EDGAR CLI's generated URLs more closely with the actual EDGAR API. Here are the main differences:

old new
Relative dates are converted to custom dates (i.e. 10y is converted to &dateRange=custom&startdt=2014-09-07&enddt=2024-09-07) Relative dates (like 10y) use the SEC API query &dateRange=10y in URLs
Filing categories are converted to large lists of individual forms Filing categories are converted to the SEC API's filing category code
Users specify locations using the SEC UI's exact text for the location Users specify locations using ISO-3166 internationally approved alpha codes (i.e. instead of having to write Holy See (Vatican City State) exactly correct on the command line, user's use the international abbrevation, "VAT")

There are also 645 tests for URL generation. All incorporated/principal office ISO codes to SEC location are tested.

Please note that this PR does not replace the existing URL-generation code. This PR is already huge enough and I will do that in a follow-up PR.

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.

2 participants