ProjectController

class pyinaturalist.controllers.ProjectController(client)

Bases: pyinaturalist.controllers.base.BaseController

Controller for Project requests

Methods

__init__(client)
add_observations(project_id, *observation_ids, **params)

Add an observation to a project

Parameters
  • project_id (int) – ID of project to add onto

  • observation_ids (int) – One or more observation IDs to add

Return type

List[Dict[str, Any]]

from_id(*project_ids, **params)

Get projects by ID

Parameters

project_ids (Union[int, str]) – One or more project IDs

Return type

Paginator[Project]

search(**params)

Search projects

Notes

Parameters
  • q (Optional[str]) – Project name must begin with this value

  • id (Union[int, Iterable[int], None]) – Must have this ID

  • not_id (Union[int, Iterable[int], None]) – Must not have this ID

  • lat (Optional[float]) – Must be within a radius kilometer circle around this lat/lng

  • lng (Optional[float]) – Must be within a radius kilometer circle around this lat/lng

  • radius (int) – Distance from center ((lat, lng)) to search, in kilometers. Defaults to 500km.

  • featured (Optional[bool]) – Must be marked featured for the relevant site

  • noteworthy (Optional[bool]) – Must be marked noteworthy for the relevant site

  • place_id (Union[int, Iterable[int], None]) – Must be in the place with this ID

  • site_id (Optional[int]) – Site ID that applies to featured and noteworthy. Defaults to the site of the authenticated user, or to the main iNaturalist site

  • rule_details (Optional[bool]) – Return more information about project rules, for example return a full taxon object instead of simply an ID

  • type (Union[str, Iterable[str], None]) – Projects must be of this type

  • member_id (Optional[int]) – Project must have member with this user ID

  • has_params (Optional[bool]) – Must have search parameter requirements

  • has_posts (Optional[bool]) – Must have posts

  • order_by (Optional[str]) – Sort order. distance only applies if lat and lng are specified. featured only applies if featured or noteworthy are true. unless otherwise noted

  • order_by – Field to sort on

  • reverse (Optional[bool]) – Reverse the order of results; alias for order='descending'

Return type

Paginator[Project]