From a743d1e13c7885d64c6682880d517059a80a0a5c Mon Sep 17 00:00:00 2001 From: Sanjin <102841251+duckduckgrayduck@users.noreply.github.com> Date: Wed, 28 Oct 2026 16:54:28 -0500 Subject: [PATCH 1/5] Document all filters on agencies, jurisdictions, requests, communications, and files --- docs/agencies.rst | 22 ++++++++++++++++++++-- docs/communications.rst | 20 +++++++++++++------- docs/files.rst | 5 +++-- docs/jurisdictions.rst | 20 ++++++++++++++------ docs/requests.rst | 16 ++++++++++++++-- 5 files changed, 64 insertions(+), 19 deletions(-) diff --git a/docs/agencies.rst b/docs/agencies.rst index 2fb0592..0ff83a6 100644 --- a/docs/agencies.rst +++ b/docs/agencies.rst @@ -18,12 +18,28 @@ AgencyClient >>> agency_search_example , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]> + To find all agencies in a state, use the ``state`` filter with the ID of a state jurisdiction. Unlike ``jurisdiction__id``, which only matches agencies directly in that jurisdiction, ``state`` also includes local agencies (such as city and county agencies) within the state. + :: + + >>> state_agencies = client.agencies.list(state=168) + + + To search for agencies by keyword, use the ``search`` parameter. It can be combined with other filters such as ``state``. + For example, to find all of the police departments in Illinois you could do: + :: + + >>> il_police_agencies = client.agencies.list(search="police", state=168) + .. method:: list(self, **params) List all agencies with optional filtering by parameters. Filters include: - name: The agency name. Partial matches are supported. - - jurisdiction__id: the ID of the Jurisidiction the agency belongs to. - :param params: Query parameters to filter results (e.g., `jurisdiction`, `name`). + - jurisdiction__id: the ID of the Jurisdiction the agency belongs to. + - state: The ID of a state jurisdiction. Matches state-level agencies and local agencies within that state. + - search: A keyword search across agencies (e.g., ``search="police"``). + - type: The agency type name (e.g., ``type="police"``). Not set on every agency. + + :param params: Query parameters to filter results (e.g., `jurisdiction__id`, `name`, `state`, `search`, `type`). :return: An :class:`APIResults` object containing the list of agencies. .. method:: retrieve(self, agency_id) @@ -34,6 +50,8 @@ AgencyClient :return: A :class:`Agency` object representing the requested agency. + + Agency ---------------- .. class:: muckrock.agencies.Agency diff --git a/docs/communications.rst b/docs/communications.rst index 396fd8c..4b60e8b 100644 --- a/docs/communications.rst +++ b/docs/communications.rst @@ -7,23 +7,29 @@ CommunicationClient ---------------- .. class:: muckrock.communications.CommunicationClient - The communication client allows access to search, list, and retrieve individual FOIA communications. Accessed generally as ``clients.communications`` + The communication client allows access to search, list, and retrieve individual FOIA communications. Accessed generally as ``client.communications``. :: + >>> comms_list = client.communications.list(foia=14313) >>> comms_list , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]> + To find communications within a date range, use ``min_date`` (on or after) and ``max_date`` (on or before) with dates in ``YYYY-MM-DD`` format. They can be combined with other filters such as ``response``: + :: + + >>> responses_2024 = client.communications.list(foia=14313, response=True, min_date='2024-01-01', max_date='2024-12-31') + .. method:: list(self, **params) List all FOIA communications with optional filtering. Available filters include: - - **max_date**: Filter communications before a specific date. Format: YYYY-MM-DD - - **min_date**: Filter communications after a specific date. Format: YYYY-MM-DD + - **max_date**: Filter communications on or before this date. Format: YYYY-MM-DD + - **min_date**: Filter communications on or after this date. Format: YYYY-MM-DD - **foia**: Filter by the associated FOIA request's ID. - - **status**: Filter by the status of the communication (e.g., `submitted`, `ack`, `processed`, etc.). - - **response**: Filter communications based on whether they are a response (boolean). + - **status**: Filter by the status of the communication (e.g., ``submitted``, ``ack``, ``processed``). + - **response**: Filter by whether the communication is a response (boolean). - :param params: Query parameters to filter results (e.g., `foia`, `max_date`, `response`). + :param params: Query parameters to filter results (e.g., `foia`, `min_date`, `max_date`, `status`, `response`). :return: An :class:`APIResults` object containing the list of communications. .. method:: retrieve(self, communication_id) @@ -91,7 +97,7 @@ Communication .. attribute:: status - The status of the communication, such as `submitted`, `ack`, `processed`, `done`, etc. + The status of the communication, such as ``submitted``, ``ack``, ``processed``, ``done``, etc. .. attribute:: files diff --git a/docs/files.rst b/docs/files.rst index e384cdd..6835997 100644 --- a/docs/files.rst +++ b/docs/files.rst @@ -9,6 +9,7 @@ FileClient The file client allows access to search, list, and retrieve individual FOIA files. Accessed generally as ``client.files``. :: + >>> file_list = client.files.list(communication=108907) >>> file_list ]> @@ -23,7 +24,7 @@ FileClient - **communication**: Filter by the associated communication's ID. - **title**: Filter by the file title. - - **doc_id**: Filter by unique identifier for the document (different than the ID of the file). + - **doc_id**: Filter by the unique slug for the file (different than the ID of the file). :param params: Query parameters to filter results, such as `communication`, `title`, and `doc_id`. :return: An :class:`APIResults` object containing the list of files. @@ -71,7 +72,7 @@ File .. attribute:: doc_id - Filter by the document identifier assigned to the file. + The unique slug assigned to the file (different than the ID of the file). .. attribute:: pages diff --git a/docs/jurisdictions.rst b/docs/jurisdictions.rst index 32b937b..a1c7a54 100644 --- a/docs/jurisdictions.rst +++ b/docs/jurisdictions.rst @@ -18,16 +18,23 @@ JurisdictionClient >>> kentucky.abbrev 'KY' + To find the local jurisdictions within a state, filter by the state's abbreviation with ``parent__abbrev``: + :: + + >>> ma_local_jurisdictions = client.jurisdictions.list(parent__abbrev='MA') + .. method:: list(self, **params) List all jurisdictions with optional filtering. Available filters include: - - **abbrev**: Filter by the jurisdiction abbreviation. Local jurisdictions typically don't have an abbreviation. - - **level**: Filter by the level of the jurisdiction (e.g., `f` for Federal, `s` for State, `l` for Local). + - **abbrev**: Filter by the jurisdiction abbreviation. Local jurisdictions don't have an abbreviation. + - **level**: Filter by the level of the jurisdiction (``f`` for Federal, ``s`` for State, ``l`` for Local). - **name**: Filter by the jurisdiction's name. - **parent**: Filter by the ID of the parent jurisdiction. Jurisdictions can have a federal or state parent, while local jurisdictions cannot be parents. + - **parent__name**: Filter by the name of the parent jurisdiction. + - **parent__abbrev**: Filter by the abbreviation of the parent jurisdiction. For example, ``MA`` returns the state's local jurisdictions. - :param params: Query parameters to filter results, such as `abbrev`, `level`, `name`, and `parent`. + :param params: Query parameters to filter results, such as `abbrev`, `level`, `name`, `parent`, `parent__name`, and `parent__abbrev`. :return: An :class:`APIResults` object containing the list of jurisdictions. .. method:: retrieve(self, jurisdiction_id) @@ -66,9 +73,10 @@ Jurisdiction .. attribute:: level The level of the jurisdiction, which can be: - - **`f`** for Federal - - **`s`** for State - - **`l`** for Local + + - ``f`` for Federal + - ``s`` for State + - ``l`` for Local .. attribute:: parent diff --git a/docs/requests.rst b/docs/requests.rst index 18e5d72..ded0f82 100644 --- a/docs/requests.rst +++ b/docs/requests.rst @@ -7,9 +7,15 @@ RequestClient ---------------- .. class:: muckrock.requests.RequestClient - The request client allows access to search, list, create, and retrieve FOIA requests. Accessed generally as ``client.agencies``. + The request client allows access to search, list, create, and retrieve FOIA requests. Accessed generally as ``client.requests``. Refer to the getting started page to look at some examples of searching and filing requests. + To find requests within a date range, use the ``__gte`` (on or after) and ``__lte`` (on or before) filters with dates in ``YYYY-MM-DD`` format. They can be combined with other filters such as ``agency``: + :: + + >>> requests_2024 = client.requests.list(datetime_submitted__gte='2024-01-01', datetime_submitted__lte='2024-12-31') + >>> agency_requests_2024 = client.requests.list(agency=453, datetime_submitted__gte='2024-01-01', datetime_submitted__lte='2024-12-31') + .. method:: list(self, **params) List all FOIA requests with optional filtering and ordering. Available filters include: @@ -21,6 +27,12 @@ RequestClient - **agency**: Filter by the agency ID handling the request. - **tags**: Filter by tags associated with the request. - **jurisdiction**: Filter by the jurisdiction ID associated with the request. + - **datetime_submitted__gte**: Requests submitted on or after this date. + - **datetime_submitted__lte**: Requests submitted on or before this date. + - **datetime_updated__gte**: Requests last updated on or after this date. + - **datetime_updated__lte**: Requests last updated on or before this date. + - **datetime_done__gte**: Requests where the response was received on or after this date. + - **datetime_done__lte**: Requests where the response was received on or before this date. - **search**: An optional search term. For example, you can search for any request that mentions recipes. Ordering options are available, including: @@ -34,7 +46,7 @@ RequestClient Ordering can be specified as either ascending (`ordering=user`) or descending (`ordering=-user`). - :param params: Query parameters to filter and order results, such as `user`, `title`, `status`, `embargo_status`, `agency`, `tags`, and `jurisdiction`, along with `ordering`. + :param params: Query parameters to filter and order results, such as `user`, `title`, `status`, `embargo_status`, `agency`, `tags`, `jurisdiction`, the date range filters, and `search`, along with `ordering`. :return: An :class:`APIResults` object containing the list of FOIA requests. .. method:: retrieve(self, request_id) From 43087d756da74e68650a973930d5c6500aaa1257 Mon Sep 17 00:00:00 2001 From: Sanjin <102841251+duckduckgrayduck@users.noreply.github.com> Date: Wed, 28 Oct 2026 17:02:00 -0500 Subject: [PATCH 2/5] More formatting fixes and add some stuff to .gitignore --- .gitignore | 2 ++ docs/agencies.rst | 1 + docs/communications.rst | 4 ++-- docs/gettingstarted.rst | 6 +++--- docs/index.rst | 2 +- docs/jurisdictions.rst | 4 ++-- docs/organizations.rst | 4 ++-- docs/projects.rst | 1 - docs/users.rst | 1 + 9 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 6396a68..b89f4c2 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ dist/* *.swp .DS_Store .env +.venv/ +docs/_build/ diff --git a/docs/agencies.rst b/docs/agencies.rst index 0ff83a6..ffcc4d9 100644 --- a/docs/agencies.rst +++ b/docs/agencies.rst @@ -10,6 +10,7 @@ AgencyClient The agency client allows access to search and retrieval of agencies via the MuckRock API. The client supports querying, listing, and retrieving specific agencies. Accessed generally as ``client.agencies``. :: + >>> example_agency = client.agencies.retrieve(453) >>> example_agency diff --git a/docs/communications.rst b/docs/communications.rst index 4b60e8b..f0e6dfc 100644 --- a/docs/communications.rst +++ b/docs/communications.rst @@ -1,10 +1,10 @@ Communications -=========== +============== Methods for searching and retrieving FOIA communications. CommunicationClient ----------------- +------------------- .. class:: muckrock.communications.CommunicationClient The communication client allows access to search, list, and retrieve individual FOIA communications. Accessed generally as ``client.communications``. diff --git a/docs/gettingstarted.rst b/docs/gettingstarted.rst index e7acb5c..85af9c6 100644 --- a/docs/gettingstarted.rst +++ b/docs/gettingstarted.rst @@ -42,7 +42,7 @@ The response will be a set of requests with each request labelled with its ID (6 Retrieving a single request ------------------------ +--------------------------- Let's say we want to retrieve a single request (like request 62755 from above).. You may retrieve this single request by its ID like so: :: @@ -53,7 +53,7 @@ You may retrieve this single request by its ID like so: :: Retrieving your organization ID ------------------------ +------------------------------- To file requests using the API, you need to know which organization to file the requests under. The easiest way to find the organization IDs of organizations you belong to is by accessing the user endpoint. :: @@ -118,7 +118,7 @@ The only difference between filing a single and multi-request is that you provid You may still edit or delete the request before it is filed (30 minutes after creation) on the site. Finding communications and files tied to a request ------------------------ +--------------------------------------------------- We can find communications and files (to download them for example) tied to a request by first retrieving the request and then using the request object's `get_communications()` method. diff --git a/docs/index.rst b/docs/index.rst index bbc9659..a48fe1e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -35,5 +35,5 @@ Contributing ------------ * Code repository: `https://github.com/MuckRock/python-muckrock `_ -* Issues: `https://github.com/MuckRock/python-muckrock/issues `_ * Packaging: `https://pypi.org/project/python-muckrock/ `_ diff --git a/docs/jurisdictions.rst b/docs/jurisdictions.rst index a1c7a54..850e239 100644 --- a/docs/jurisdictions.rst +++ b/docs/jurisdictions.rst @@ -1,10 +1,10 @@ Jurisdictions -=========== +============= Methods for searching and retrieving jurisdictions. JurisdictionClient ----------------- +------------------ .. class:: muckrock.jurisdictions.JurisdictionClient The jurisdiction client allows access to search, list, and retrieve individual jurisdictions. Accessed generally as ``client.jurisdictions``. diff --git a/docs/organizations.rst b/docs/organizations.rst index 01dd0c4..7374a16 100644 --- a/docs/organizations.rst +++ b/docs/organizations.rst @@ -1,10 +1,10 @@ Organization -=========== +============ Methods for searching and retrieving organizations. OrganizationClient ----------------- +------------------ .. class:: muckrock.organizations.OrganizationClient The organization client allows access to search, list, and retrieve individual organizations. diff --git a/docs/projects.rst b/docs/projects.rst index fe4ac3a..8dd8207 100644 --- a/docs/projects.rst +++ b/docs/projects.rst @@ -8,7 +8,6 @@ ProjectClient .. class:: muckrock.projects.ProjectClient The project client allows access to search, list, and retrieve projects. Accessed generally as ``client.projects``. - :: .. method:: list(self, **params) diff --git a/docs/users.rst b/docs/users.rst index 3804af5..4496dce 100644 --- a/docs/users.rst +++ b/docs/users.rst @@ -9,6 +9,7 @@ UserClient The user client allows access to search, list, and retrieve individual users. Accessed generally as ``client.users``. :: + >>> my_user = client.users.me() .. method:: me(self) From 9fe89db9f38a89e591a682d9b5ae46c3e46f018f Mon Sep 17 00:00:00 2001 From: Sanjin <102841251+duckduckgrayduck@users.noreply.github.com> Date: Wed, 28 Oct 2026 17:05:58 -0500 Subject: [PATCH 3/5] Fix spacing on a single agency --- docs/agencies.rst | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/docs/agencies.rst b/docs/agencies.rst index ffcc4d9..f27a8b5 100644 --- a/docs/agencies.rst +++ b/docs/agencies.rst @@ -17,40 +17,43 @@ AgencyClient >>> agency_search_example = client.agencies.list(jurisdiction__id=1) >>> agency_search_example - , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]> + , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]> To find all agencies in a state, use the ``state`` filter with the ID of a state jurisdiction. Unlike ``jurisdiction__id``, which only matches agencies directly in that jurisdiction, ``state`` also includes local agencies (such as city and county agencies) within the state. :: >>> state_agencies = client.agencies.list(state=168) - To search for agencies by keyword, use the ``search`` parameter. It can be combined with other filters such as ``state``. For example, to find all of the police departments in Illinois you could do: :: >>> il_police_agencies = client.agencies.list(search="police", state=168) - .. method:: list(self, **params) + To filter agencies by type, use the ``type`` parameter. Unlike ``search``, this matches agencies tagged with that type, including ones without the keyword in their name (such as a sheriff's office tagged as Police). + :: + + >>> il_police_type_agencies = client.agencies.list(type="police", state=168) - List all agencies with optional filtering by parameters. Filters include: - - name: The agency name. Partial matches are supported. - - jurisdiction__id: the ID of the Jurisdiction the agency belongs to. - - state: The ID of a state jurisdiction. Matches state-level agencies and local agencies within that state. - - search: A keyword search across agencies (e.g., ``search="police"``). - - type: The agency type name (e.g., ``type="police"``). Not set on every agency. + .. method:: list(self, **params) - :param params: Query parameters to filter results (e.g., `jurisdiction__id`, `name`, `state`, `search`, `type`). - :return: An :class:`APIResults` object containing the list of agencies. + List all agencies with optional filtering by parameters. Filters include: - .. method:: retrieve(self, agency_id) + - **name**: The agency name. Partial matches are supported. + - **jurisdiction__id**: The ID of the jurisdiction the agency belongs to. + - **state**: The ID of a state jurisdiction. Matches state-level agencies and local agencies within that state. + - **type**: The agency type name (e.g., ``type="police"``). + - **search**: A keyword search across agencies (e.g., ``search="police"``). - Retrieve a specific agency by its unique identifier. + :param params: Query parameters to filter results (e.g., `jurisdiction__id`, `name`, `state`, `type`, `search`). + :return: An :class:`APIResults` object containing the list of agencies. - :param agency_id: The unique ID of the agency to retrieve. - :return: A :class:`Agency` object representing the requested agency. + .. method:: retrieve(self, agency_id) + Retrieve a specific agency by its unique identifier. + :param agency_id: The unique ID of the agency to retrieve. + :return: A :class:`Agency` object representing the requested agency. Agency @@ -81,7 +84,7 @@ Agency .. attribute:: exempt - Indicates whether the agency is exempt from records laws + Indicates whether the agency is exempt from records laws. .. attribute:: types @@ -97,8 +100,8 @@ Agency .. attribute:: parent - The ID of the parent agency + The ID of the parent agency. .. attribute:: appeal_agency - The ID of the agency to which appeals are directed + The ID of the agency to which appeals are directed. From ed5ec2054d27e43f56b13f9fcd1203974ac4b2e5 Mon Sep 17 00:00:00 2001 From: Sanjin <102841251+duckduckgrayduck@users.noreply.github.com> Date: Mon, 2 Nov 2026 17:40:32 -0600 Subject: [PATCH 4/5] Remove ordering from requests and update the getting started section --- docs/_static/.gitkeep | 0 docs/gettingstarted.rst | 40 ++++++++++++++++++++++++++++------------ docs/requests.rst | 17 +++-------------- 3 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 docs/_static/.gitkeep diff --git a/docs/_static/.gitkeep b/docs/_static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/gettingstarted.rst b/docs/gettingstarted.rst index 85af9c6..09a0b01 100644 --- a/docs/gettingstarted.rst +++ b/docs/gettingstarted.rst @@ -30,7 +30,7 @@ If you need to debug, you can pass a logging level as a parameter to the client Searching for requests ----------------------- -You can now you use the client to interact with the MuckRock API. A search for requests about recipes would look like this: :: +You can now use the client to interact with the MuckRock API. A search for requests about recipes would look like this: :: >>> request_list = client.requests.list(search="Recipe") >>> request_list @@ -44,10 +44,10 @@ The response will be a set of requests with each request labelled with its ID (6 Retrieving a single request --------------------------- -Let's say we want to retrieve a single request (like request 62755 from above).. +Let's say we want to retrieve a single request (like request 48151 from above). You may retrieve this single request by its ID like so: :: - >>> request_test = client.requests.retrieve(62755) + >>> request_test = client.requests.retrieve(48151) >>> request_test @@ -77,13 +77,17 @@ Before you can file a request using the MuckRock API, you need to know where to Similar to the requests endpoint, the agencies endpoint has filters that allow you to find the agencies of interest. You can provide a search term or other filter. Consult the agencies portion of this documentation for more options. -Here is an example of how to find agencies that belong to jurisdiction 1 (Massachusetts) +The easiest way to find agencies in a state is with the ``state`` filter. First, look up the state's jurisdiction ID by its abbreviation: :: -:: + >>> illinois = client.jurisdictions.list(abbrev='IL', level='s') + >>> illinois + ]> - >>> agency_list = client.agencies.list(jurisdiction__id=1) - >>> agency_list - , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]> +Then pass that ID as ``state``. This returns both state agencies and local agencies (such as city and county agencies) within the state. You can narrow the results with ``type`` or ``search``: :: + + >>> il_agencies = client.agencies.list(state=168) + >>> il_police_agencies = client.agencies.list(state=168, type="police") + >>> chicago_agencies = client.agencies.list(state=168, search="Chicago") Filing a single request @@ -109,16 +113,28 @@ The only difference between filing a single and multi-request is that you provid >>> new_request_data = { "title": "Your request title here", "requested_docs": "This is a test FOIA request.", - "organization": 1 # Replace this with your org id, - "agencies": [248, 18529] # Replace this with your list of agencies. + "organization": 1, # Replace this with your org id. + "agencies": [248, 18529], # Replace this with your list of agencies. } >>> new_request = client.requests.create(**new_request_data) https://www.muckrock.com/foi/multirequest/your-request-title-here-151010/ You may still edit or delete the request before it is filed (30 minutes after creation) on the site. +Running out of requests +----------------------- + +If the organization you file under has no requests remaining, the request is not filed. Instead, it is saved as a draft and the API responds with a ``402 Payment Required`` status and a link to the draft: :: + + { + "status": "Out of requests. FOI Request has been saved.", + "location": "https://www.muckrock.com/foi/multirequest/your-request-title-here-151010/" + } + +To file the draft, either add more requests to your organization and submit it from the ``location`` link on the site, or file it under a different organization that has requests remaining. See `Retrieving your organization ID`_ for how to check which organizations you belong to. + Finding communications and files tied to a request ---------------------------------------------------- +-------------------------------------------------- We can find communications and files (to download them for example) tied to a request by first retrieving the request and then using the request object's `get_communications()` method. @@ -153,4 +169,4 @@ Now that we have each file we can easily retrieve the link to each file :: https://cdn.muckrock.com/foia_files/12-2-14_MR14313_INT_ID1313992-000.pdf https://cdn.muckrock.com/foia_files/2024/02/01/20-00038-FR.pdf https://cdn.muckrock.com/foia_files/2024/02/01/REFERRAL_DETERMINATION.docx - etc + etc \ No newline at end of file diff --git a/docs/requests.rst b/docs/requests.rst index ded0f82..21f4a94 100644 --- a/docs/requests.rst +++ b/docs/requests.rst @@ -18,7 +18,7 @@ RequestClient .. method:: list(self, **params) - List all FOIA requests with optional filtering and ordering. Available filters include: + List all FOIA requests with optional filtering. Available filters include: - **user**: Filter by the user ID of the person who filed the request. - **title**: Filter by the title of the request. @@ -35,18 +35,7 @@ RequestClient - **datetime_done__lte**: Requests where the response was received on or before this date. - **search**: An optional search term. For example, you can search for any request that mentions recipes. - Ordering options are available, including: - - - **title**: Sort by the request title. - - **status**: Sort by the request status. - - **agency**: Sort by the agency handling the request. - - **user**: Sort by the user who filed the request. - - **datetime_submitted**: Sort by the date the request was submitted. - - **datetime_done**: Sort by the date the request was completed. - - Ordering can be specified as either ascending (`ordering=user`) or descending (`ordering=-user`). - - :param params: Query parameters to filter and order results, such as `user`, `title`, `status`, `embargo_status`, `agency`, `tags`, `jurisdiction`, the date range filters, and `search`, along with `ordering`. + :param params: Query parameters to filter results, such as `user`, `title`, `status`, `embargo_status`, `agency`, `tags`, `jurisdiction`, the date range filters, and `search`. :return: An :class:`APIResults` object containing the list of FOIA requests. .. method:: retrieve(self, request_id) @@ -163,4 +152,4 @@ Request .. attribute:: price - The cost of processing this request, if applicable. + The cost of processing this request, if applicable. \ No newline at end of file From 87c007c9fbd321b53e256ff94fac60ab1a15112a Mon Sep 17 00:00:00 2001 From: Sanjin <102841251+duckduckgrayduck@users.noreply.github.com> Date: Mon, 2 Nov 2026 18:10:45 -0600 Subject: [PATCH 5/5] More fixes --- docs/jurisdictions.rst | 8 ++++++++ docs/requests.rst | 23 ++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/jurisdictions.rst b/docs/jurisdictions.rst index 850e239..7c18e83 100644 --- a/docs/jurisdictions.rst +++ b/docs/jurisdictions.rst @@ -81,3 +81,11 @@ Jurisdiction .. attribute:: parent The ID of the parent jurisdiction, defining the hierarchy between jurisdictions. A jurisdiction can have a federal or state parent, while local jurisdictions cannot be parents. + + .. attribute:: parent_name + + The name of the parent jurisdiction (e.g., ``United States of America``). + + .. attribute:: parent_abbrev + + The abbreviation of the parent jurisdiction (e.g., ``USA``). \ No newline at end of file diff --git a/docs/requests.rst b/docs/requests.rst index 21f4a94..7b9d89e 100644 --- a/docs/requests.rst +++ b/docs/requests.rst @@ -51,9 +51,10 @@ RequestClient :param title: The title of the FOIA request. (Required) :param requested_docs: A description of the documents being requested. (Required) - :param organization: The ID of the organization requesting the FOIA documents. + :param organization: The ID of the organization requesting the FOIA documents. (Required) :param agencies: A list of agency IDs involved in the request. (Required) - :param embargo_status: The embargo status of the request (default is "public"). + :param embargo_status: The embargo status of the request (default is "public"). Embargoing requires a paid subscription. + :param edited_boilerplate: If ``True``, ``requested_docs`` is used as the full text of the request instead of being inserted into MuckRock's standard request template (default is ``False``). Passed through ``kwargs``. Note that this also skips the proxy template language included for agencies in states with in-state residency requirements. :param kwargs: Additional parameters to be included in the request. :return: A URL linking to the newly created FOIA request(s). :raises: ValueError if `agencies` is not a non-empty list. @@ -114,6 +115,10 @@ Request The ID of the agency that the request was submitted to. + .. attribute:: composer + + The ID of the composer that created this request. Requests filed together in a multi-request share the same composer. + .. attribute:: embargo_status The embargo status of the request, indicating its visibility. Options include: @@ -152,4 +157,16 @@ Request .. attribute:: price - The cost of processing this request, if applicable. \ No newline at end of file + The cost of processing this request, if applicable. + + .. attribute:: tags + + A list of tags associated with this request. + + .. attribute:: edited_boilerplate + + A boolean indicating whether ``requested_docs`` was used as the full text of the request instead of MuckRock's standard request template. + + .. attribute:: date_due + + The date a response from the agency is due, based on the statutory deadline for the request's jurisdiction. \ No newline at end of file