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

bug(congress): The /congress endpoint doesn't return the number field. #286

Open
erickoledadevrel opened this issue Nov 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@erickoledadevrel
Copy link

Repro

Call the /congress endpoint to list the congresses.

Expected

For each item returned in the congresses field, the number field is present.

Actual

The items returned don't include that field.

{
    "congresses": [
        {
            "endYear": "2024",
            "name": "118th Congress",
            "sessions": [
                {
                    "chamber": "House of Representatives",
                    "endDate": "2024-01-03",
                    "number": 1,
                    "startDate": "2023-01-03",
                    "type": "R"
                },
                {
                    "chamber": "Senate",
                    "endDate": "2024-01-03",
                    "number": 1,
                    "startDate": "2023-01-03",
                    "type": "R"
                },
                {
                    "chamber": "Senate",
                    "number": 2,
                    "startDate": "2024-01-03",
                    "type": "R"
                },
                {
                    "chamber": "House of Representatives",
                    "number": 2,
                    "startDate": "2024-01-03",
                    "type": "R"
                }
            ],
            "startYear": "2023",
            "url": "https://api.congress.gov/v3/congress/118?format=json"
        }
    ],
    "pagination": {
        "count": 118,
        "next": "https://api.congress.gov/v3/congress?offset=1&limit=1&format=json"
    },
    "request": {
        "contentType": "application/json",
        "format": "json"
    }
}

Notes

When you request an individual congress using /congress/<number> the number field is returned on the item.

{
    "congress": {
        "endYear": "2024",
        "name": "118th Congress",
        "number": 118,
        "sessions": [
            {
                "chamber": "House of Representatives",
                "endDate": "2024-01-03",
                "number": 1,
                "startDate": "2023-01-03",
                "type": "R"
            },
            {
                "chamber": "Senate",
                "endDate": "2024-01-03",
                "number": 1,
                "startDate": "2023-01-03",
                "type": "R"
            },
            {
                "chamber": "Senate",
                "number": 2,
                "startDate": "2024-01-03",
                "type": "R"
            },
            {
                "chamber": "House of Representatives",
                "number": 2,
                "startDate": "2024-01-03",
                "type": "R"
            }
        ],
        "startYear": "2023",
        "updateDate": "2023-01-03T17:43:32Z",
        "url": "https://api.congress.gov/v3/congress/118?format=json"
    },
    "request": {
        "congress": "118",
        "contentType": "application/json",
        "format": "json"
    }
}
@erickoledadevrel erickoledadevrel changed the title The /congress endpoint doesn't return the number field. bug(congress): The /congress endpoint doesn't return the number field. Nov 7, 2024
@apreiter18
Copy link
Collaborator

apreiter18 commented Nov 7, 2024

Hi @erickoledadevrel - I hope I am understanding this correctly, please correct me if I am not. When I make this call (e.g., https://api.congress.gov/v3/congress/116.json?api_key=INSERT_YOUR_KEY), I do see a <number> value. However, this does not display on the list-level. I can discuss adding this with our developers. Please stay tuned. Thanks!

@apreiter18 apreiter18 added the enhancement New feature or request label Nov 7, 2024
@apreiter18 apreiter18 added this to the Possible future development milestone Nov 7, 2024
@erickoledadevrel
Copy link
Author

That's correct @apreiter18, it's present when fetching an individual congress but not when listing them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants