Skip to content

Resource WorkOfferResource

CrucifiedPain edited this page Jun 26, 2026 · 11 revisions

WorkOfferResource (client.work_offer)

Endpoints: • workOffer.getById • workOffer.getWorkOfferByCompanyId • workOffer.getWorkOffersPaginated (cursor-paginated) • workOffer.getWageStats

.collect_all()

Fetch all items across all pages concurrently using parallel time-slicing.

Signature

await client.workoffer.collect_all(**kwargs: 'typing.Any') -> 'list[WorkOffer]'

Parameters

Name Type Default
kwargs Any *Required*

Return Models

WorkOffer

Field Type Required Description
_id string \| null
__v integer \| null
companyId string \| null
regionId string \| null
salary number \| null
energy number \| null
production number \| null
citizenship string \| null
positions integer \| null
filled integer \| null
createdAt string \| null

.get()

Get a single work offer by ID.

Signature

await client.workoffer.get(work_offer_id: 'str') -> 'WorkOffer'

Parameters

Name Type Default
work_offer_id str *Required*

Return Models

WorkOffer

Field Type Required Description
_id string \| null
__v integer \| null
companyId string \| null
regionId string \| null
salary number \| null
energy number \| null
production number \| null
citizenship string \| null
positions integer \| null
filled integer \| null
createdAt string \| null

.get_by_company()

Get all work offers posted by a specific company.

Signature

await client.workoffer.get_by_company(company_id: 'str') -> 'list[WorkOffer]'

Parameters

Name Type Default
company_id str *Required*

Return Models

WorkOffer

Field Type Required Description
_id string \| null
__v integer \| null
companyId string \| null
regionId string \| null
salary number \| null
energy number \| null
production number \| null
citizenship string \| null
positions integer \| null
filled integer \| null
createdAt string \| null

.get_paginated()

Get work offers with optional filters (cursor-paginated).

Args: energy: Filter: offers requiring at most this energy. production: Filter: offers with at least this production value. level: Filter: offers requiring at most this user level. citizenship: Filter: offers open to this citizenship.

Signature

await client.workoffer.get_paginated(*, limit: 'int' = 10, cursor: 'str | None' = None, user_id: 'str | None' = None, region_id: 'str | None' = None, energy: 'float | None' = None, production: 'float | None' = None, level: 'float | None' = None, citizenship: 'str | None' = None, auto_items: 'bool' = False, max_pages: 'int | float' = inf, cursor_end: 'str | None' = None) -> 'CursorPage[WorkOffer] | AsyncIterator[WorkOffer]'

Parameters

Name Type Default
limit int 10
cursor str | None None
user_id str | None None
region_id str | None None
energy float | None None
production float | None None
level float | None None
citizenship str | None None
auto_items bool False
max_pages int | float inf
cursor_end str | None None

Return Models

CursorPage[WorkOffer]

Field Type Required Description
_id string \| null
__v integer \| null
items array[WorkOffer]
nextCursor string \| null
hasMore boolean

WorkOffer

Field Type Required Description
_id string \| null
__v integer \| null
companyId string \| null
regionId string \| null
salary number \| null
energy number \| null
production number \| null
citizenship string \| null
positions integer \| null
filled integer \| null
createdAt string \| null

.get_wage_stats()

Get wage statistics for a given worker profile — the range of allowed wages, the top market offer, and the best offers this worker is eligible for.

Args: energy: The worker's energy stat. production: The worker's production stat. citizenship: The worker's citizenship country ID or code.

Returns: A :class:WageStats object.

Signature

await client.workoffer.get_wage_stats(*, energy: 'float', production: 'float', citizenship: 'str') -> 'WageStats'

Parameters

Name Type Default
energy float *Required*
production float *Required*
citizenship str *Required*

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

await client.workoffer.invalidate_cache() -> 'None'

Clone this wiki locally