# Class DoceoClient

Client for fetching plenary vote data from the EP DOCEO XML endpoint.

This provides more recent vote data than the EP Open Data API, which has a delay of several weeks for publishing roll-call vote results.

#### Security

- URL construction is validated (HTTPS only, known host)
- XML parsing uses regex-based extraction (no eval/dynamic code execution)
- Response size limited to prevent memory exhaustion
- All access is audit-logged

- Defined in clients/ep/doceoClient.ts:147

##### Index

### Constructors

constructor

### Properties

term

### Methods

fetchRcvForDate
fetchVotesForDate
fetchVotForDate
fetchXml
getLatestVotes
resolveDates

## Constructors

### constructor

- new DoceoClient(term?: number): DoceoClient

  #### Parameters

  - term: number = CURRENT_PARLIAMENTARY_TERM

  #### Returns DoceoClient

  - Defined in clients/ep/doceoClient.ts:150

## Properties

### `Private` `Readonly` term

term: number

- Defined in clients/ep/doceoClient.ts:148

## Methods

### fetchRcvForDate

- fetchRcvForDate(
  date: string,
  term?: number,
  abortSignal?: AbortSignal,
  ): Promise<RcvVoteResult[]>

  Fetch roll-call vote data for a specific date.

  #### Parameters

  - date: string

    Date in YYYY-MM-DD format

  - term: number = ...
  - `Optional` abortSignal: AbortSignal

  #### Returns Promise<RcvVoteResult[]>

  Parsed RCV results, or empty array if unavailable

  - Defined in clients/ep/doceoClient.ts:213

### `Private` fetchVotesForDate

- fetchVotesForDate(
  date: string,
  term: number,
  includeIndividual: boolean,
  abortSignal?: AbortSignal,
  ): Promise<{ url: string; votes: LatestVoteRecord[] } | null>

  Fetch votes for a single date, trying RCV first then VOT.

  #### Parameters

  - date: string
  - term: number
  - includeIndividual: boolean
  - `Optional` abortSignal: AbortSignal

  #### Returns Promise<{ url: string; votes: LatestVoteRecord[] } | null>

  #### Private

  - Defined in clients/ep/doceoClient.ts:245

### fetchVotForDate

- fetchVotForDate(
  date: string,
  term?: number,
  abortSignal?: AbortSignal,
  ): Promise<VotVoteResult[]>

  Fetch aggregate vote results for a specific date.

  #### Parameters

  - date: string

    Date in YYYY-MM-DD format

  - term: number = ...
  - `Optional` abortSignal: AbortSignal

  #### Returns Promise<VotVoteResult[]>

  Parsed VOT results, or empty array if unavailable

  - Defined in clients/ep/doceoClient.ts:230

### `Private` fetchXml

- fetchXml(url: string, abortSignal?: AbortSignal): Promise<string | null>

  Fetch a single XML document from DOCEO.

  #### Parameters

  - url: string

    Full URL to the XML document

  - `Optional` abortSignal: AbortSignal

  #### Returns Promise<string | null>

  Raw XML string, or null if document not available

  - Defined in clients/ep/doceoClient.ts:160

### getLatestVotes

- getLatestVotes(params?: GetLatestVotesParams): Promise<LatestVotesResponse>

  Get the latest votes from DOCEO XML sources.

  Attempts to fetch both RCV (individual MEP votes) and VOT (aggregate results) for each day in the plenary week. RCV data is preferred as it includes individual MEP positions and political group breakdowns.

  #### Parameters

  - params: GetLatestVotesParams = {}

    Query parameters

  #### Returns Promise<LatestVotesResponse>

  Latest votes response with available data

  #### Security

  Audit-logged per GDPR Article 30

  - Defined in clients/ep/doceoClient.ts:295

### `Private` resolveDates

- resolveDates(params: GetLatestVotesParams): string[]

  Determine which dates to query based on params.

  #### Parameters

  - params: GetLatestVotesParams

  #### Returns string[]

  #### Private

  - Defined in clients/ep/doceoClient.ts:276