NAME

WebService::UK::Parliament::Bills - Query the UK Parliament Bills API

VERSION

Version 1.00

SYNOPSIS

use WebService::UK::Parliament::Bills;

my $client = WebService::UK::Parliament::Bills->new();

my $data = $client->$endpoint($params);

DESCRIPTION

The following documentation is automatically generated using the UK Parliament OpenAPI specification.

An API which retrieves Members data.

Sections

Location

getLocationBrowse

Returns a list of locations, both parent and child

Method

get

Path

/api/Location/Browse/{locationType}/{locationName}

Parameters

locationType

Location by type of location

integer

0 1 2 3

locationName

Location by name specified

string

getLocationConstituencySearch

Returns a list of constituencies

Method

get

Path

/api/Location/Constituency/Search

Parameters

searchText

Constituencies containing serach term in their name

string

skip

The number of records to skip from the first, default is 0

integer

format: int32

take

The number of records to return, default is 20. Maximum is 20

integer

format: int32

getLocationConstituency

Returns a constituency by ID

Method

get

Path

/api/Location/Constituency/{id}

Parameters

id

Constituency by ID

integer

format: int32

getLocationConstituencyElectionResultLatest

Returns latest election result by constituency id

Method

get

Path

/api/Location/Constituency/{id}/ElectionResult/Latest

Parameters

id

Latest election result by constituency id

integer

format: int32

getLocationConstituencyElectionResult

Returns an election result by constituency and election id

Method

get

Path

/api/Location/Constituency/{id}/ElectionResult/{electionId}

Parameters

id

Election result by constituency id

integer

format: int32

electionId

Election result by election id

integer

format: int32

getLocationConstituencyElectionResults

Returns a list of election results by constituency ID

Method

get

Path

/api/Location/Constituency/{id}/ElectionResults

Parameters

id

Elections results by constituency ID

integer

format: int32

getLocationConstituencyGeometry

Returns geometry by constituency ID

Method

get

Path

/api/Location/Constituency/{id}/Geometry

Parameters

id

Geometry by constituency ID

integer

format: int32

getLocationConstituencyRepresentations

Returns a list of representations by constituency ID

Method

get

Path

/api/Location/Constituency/{id}/Representations

Parameters

id

Representations by constituency ID

integer

format: int32

getLocationConstituencySynopsis

Returns a synopsis by constituency ID

Method

get

Path

/api/Location/Constituency/{id}/Synopsis

Parameters

id

Synopsis by constituency ID

integer

format: int32

LordsInterests

getLordsInterestsRegister

Returns a list of registered interests

Method

get

Path

/api/LordsInterests/Register

Parameters

searchTerm

Registered interests containing search term

string

page

Page of results to return, default 0. Results per page 20.

integer

format: int32

includeDeleted

Registered interests that have been deleted

boolean

getLordsInterestsStaff

Returns a list of staff

Method

get

Path

/api/LordsInterests/Staff

Parameters

searchTerm

Staff containing search term

string

page

Page of results to return, default 0. Results per page 20.

integer

format: int32

Members

getMembersHistory

Return members by ID with list of their historical names, parties and memberships

Method

get

Path

/api/Members/History

Parameters

ids

List of MemberIds to find

array

{"type":"integer","format":"int32"}

getMembersSearch

Returns a list of current members of the Commons or Lords

Method

get

Path

/api/Members/Search

Parameters

Name

Members where name contains term specified

string

Location

Members where postcode or geographical location matches the term specified

string

PostTitle

Members which have held the post specified

string

PartyId

Members which are currently affiliated with party with party ID

integer

format: int32

House

Members where their most recent house is the house specified

integer

1 2

ConstituencyId

Members which currently hold the constituency with constituency id

integer

format: int32

NameStartsWith

Members with surname begining with letter(s) specified

string

Gender

Members with the gender specified

string

MembershipStartedSince

Members who started on or after the date given

string

format: date-time

MembershipEnded.MembershipEndedSince

Members who left the House on or after the date given

string

format: date-time

MembershipEnded.MembershipEndReasonIds

array

{"format":"int32","type":"integer"}

MembershipInDateRange.WasMemberOnOrAfter

Members who were active on or after the date specified

string

format: date-time

MembershipInDateRange.WasMemberOnOrBefore

Members who were active on or before the date specified

string

format: date-time

MembershipInDateRange.WasMemberOfHouse

Members who were active in the house specifid

integer

1 2

IsEligible

Members currently Eligible to sit in their House

boolean

IsCurrentMember

Members who are current or former members

boolean

PolicyInterestId

Members with specified policy interest

integer

format: int32

Experience

Members with specified experience

string

skip

The number of records to skip from the first, default is 0

integer

format: int32

take

The number of records to return, default is 20. Maximum is 20

integer

format: int32

getMembersSearchHistorical

Returns a list of members of the Commons or Lords

Method

get

Path

/api/Members/SearchHistorical

Parameters

name

Members with names containing the term specified

string

dateToSearchFor

Members that were an active member of the Commons or Lords on the date specified

string

format: date-time

skip

The number of records to skip from the first, default is 0

integer

format: int32

take

The number of records to return, default is 20. Maximum is 20

integer

format: int32

getMembers

Return member by ID

Method

get

Path

/api/Members/{id}

Parameters

id

Member by ID specified

integer

format: int32

detailsForDate

Member object will be populated with details from the date specified

string

format: date-time

getMembersBiography

Return biography of member by ID

Method

get

Path

/api/Members/{id}/Biography

Parameters

id

Biography of Member by ID specified

integer

format: int32

getMembersContact

