everyaction.services.ActivistCodes

class everyaction.services.ActivistCodes(ea: EAClient)

Represents the Activist Codes service.

Methods

find(name)

Find an activist code with exactly the given name.

find_each(names)

Find an activist code for each of the given names.

get(code_id, /)

See GET /activistCodes/{activistCodeId}.

list(*[, limit])

See GET /activistCodes.

find(name: str) ActivistCode

Find an activist code with exactly the given name.

Parameters

name – Name of activist code to find.

Returns

The resulting ActivistCode.

Raises

EAException – If the activist code could not be found or if multiple activist codes exist with that name.

find_each(names: Iterable[str]) Dict[str, ActivistCode]

Find an activist code for each of the given names.

Parameters

names – Names of activist codes to find.

Returns

{Name: ActivistCode} for each activist code found.

Raises

EAException – If any activist code could not be found or if multiple activist codes exist with the name of any requested activist code.

get(code_id: Union[int, str], /) ActivistCode

See GET /activistCodes/{activistCodeId}.

Parameters

code_id – The activistCodeId path parameter.

Returns

The resulting ActivistCode object.

list(*, limit: Optional[int] = None, **kwargs: EAValue) List[ActivistCode]

See GET /activistCodes.

Parameters
  • limit – Maximum number of records to get for this request.

  • kwargs – The applicable query arguments and JSON data for the request.

Returns

List of the resulting ActivistCode objects.

Keyword Arguments
  • name

  • statuses

  • type