Skip to content

Add name, majority and party of MP to overview #16

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

Open
jacksegal opened this issue Apr 8, 2025 · 0 comments
Open

Add name, majority and party of MP to overview #16

jacksegal opened this issue Apr 8, 2025 · 0 comments

Comments

@jacksegal
Copy link
Collaborator

jacksegal commented Apr 8, 2025

Image

https://members-api.parliament.uk/index.html

{
  "value": {
    "result": "Lab Gain",
    "isNotional": false,
    "electorate": 73554,
    "turnout": 44165,
    "majority": 8167,
    "winningParty": {
      "id": 15,
      "name": "Labour",
      "abbreviation": "Lab",
      "backgroundColour": "d50000",
      "foregroundColour": "ffffff",
      "isLordsMainParty": true,
      "isLordsSpiritualParty": true,
      "governmentType": null,
      "isIndependentParty": false
    },
    "electionTitle": "2024 General Election",
    "electionDate": "2024-07-04T00:00:00",
    "electionId": 422,
    "isGeneralElection": true,
    "constituencyName": "Midlothian",
    "candidates": [
      {
        "memberId": null,
        "name": "Daniel Fraser",
        "party": {
          "id": 1091,
          "name": "Scottish Libertarian Party",
          "abbreviation": "Scot Libt",
          "backgroundColour": null,
          "foregroundColour": null,
          "isLordsMainParty": false,
          "isLordsSpiritualParty": false,
          "governmentType": null,
          "isIndependentParty": false
        },
        "resultChange": "",
        "rankOrder": 6,
        "votes": 259,
        "voteShare": 0.005864372240461904
      },
      {
        "memberId": null,
        "name": "Ross Laird",
        "party": {
          "id": 17,
          "name": "Liberal Democrat",
          "abbreviation": "LD",
          "backgroundColour": "faa01a",
          "foregroundColour": "FFFFFF",
          "isLordsMainParty": true,
          "isLordsSpiritualParty": false,
          "governmentType": null,
          "isIndependentParty": false
        },
        "resultChange": "-1.2%",
        "rankOrder": 5,
        "votes": 2589,
        "voteShare": 0.05862108004075625
      },
      {
        "memberId": null,
        "name": "Keith Cockburn",
        "party": {
          "id": 4,
          "name": "Conservative",
          "abbreviation": "Con",
          "backgroundColour": "0063ba",
          "foregroundColour": "ffffff",
          "isLordsMainParty": true,
          "isLordsSpiritualParty": false,
          "governmentType": null,
          "isIndependentParty": false
        },
        "resultChange": "-14.4%",
        "rankOrder": 4,
        "votes": 3248,
        "voteShare": 0.07354239782633307
      },
      {
        "memberId": null,
        "name": "Stefan Garbowski",
        "party": {
          "id": 1036,
          "name": "Reform UK",
          "abbreviation": "RUK",
          "backgroundColour": "12b6cf",
          "foregroundColour": "ffffff",
          "isLordsMainParty": false,
          "isLordsSpiritualParty": false,
          "governmentType": null,
          "isIndependentParty": false
        },
        "resultChange": "",
        "rankOrder": 3,
        "votes": 3276,
        "voteShare": 0.07417638401449111
      },
      {
        "memberId": null,
        "name": "Owen Thompson",
        "party": {
          "id": 29,
          "name": "Scottish National Party",
          "abbreviation": "SNP",
          "backgroundColour": "fff685",
          "foregroundColour": "000000",
          "isLordsMainParty": false,
          "isLordsSpiritualParty": false,
          "governmentType": null,
          "isIndependentParty": false
        },
        "resultChange": "-11.4%",
        "rankOrder": 2,
        "votes": 13313,
        "voteShare": 0.301437790105287
      },
      {
        "memberId": null,
        "name": "Kirsty McNeill",
        "party": {
          "id": 15,
          "name": "Labour",
          "abbreviation": "Lab",
          "backgroundColour": "d50000",
          "foregroundColour": "ffffff",
          "isLordsMainParty": true,
          "isLordsSpiritualParty": true,
          "governmentType": null,
          "isIndependentParty": false
        },
        "resultChange": "18.9%",
        "rankOrder": 1,
        "votes": 21480,
        "voteShare": 0.4863579757726707
      }
    ]
  },
  "links": [
    {
      "rel": "self",
      "href": "Constituency/4445/ElectionResult/Latest",
      "method": "GET"
    }
  ]
}
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

No branches or pull requests

1 participant