Return list of contact details of member by ID

Method

get

Path

/api/Members/{id}/Contact

Parameters

id

Contact details of Member by ID specified

integer

format: int32

getMembersContributionSummary

Return contribution summary of member by ID

Method

get

Path

/api/Members/{id}/ContributionSummary

Parameters

id

Contribution summary of Member by ID specified

integer

format: int32

page

integer

format: int32

getMembersEdms

Return list of early day motions of member by ID

Method

get

Path

/api/Members/{id}/Edms

Parameters

id

Early day motions of Member by ID specified

integer

format: int32

page

integer

format: int32

getMembersExperience

Return experience of member by ID

Method

get

Path

/api/Members/{id}/Experience

Parameters

id

Experience of Member by ID specified

integer

format: int32

getMembersFocus

Return list of areas of focus of member by ID

Method

get

Path

/api/Members/{id}/Focus

Parameters

id

Areas of focus of Member by ID specified

integer

format: int32

getMembersLatestElectionResult

Return latest election result of member by ID

Method

get

Path

/api/Members/{id}/LatestElectionResult

Parameters

id

Latest election result of Member by ID specified

integer

format: int32

getMembersPortrait

Return portrait of member by ID

Method

get

Path

/api/Members/{id}/Portrait

Parameters

id

Portrait of Member by ID specified

integer

format: int32

cropType

integer

0 1 2 3

webVersion

boolean

getMembersPortraitUrl

Return portrait url of member by ID

Method

get

Path

/api/Members/{id}/PortraitUrl

Parameters

id

Portrait url of Member by ID specified

integer

format: int32

getMembersRegisteredInterests

Return list of registered interests of member by ID

Method

get

Path

/api/Members/{id}/RegisteredInterests

Parameters

id

Registered interests of Member by ID specified

integer

format: int32

getMembersStaff

Return list of staff of member by ID

Method

get

Path

/api/Members/{id}/Staff

Parameters

id

Staff of Member by ID specified

integer

format: int32

getMembersSynopsis

Return synopsis of member by ID

Method

get

Path

/api/Members/{id}/Synopsis

Parameters

id

Synopsis of Member by ID specified

integer

format: int32

getMembersThumbnail

Return thumbnail of member by ID

Method

get

Path

/api/Members/{id}/Thumbnail

Parameters

id

Thumbnail of Member by ID specified

integer

format: int32

getMembersThumbnailUrl

Return thumbnail url of member by ID

Method

get

Path

/api/Members/{id}/ThumbnailUrl

Parameters

id

Thumbnail url of Member by ID specified

integer

format: int32

getMembersVoting

Return list of votes by member by ID

Method

get

Path

/api/Members/{id}/Voting

Parameters

id

Votes by Member by ID specified

integer

format: int32

house

integer

1 2

page

integer

format: int32

getMembersWrittenQuestions

Return list of written questions by member by ID

Method

get

Path

/api/Members/{id}/WrittenQuestions

Parameters

id

Written questions by Member by ID specified

integer

format: int32

page

integer

format: int32

Parties

getPartiesGetActive

Returns a list of current parties with at least one active member.

Method

get

Path

/api/Parties/GetActive/{house}

Parameters

house

Current parties by house

integer

1 2

getPartiesLordsByType

Returns the composition of the House of Lords by peerage type.

Method

get

Path

/api/Parties/LordsByType/{forDate}

Parameters

forDate

Composition of the Lords for date specified.

string

format: date-time

getPartiesStateOfTheParties

Returns current state of parties

Method

get

Path

/api/Parties/StateOfTheParties/{house}/{forDate}

Parameters

house

State of parties in Commons or Lords.

integer

1 2

forDate

State of parties for the date specified

string

format: date-time

Posts

getPostsDepartments

Returns a list of departments.

Method

get

Path

/api/Posts/Departments/{type}

Parameters

type

Departments by type

integer

0 1 2

getPostsGovernmentPosts

Returns a list of government posts.

Method

get

Path

/api/Posts/GovernmentPosts

Parameters

departmentId

Government posts by department ID

integer

format: int32

getPostsOppositionPosts

Returns a list of opposition posts.

Method

get

Path

/api/Posts/OppositionPosts

Parameters

departmentId

Opposition posts by department ID

integer

format: int32

getPostsSpeakerAndDeputies

Returns a list containing the speaker and deputy speakers.

Method

get

Path

/api/Posts/SpeakerAndDeputies/{forDate}

Parameters

forDate

Speaker and deputy speakers for date specified

string

format: date-time

getPostsSpokespersons

Returns a list of spokespersons.

Method

get

Path

/api/Posts/Spokespersons

Parameters

partyId

Spokespersons by party ID

integer

format: int32

Reference

getReferenceAnsweringBodies

Returns a list of answering bodies.

Method

get

Path

/api/Reference/AnsweringBodies

Parameters

id

integer

format: int32

nameContains

string

getReferenceDepartments

Returns a list of departments.

Method

get

Path

/api/Reference/Departments

Parameters

id

integer

format: int32

nameContains

string

Returns department logo.

Method

get

Path

/api/Reference/Departments/{id}/Logo

Parameters

id

Logo by department ID

integer

format: int32

getReferencePolicyInterests

Returns a list of policy interest.

Method

get

Path

/api/Reference/PolicyInterests

AUTHOR

LNATION, <thisusedtobeanemail at gmail.com>

BUGS

Please report any bugs or feature requests to bug-webservice-uk-parliament at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-UK-Parliament. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc WebService::UK::Parliament

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

The first ticehurst bathroom experience

This software is Copyright (c) 2022 by LNATION.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)