phoebe 0.1.0.pre.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +52 -0
- data/README.md +235 -0
- data/SECURITY.md +27 -0
- data/lib/phoebe/client.rb +80 -0
- data/lib/phoebe/errors.rb +228 -0
- data/lib/phoebe/file_part.rb +58 -0
- data/lib/phoebe/internal/transport/base_client.rb +573 -0
- data/lib/phoebe/internal/transport/pooled_net_requester.rb +208 -0
- data/lib/phoebe/internal/type/array_of.rb +168 -0
- data/lib/phoebe/internal/type/base_model.rb +531 -0
- data/lib/phoebe/internal/type/base_page.rb +55 -0
- data/lib/phoebe/internal/type/boolean.rb +77 -0
- data/lib/phoebe/internal/type/converter.rb +327 -0
- data/lib/phoebe/internal/type/enum.rb +131 -0
- data/lib/phoebe/internal/type/file_input.rb +111 -0
- data/lib/phoebe/internal/type/hash_of.rb +188 -0
- data/lib/phoebe/internal/type/request_parameters.rb +42 -0
- data/lib/phoebe/internal/type/union.rb +237 -0
- data/lib/phoebe/internal/type/unknown.rb +81 -0
- data/lib/phoebe/internal/util.rb +915 -0
- data/lib/phoebe/internal.rb +20 -0
- data/lib/phoebe/models/data/observation.rb +107 -0
- data/lib/phoebe/models/data/observations/geo/recent/notable_list_params.rb +95 -0
- data/lib/phoebe/models/data/observations/geo/recent/notable_list_response.rb +16 -0
- data/lib/phoebe/models/data/observations/geo/recent/specie_list_params.rb +84 -0
- data/lib/phoebe/models/data/observations/geo/recent/specie_list_response.rb +16 -0
- data/lib/phoebe/models/data/observations/geo/recent_list_params.rb +126 -0
- data/lib/phoebe/models/data/observations/geo/recent_list_response.rb +14 -0
- data/lib/phoebe/models/data/observations/nearest/geo_specie_list_params.rb +82 -0
- data/lib/phoebe/models/data/observations/nearest/geo_specie_list_response.rb +14 -0
- data/lib/phoebe/models/data/observations/recent/historic_list_params.rb +144 -0
- data/lib/phoebe/models/data/observations/recent/historic_list_response.rb +14 -0
- data/lib/phoebe/models/data/observations/recent/notable_list_params.rb +79 -0
- data/lib/phoebe/models/data/observations/recent/notable_list_response.rb +14 -0
- data/lib/phoebe/models/data/observations/recent/specie_retrieve_params.rb +75 -0
- data/lib/phoebe/models/data/observations/recent/specie_retrieve_response.rb +14 -0
- data/lib/phoebe/models/data/observations/recent_list_params.rb +91 -0
- data/lib/phoebe/models/data/observations/recent_list_response.rb +12 -0
- data/lib/phoebe/models/product/checklist_view_params.rb +16 -0
- data/lib/phoebe/models/product/checklist_view_response.rb +291 -0
- data/lib/phoebe/models/product/list_retrieve_params.rb +24 -0
- data/lib/phoebe/models/product/list_retrieve_response.rb +295 -0
- data/lib/phoebe/models/product/lists/historical_retrieve_params.rb +66 -0
- data/lib/phoebe/models/product/lists/historical_retrieve_response.rb +297 -0
- data/lib/phoebe/models/product/species_list_list_params.rb +16 -0
- data/lib/phoebe/models/product/species_list_list_response.rb +10 -0
- data/lib/phoebe/models/product/stat_retrieve_params.rb +34 -0
- data/lib/phoebe/models/product/stat_retrieve_response.rb +30 -0
- data/lib/phoebe/models/product/top100_retrieve_params.rb +64 -0
- data/lib/phoebe/models/product/top100_retrieve_response.rb +51 -0
- data/lib/phoebe/models/ref/hotspot/geo_retrieve_params.rb +67 -0
- data/lib/phoebe/models/ref/hotspot/geo_retrieve_response.rb +71 -0
- data/lib/phoebe/models/ref/hotspot/info_retrieve_params.rb +18 -0
- data/lib/phoebe/models/ref/hotspot/info_retrieve_response.rb +92 -0
- data/lib/phoebe/models/ref/hotspot_list_params.rb +43 -0
- data/lib/phoebe/models/ref/hotspot_list_response.rb +69 -0
- data/lib/phoebe/models/ref/region/adjacent_list_params.rb +18 -0
- data/lib/phoebe/models/ref/region/adjacent_list_response.rb +29 -0
- data/lib/phoebe/models/ref/region/info_retrieve_params.rb +49 -0
- data/lib/phoebe/models/ref/region/info_retrieve_response.rb +55 -0
- data/lib/phoebe/models/ref/region/list_list_params.rb +44 -0
- data/lib/phoebe/models/ref/region/list_list_response.rb +29 -0
- data/lib/phoebe/models/ref/taxonomy/ebird_retrieve_params.rb +69 -0
- data/lib/phoebe/models/ref/taxonomy/ebird_retrieve_response.rb +89 -0
- data/lib/phoebe/models/ref/taxonomy/form_list_params.rb +18 -0
- data/lib/phoebe/models/ref/taxonomy/form_list_response.rb +12 -0
- data/lib/phoebe/models/ref/taxonomy/locale_list_params.rb +24 -0
- data/lib/phoebe/models/ref/taxonomy/locale_list_response.rb +35 -0
- data/lib/phoebe/models/ref/taxonomy/species_group_list_params.rb +41 -0
- data/lib/phoebe/models/ref/taxonomy/species_group_list_response.rb +37 -0
- data/lib/phoebe/models/ref/taxonomy/version_list_params.rb +18 -0
- data/lib/phoebe/models/ref/taxonomy/version_list_response.rb +29 -0
- data/lib/phoebe/models.rb +47 -0
- data/lib/phoebe/request_options.rb +77 -0
- data/lib/phoebe/resources/data/observations/geo/recent/notable.rb +62 -0
- data/lib/phoebe/resources/data/observations/geo/recent/species.rb +78 -0
- data/lib/phoebe/resources/data/observations/geo/recent.rb +75 -0
- data/lib/phoebe/resources/data/observations/geo.rb +22 -0
- data/lib/phoebe/resources/data/observations/nearest/geo_species.rb +64 -0
- data/lib/phoebe/resources/data/observations/nearest.rb +22 -0
- data/lib/phoebe/resources/data/observations/recent/historic.rb +84 -0
- data/lib/phoebe/resources/data/observations/recent/notable.rb +57 -0
- data/lib/phoebe/resources/data/observations/recent/species.rb +74 -0
- data/lib/phoebe/resources/data/observations/recent.rb +72 -0
- data/lib/phoebe/resources/data/observations.rb +28 -0
- data/lib/phoebe/resources/data.rb +18 -0
- data/lib/phoebe/resources/product/checklist.rb +38 -0
- data/lib/phoebe/resources/product/lists/historical.rb +66 -0
- data/lib/phoebe/resources/product/lists.rb +44 -0
- data/lib/phoebe/resources/product/species_list.rb +42 -0
- data/lib/phoebe/resources/product/stats.rb +58 -0
- data/lib/phoebe/resources/product/top100.rb +79 -0
- data/lib/phoebe/resources/product.rb +34 -0
- data/lib/phoebe/resources/ref/hotspot/geo.rb +49 -0
- data/lib/phoebe/resources/ref/hotspot/info.rb +40 -0
- data/lib/phoebe/resources/ref/hotspot.rb +50 -0
- data/lib/phoebe/resources/ref/region/adjacent.rb +40 -0
- data/lib/phoebe/resources/ref/region/info.rb +58 -0
- data/lib/phoebe/resources/ref/region/list.rb +51 -0
- data/lib/phoebe/resources/ref/region.rb +28 -0
- data/lib/phoebe/resources/ref/taxonomy/ebird.rb +51 -0
- data/lib/phoebe/resources/ref/taxonomy/forms.rb +39 -0
- data/lib/phoebe/resources/ref/taxonomy/locales.rb +44 -0
- data/lib/phoebe/resources/ref/taxonomy/species_groups.rb +47 -0
- data/lib/phoebe/resources/ref/taxonomy/versions.rb +37 -0
- data/lib/phoebe/resources/ref/taxonomy.rb +36 -0
- data/lib/phoebe/resources/ref.rb +26 -0
- data/lib/phoebe/version.rb +5 -0
- data/lib/phoebe.rb +139 -0
- data/manifest.yaml +17 -0
- data/rbi/phoebe/client.rbi +55 -0
- data/rbi/phoebe/errors.rbi +205 -0
- data/rbi/phoebe/file_part.rbi +37 -0
- data/rbi/phoebe/internal/transport/base_client.rbi +297 -0
- data/rbi/phoebe/internal/transport/pooled_net_requester.rbi +82 -0
- data/rbi/phoebe/internal/type/array_of.rbi +104 -0
- data/rbi/phoebe/internal/type/base_model.rbi +299 -0
- data/rbi/phoebe/internal/type/base_page.rbi +42 -0
- data/rbi/phoebe/internal/type/boolean.rbi +58 -0
- data/rbi/phoebe/internal/type/converter.rbi +204 -0
- data/rbi/phoebe/internal/type/enum.rbi +82 -0
- data/rbi/phoebe/internal/type/file_input.rbi +59 -0
- data/rbi/phoebe/internal/type/hash_of.rbi +104 -0
- data/rbi/phoebe/internal/type/request_parameters.rbi +29 -0
- data/rbi/phoebe/internal/type/union.rbi +126 -0
- data/rbi/phoebe/internal/type/unknown.rbi +58 -0
- data/rbi/phoebe/internal/util.rbi +484 -0
- data/rbi/phoebe/internal.rbi +16 -0
- data/rbi/phoebe/models/data/observation.rbi +175 -0
- data/rbi/phoebe/models/data/observations/geo/recent/notable_list_params.rbi +172 -0
- data/rbi/phoebe/models/data/observations/geo/recent/notable_list_response.rbi +19 -0
- data/rbi/phoebe/models/data/observations/geo/recent/specie_list_params.rbi +124 -0
- data/rbi/phoebe/models/data/observations/geo/recent/specie_list_response.rbi +19 -0
- data/rbi/phoebe/models/data/observations/geo/recent_list_params.rbi +270 -0
- data/rbi/phoebe/models/data/observations/geo/recent_list_response.rbi +17 -0
- data/rbi/phoebe/models/data/observations/nearest/geo_specie_list_params.rbi +122 -0
- data/rbi/phoebe/models/data/observations/nearest/geo_specie_list_response.rbi +17 -0
- data/rbi/phoebe/models/data/observations/recent/historic_list_params.rbi +324 -0
- data/rbi/phoebe/models/data/observations/recent/historic_list_response.rbi +17 -0
- data/rbi/phoebe/models/data/observations/recent/notable_list_params.rbi +158 -0
- data/rbi/phoebe/models/data/observations/recent/notable_list_response.rbi +17 -0
- data/rbi/phoebe/models/data/observations/recent/specie_retrieve_params.rbi +116 -0
- data/rbi/phoebe/models/data/observations/recent/specie_retrieve_response.rbi +17 -0
- data/rbi/phoebe/models/data/observations/recent_list_params.rbi +192 -0
- data/rbi/phoebe/models/data/observations/recent_list_response.rbi +15 -0
- data/rbi/phoebe/models/product/checklist_view_params.rbi +32 -0
- data/rbi/phoebe/models/product/checklist_view_response.rbi +556 -0
- data/rbi/phoebe/models/product/list_retrieve_params.rbi +48 -0
- data/rbi/phoebe/models/product/list_retrieve_response.rbi +565 -0
- data/rbi/phoebe/models/product/lists/historical_retrieve_params.rbi +130 -0
- data/rbi/phoebe/models/product/lists/historical_retrieve_response.rbi +576 -0
- data/rbi/phoebe/models/product/species_list_list_params.rbi +32 -0
- data/rbi/phoebe/models/product/species_list_list_response.rbi +13 -0
- data/rbi/phoebe/models/product/stat_retrieve_params.rbi +53 -0
- data/rbi/phoebe/models/product/stat_retrieve_response.rbi +61 -0
- data/rbi/phoebe/models/product/top100_retrieve_params.rbi +122 -0
- data/rbi/phoebe/models/product/top100_retrieve_response.rbi +96 -0
- data/rbi/phoebe/models/ref/hotspot/geo_retrieve_params.rbi +127 -0
- data/rbi/phoebe/models/ref/hotspot/geo_retrieve_response.rbi +125 -0
- data/rbi/phoebe/models/ref/hotspot/info_retrieve_params.rbi +34 -0
- data/rbi/phoebe/models/ref/hotspot/info_retrieve_response.rbi +153 -0
- data/rbi/phoebe/models/ref/hotspot_list_params.rbi +81 -0
- data/rbi/phoebe/models/ref/hotspot_list_response.rbi +123 -0
- data/rbi/phoebe/models/ref/region/adjacent_list_params.rbi +34 -0
- data/rbi/phoebe/models/ref/region/adjacent_list_response.rbi +47 -0
- data/rbi/phoebe/models/ref/region/info_retrieve_params.rbi +132 -0
- data/rbi/phoebe/models/ref/region/info_retrieve_response.rbi +117 -0
- data/rbi/phoebe/models/ref/region/list_list_params.rbi +95 -0
- data/rbi/phoebe/models/ref/region/list_list_response.rbi +47 -0
- data/rbi/phoebe/models/ref/taxonomy/ebird_retrieve_params.rbi +139 -0
- data/rbi/phoebe/models/ref/taxonomy/ebird_retrieve_response.rbi +152 -0
- data/rbi/phoebe/models/ref/taxonomy/form_list_params.rbi +34 -0
- data/rbi/phoebe/models/ref/taxonomy/form_list_response.rbi +15 -0
- data/rbi/phoebe/models/ref/taxonomy/locale_list_params.rbi +48 -0
- data/rbi/phoebe/models/ref/taxonomy/locale_list_response.rbi +61 -0
- data/rbi/phoebe/models/ref/taxonomy/species_group_list_params.rbi +90 -0
- data/rbi/phoebe/models/ref/taxonomy/species_group_list_response.rbi +71 -0
- data/rbi/phoebe/models/ref/taxonomy/version_list_params.rbi +34 -0
- data/rbi/phoebe/models/ref/taxonomy/version_list_response.rbi +51 -0
- data/rbi/phoebe/models.rbi +9 -0
- data/rbi/phoebe/request_options.rbi +55 -0
- data/rbi/phoebe/resources/data/observations/geo/recent/notable.rbi +58 -0
- data/rbi/phoebe/resources/data/observations/geo/recent/species.rbi +70 -0
- data/rbi/phoebe/resources/data/observations/geo/recent.rbi +76 -0
- data/rbi/phoebe/resources/data/observations/geo.rbi +19 -0
- data/rbi/phoebe/resources/data/observations/nearest/geo_species.rbi +56 -0
- data/rbi/phoebe/resources/data/observations/nearest.rbi +21 -0
- data/rbi/phoebe/resources/data/observations/recent/historic.rbi +72 -0
- data/rbi/phoebe/resources/data/observations/recent/notable.rbi +54 -0
- data/rbi/phoebe/resources/data/observations/recent/species.rbi +63 -0
- data/rbi/phoebe/resources/data/observations/recent.rbi +68 -0
- data/rbi/phoebe/resources/data/observations.rbi +23 -0
- data/rbi/phoebe/resources/data.rbi +15 -0
- data/rbi/phoebe/resources/product/checklist.rbi +30 -0
- data/rbi/phoebe/resources/product/lists/historical.rbi +52 -0
- data/rbi/phoebe/resources/product/lists.rbi +34 -0
- data/rbi/phoebe/resources/product/species_list.rbi +32 -0
- data/rbi/phoebe/resources/product/stats.rbi +40 -0
- data/rbi/phoebe/resources/product/top100.rbi +63 -0
- data/rbi/phoebe/resources/product.rbi +27 -0
- data/rbi/phoebe/resources/ref/hotspot/geo.rbi +43 -0
- data/rbi/phoebe/resources/ref/hotspot/info.rbi +32 -0
- data/rbi/phoebe/resources/ref/hotspot.rbi +40 -0
- data/rbi/phoebe/resources/ref/region/adjacent.rbi +34 -0
- data/rbi/phoebe/resources/ref/region/info.rbi +51 -0
- data/rbi/phoebe/resources/ref/region/list.rbi +41 -0
- data/rbi/phoebe/resources/ref/region.rbi +23 -0
- data/rbi/phoebe/resources/ref/taxonomy/ebird.rbi +47 -0
- data/rbi/phoebe/resources/ref/taxonomy/forms.rbi +31 -0
- data/rbi/phoebe/resources/ref/taxonomy/locales.rbi +33 -0
- data/rbi/phoebe/resources/ref/taxonomy/species_groups.rbi +41 -0
- data/rbi/phoebe/resources/ref/taxonomy/versions.rbi +26 -0
- data/rbi/phoebe/resources/ref/taxonomy.rbi +29 -0
- data/rbi/phoebe/resources/ref.rbi +21 -0
- data/rbi/phoebe/version.rbi +5 -0
- data/sig/phoebe/client.rbs +30 -0
- data/sig/phoebe/errors.rbs +117 -0
- data/sig/phoebe/file_part.rbs +21 -0
- data/sig/phoebe/internal/transport/base_client.rbs +133 -0
- data/sig/phoebe/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/phoebe/internal/type/array_of.rbs +48 -0
- data/sig/phoebe/internal/type/base_model.rbs +102 -0
- data/sig/phoebe/internal/type/base_page.rbs +24 -0
- data/sig/phoebe/internal/type/boolean.rbs +26 -0
- data/sig/phoebe/internal/type/converter.rbs +79 -0
- data/sig/phoebe/internal/type/enum.rbs +32 -0
- data/sig/phoebe/internal/type/file_input.rbs +25 -0
- data/sig/phoebe/internal/type/hash_of.rbs +48 -0
- data/sig/phoebe/internal/type/request_parameters.rbs +17 -0
- data/sig/phoebe/internal/type/union.rbs +52 -0
- data/sig/phoebe/internal/type/unknown.rbs +26 -0
- data/sig/phoebe/internal/util.rbs +185 -0
- data/sig/phoebe/internal.rbs +9 -0
- data/sig/phoebe/models/data/observation.rbs +129 -0
- data/sig/phoebe/models/data/observations/geo/recent/notable_list_params.rbs +94 -0
- data/sig/phoebe/models/data/observations/geo/recent/notable_list_response.rbs +15 -0
- data/sig/phoebe/models/data/observations/geo/recent/specie_list_params.rbs +81 -0
- data/sig/phoebe/models/data/observations/geo/recent/specie_list_response.rbs +15 -0
- data/sig/phoebe/models/data/observations/geo/recent_list_params.rbs +133 -0
- data/sig/phoebe/models/data/observations/geo/recent_list_response.rbs +13 -0
- data/sig/phoebe/models/data/observations/nearest/geo_specie_list_params.rbs +79 -0
- data/sig/phoebe/models/data/observations/nearest/geo_specie_list_response.rbs +13 -0
- data/sig/phoebe/models/data/observations/recent/historic_list_params.rbs +151 -0
- data/sig/phoebe/models/data/observations/recent/historic_list_response.rbs +13 -0
- data/sig/phoebe/models/data/observations/recent/notable_list_params.rbs +82 -0
- data/sig/phoebe/models/data/observations/recent/notable_list_response.rbs +13 -0
- data/sig/phoebe/models/data/observations/recent/specie_retrieve_params.rbs +74 -0
- data/sig/phoebe/models/data/observations/recent/specie_retrieve_response.rbs +13 -0
- data/sig/phoebe/models/data/observations/recent_list_params.rbs +101 -0
- data/sig/phoebe/models/data/observations/recent_list_response.rbs +11 -0
- data/sig/phoebe/models/product/checklist_view_params.rbs +17 -0
- data/sig/phoebe/models/product/checklist_view_response.rbs +367 -0
- data/sig/phoebe/models/product/list_retrieve_params.rbs +27 -0
- data/sig/phoebe/models/product/list_retrieve_response.rbs +372 -0
- data/sig/phoebe/models/product/lists/historical_retrieve_params.rbs +67 -0
- data/sig/phoebe/models/product/lists/historical_retrieve_response.rbs +374 -0
- data/sig/phoebe/models/product/species_list_list_params.rbs +17 -0
- data/sig/phoebe/models/product/species_list_list_response.rbs +9 -0
- data/sig/phoebe/models/product/stat_retrieve_params.rbs +34 -0
- data/sig/phoebe/models/product/stat_retrieve_response.rbs +38 -0
- data/sig/phoebe/models/product/top100_retrieve_params.rbs +65 -0
- data/sig/phoebe/models/product/top100_retrieve_response.rbs +64 -0
- data/sig/phoebe/models/ref/hotspot/geo_retrieve_params.rbs +69 -0
- data/sig/phoebe/models/ref/hotspot/geo_retrieve_response.rbs +87 -0
- data/sig/phoebe/models/ref/hotspot/info_retrieve_params.rbs +19 -0
- data/sig/phoebe/models/ref/hotspot/info_retrieve_response.rbs +110 -0
- data/sig/phoebe/models/ref/hotspot_list_params.rbs +47 -0
- data/sig/phoebe/models/ref/hotspot_list_response.rbs +85 -0
- data/sig/phoebe/models/ref/region/adjacent_list_params.rbs +19 -0
- data/sig/phoebe/models/ref/region/adjacent_list_response.rbs +28 -0
- data/sig/phoebe/models/ref/region/info_retrieve_params.rbs +62 -0
- data/sig/phoebe/models/ref/region/info_retrieve_response.rbs +70 -0
- data/sig/phoebe/models/ref/region/list_list_params.rbs +50 -0
- data/sig/phoebe/models/ref/region/list_list_response.rbs +28 -0
- data/sig/phoebe/models/ref/taxonomy/ebird_retrieve_params.rbs +73 -0
- data/sig/phoebe/models/ref/taxonomy/ebird_retrieve_response.rbs +108 -0
- data/sig/phoebe/models/ref/taxonomy/form_list_params.rbs +19 -0
- data/sig/phoebe/models/ref/taxonomy/form_list_response.rbs +11 -0
- data/sig/phoebe/models/ref/taxonomy/locale_list_params.rbs +30 -0
- data/sig/phoebe/models/ref/taxonomy/locale_list_response.rbs +37 -0
- data/sig/phoebe/models/ref/taxonomy/species_group_list_params.rbs +41 -0
- data/sig/phoebe/models/ref/taxonomy/species_group_list_response.rbs +47 -0
- data/sig/phoebe/models/ref/taxonomy/version_list_params.rbs +19 -0
- data/sig/phoebe/models/ref/taxonomy/version_list_response.rbs +28 -0
- data/sig/phoebe/models.rbs +7 -0
- data/sig/phoebe/request_options.rbs +34 -0
- data/sig/phoebe/resources/data/observations/geo/recent/notable.rbs +27 -0
- data/sig/phoebe/resources/data/observations/geo/recent/species.rbs +28 -0
- data/sig/phoebe/resources/data/observations/geo/recent.rbs +31 -0
- data/sig/phoebe/resources/data/observations/geo.rbs +13 -0
- data/sig/phoebe/resources/data/observations/nearest/geo_species.rbs +26 -0
- data/sig/phoebe/resources/data/observations/nearest.rbs +13 -0
- data/sig/phoebe/resources/data/observations/recent/historic.rbs +29 -0
- data/sig/phoebe/resources/data/observations/recent/notable.rbs +24 -0
- data/sig/phoebe/resources/data/observations/recent/species.rbs +25 -0
- data/sig/phoebe/resources/data/observations/recent.rbs +29 -0
- data/sig/phoebe/resources/data/observations.rbs +15 -0
- data/sig/phoebe/resources/data.rbs +9 -0
- data/sig/phoebe/resources/product/checklist.rbs +14 -0
- data/sig/phoebe/resources/product/lists/historical.rbs +21 -0
- data/sig/phoebe/resources/product/lists.rbs +17 -0
- data/sig/phoebe/resources/product/species_list.rbs +14 -0
- data/sig/phoebe/resources/product/stats.rbs +17 -0
- data/sig/phoebe/resources/product/top100.rbs +19 -0
- data/sig/phoebe/resources/product.rbs +17 -0
- data/sig/phoebe/resources/ref/hotspot/geo.rbs +20 -0
- data/sig/phoebe/resources/ref/hotspot/info.rbs +16 -0
- data/sig/phoebe/resources/ref/hotspot.rbs +20 -0
- data/sig/phoebe/resources/ref/region/adjacent.rbs +16 -0
- data/sig/phoebe/resources/ref/region/info.rbs +18 -0
- data/sig/phoebe/resources/ref/region/list.rbs +18 -0
- data/sig/phoebe/resources/ref/region.rbs +15 -0
- data/sig/phoebe/resources/ref/taxonomy/ebird.rbs +20 -0
- data/sig/phoebe/resources/ref/taxonomy/forms.rbs +16 -0
- data/sig/phoebe/resources/ref/taxonomy/locales.rbs +16 -0
- data/sig/phoebe/resources/ref/taxonomy/species_groups.rbs +17 -0
- data/sig/phoebe/resources/ref/taxonomy/versions.rbs +15 -0
- data/sig/phoebe/resources/ref/taxonomy.rbs +19 -0
- data/sig/phoebe/resources/ref.rbs +13 -0
- data/sig/phoebe/version.rbs +3 -0
- metadata +380 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Models
|
|
5
|
+
module Ref
|
|
6
|
+
module Taxonomy
|
|
7
|
+
# @see Phoebe::Resources::Ref::Taxonomy::SpeciesGroups#list
|
|
8
|
+
class SpeciesGroupListParams < Phoebe::Internal::Type::BaseModel
|
|
9
|
+
extend Phoebe::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Phoebe::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute group_name_locale
|
|
13
|
+
# Locale for species group names. English names are returned for any non-listed
|
|
14
|
+
# locale or any non-translated group name.
|
|
15
|
+
#
|
|
16
|
+
# @return [String, nil]
|
|
17
|
+
optional :group_name_locale, String
|
|
18
|
+
|
|
19
|
+
# @!method initialize(group_name_locale: nil, request_options: {})
|
|
20
|
+
# Some parameter documentations has been truncated, see
|
|
21
|
+
# {Phoebe::Models::Ref::Taxonomy::SpeciesGroupListParams} for more details.
|
|
22
|
+
#
|
|
23
|
+
# @param group_name_locale [String] Locale for species group names. English names are returned for any non-listed lo
|
|
24
|
+
#
|
|
25
|
+
# @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}]
|
|
26
|
+
|
|
27
|
+
# The order in which groups are returned.
|
|
28
|
+
module SpeciesGrouping
|
|
29
|
+
extend Phoebe::Internal::Type::Enum
|
|
30
|
+
|
|
31
|
+
MERLIN = :merlin
|
|
32
|
+
EBIRD = :ebird
|
|
33
|
+
|
|
34
|
+
# @!method self.values
|
|
35
|
+
# @return [Array<Symbol>]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Models
|
|
5
|
+
module Ref
|
|
6
|
+
module Taxonomy
|
|
7
|
+
class SpeciesGroupListResponseItem < Phoebe::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute group_name
|
|
9
|
+
#
|
|
10
|
+
# @return [String, nil]
|
|
11
|
+
optional :group_name, String, api_name: :groupName
|
|
12
|
+
|
|
13
|
+
# @!attribute group_order
|
|
14
|
+
#
|
|
15
|
+
# @return [Integer, nil]
|
|
16
|
+
optional :group_order, Integer, api_name: :groupOrder
|
|
17
|
+
|
|
18
|
+
# @!attribute taxon_order_bounds
|
|
19
|
+
#
|
|
20
|
+
# @return [Array<Array<Float>>, nil]
|
|
21
|
+
optional :taxon_order_bounds,
|
|
22
|
+
Phoebe::Internal::Type::ArrayOf[Phoebe::Internal::Type::ArrayOf[Float]],
|
|
23
|
+
api_name: :taxonOrderBounds
|
|
24
|
+
|
|
25
|
+
# @!method initialize(group_name: nil, group_order: nil, taxon_order_bounds: nil)
|
|
26
|
+
# @param group_name [String]
|
|
27
|
+
# @param group_order [Integer]
|
|
28
|
+
# @param taxon_order_bounds [Array<Array<Float>>]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# @type [Phoebe::Internal::Type::Converter]
|
|
32
|
+
SpeciesGroupListResponse =
|
|
33
|
+
Phoebe::Internal::Type::ArrayOf[-> { Phoebe::Models::Ref::Taxonomy::SpeciesGroupListResponseItem }]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Models
|
|
5
|
+
module Ref
|
|
6
|
+
module Taxonomy
|
|
7
|
+
# @see Phoebe::Resources::Ref::Taxonomy::Versions#list
|
|
8
|
+
class VersionListParams < Phoebe::Internal::Type::BaseModel
|
|
9
|
+
extend Phoebe::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Phoebe::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!method initialize(request_options: {})
|
|
13
|
+
# @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Models
|
|
5
|
+
module Ref
|
|
6
|
+
module Taxonomy
|
|
7
|
+
class VersionListResponseItem < Phoebe::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute authority_ver
|
|
9
|
+
#
|
|
10
|
+
# @return [Float, nil]
|
|
11
|
+
optional :authority_ver, Float, api_name: :authorityVer
|
|
12
|
+
|
|
13
|
+
# @!attribute latest
|
|
14
|
+
#
|
|
15
|
+
# @return [Boolean, nil]
|
|
16
|
+
optional :latest, Phoebe::Internal::Type::Boolean
|
|
17
|
+
|
|
18
|
+
# @!method initialize(authority_ver: nil, latest: nil)
|
|
19
|
+
# @param authority_ver [Float]
|
|
20
|
+
# @param latest [Boolean]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# @type [Phoebe::Internal::Type::Converter]
|
|
24
|
+
VersionListResponse =
|
|
25
|
+
Phoebe::Internal::Type::ArrayOf[-> { Phoebe::Models::Ref::Taxonomy::VersionListResponseItem }]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
[Phoebe::Internal::Type::BaseModel, *Phoebe::Internal::Type::BaseModel.subclasses].each do |cls|
|
|
5
|
+
cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Phoebe::Internal::AnyHash) } }
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
Phoebe::Internal::Util.walk_namespaces(Phoebe::Models).each do |mod|
|
|
9
|
+
case mod
|
|
10
|
+
in Phoebe::Internal::Type::Enum | Phoebe::Internal::Type::Union
|
|
11
|
+
mod.constants.each do |name|
|
|
12
|
+
case mod.const_get(name)
|
|
13
|
+
in true | false
|
|
14
|
+
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
|
|
15
|
+
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
|
|
16
|
+
in Integer
|
|
17
|
+
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
|
|
18
|
+
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
|
|
19
|
+
in Float
|
|
20
|
+
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
|
|
21
|
+
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
|
|
22
|
+
in Symbol
|
|
23
|
+
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
|
|
24
|
+
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
|
|
25
|
+
else
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
else
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
Phoebe::Internal::Util.walk_namespaces(Phoebe::Models)
|
|
33
|
+
.lazy
|
|
34
|
+
.grep(Phoebe::Internal::Type::Union)
|
|
35
|
+
.each do |mod|
|
|
36
|
+
const = :Variants
|
|
37
|
+
next if mod.sorbet_constant_defined?(const)
|
|
38
|
+
|
|
39
|
+
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
Data = Phoebe::Models::Data
|
|
43
|
+
|
|
44
|
+
Product = Phoebe::Models::Product
|
|
45
|
+
|
|
46
|
+
Ref = Phoebe::Models::Ref
|
|
47
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
# Specify HTTP behaviour to use for a specific request. These options supplement
|
|
5
|
+
# or override those provided at the client level.
|
|
6
|
+
#
|
|
7
|
+
# When making a request, you can pass an actual {RequestOptions} instance, or
|
|
8
|
+
# simply pass a Hash with symbol keys matching the attributes on this class.
|
|
9
|
+
class RequestOptions < Phoebe::Internal::Type::BaseModel
|
|
10
|
+
# @api private
|
|
11
|
+
#
|
|
12
|
+
# @param opts [Phoebe::RequestOptions, Hash{Symbol=>Object}]
|
|
13
|
+
#
|
|
14
|
+
# @raise [ArgumentError]
|
|
15
|
+
def self.validate!(opts)
|
|
16
|
+
case opts
|
|
17
|
+
in Phoebe::RequestOptions | Hash
|
|
18
|
+
opts.to_h.each_key do |k|
|
|
19
|
+
unless fields.include?(k)
|
|
20
|
+
raise ArgumentError.new("Request `opts` keys must be one of #{fields.keys}, got #{k.inspect}")
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
else
|
|
24
|
+
raise ArgumentError.new("Request `opts` must be a Hash or RequestOptions, got #{opts.inspect}")
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# @!attribute idempotency_key
|
|
29
|
+
# Idempotency key to send with request and all associated retries. Will only be
|
|
30
|
+
# sent for write requests.
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :idempotency_key, String
|
|
34
|
+
|
|
35
|
+
# @!attribute extra_query
|
|
36
|
+
# Extra query params to send with the request. These are `.merge`’d into any
|
|
37
|
+
# `query` given at the client level.
|
|
38
|
+
#
|
|
39
|
+
# @return [Hash{String=>Array<String>, String, nil}, nil]
|
|
40
|
+
optional :extra_query, Phoebe::Internal::Type::HashOf[Phoebe::Internal::Type::ArrayOf[String]]
|
|
41
|
+
|
|
42
|
+
# @!attribute extra_headers
|
|
43
|
+
# Extra headers to send with the request. These are `.merged`’d into any
|
|
44
|
+
# `extra_headers` given at the client level.
|
|
45
|
+
#
|
|
46
|
+
# @return [Hash{String=>String, nil}, nil]
|
|
47
|
+
optional :extra_headers, Phoebe::Internal::Type::HashOf[String, nil?: true]
|
|
48
|
+
|
|
49
|
+
# @!attribute extra_body
|
|
50
|
+
# Extra data to send with the request. These are deep merged into any data
|
|
51
|
+
# generated as part of the normal request.
|
|
52
|
+
#
|
|
53
|
+
# @return [Object, nil]
|
|
54
|
+
optional :extra_body, Phoebe::Internal::Type::HashOf[Phoebe::Internal::Type::Unknown]
|
|
55
|
+
|
|
56
|
+
# @!attribute max_retries
|
|
57
|
+
# Maximum number of retries to attempt after a failed initial request.
|
|
58
|
+
#
|
|
59
|
+
# @return [Integer, nil]
|
|
60
|
+
optional :max_retries, Integer
|
|
61
|
+
|
|
62
|
+
# @!attribute timeout
|
|
63
|
+
# Request timeout in seconds.
|
|
64
|
+
#
|
|
65
|
+
# @return [Float, nil]
|
|
66
|
+
optional :timeout, Float
|
|
67
|
+
|
|
68
|
+
# @!method initialize(values = {})
|
|
69
|
+
# Returns a new instance of RequestOptions.
|
|
70
|
+
#
|
|
71
|
+
# @param values [Hash{Symbol=>Object}]
|
|
72
|
+
|
|
73
|
+
define_sorbet_constant!(:OrHash) do
|
|
74
|
+
T.type_alias { T.any(Phoebe::RequestOptions, Phoebe::Internal::AnyHash) }
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Resources
|
|
5
|
+
class Data
|
|
6
|
+
class Observations
|
|
7
|
+
class Geo
|
|
8
|
+
class Recent
|
|
9
|
+
class Notable
|
|
10
|
+
# Get the list of notable observations (up to 30 days ago) of birds seen at
|
|
11
|
+
# locations within a radius of up to 50 kilometers, from a given set of
|
|
12
|
+
# coordinates. Notable observations can be for locally or nationally rare species
|
|
13
|
+
# or are otherwise unusual, for example over-wintering birds in a species which is
|
|
14
|
+
# normally only a summer visitor.
|
|
15
|
+
#
|
|
16
|
+
# @overload list(lat:, lng:, back: nil, detail: nil, dist: nil, hotspot: nil, max_results: nil, spp_locale: nil, request_options: {})
|
|
17
|
+
#
|
|
18
|
+
# @param lat [Float]
|
|
19
|
+
#
|
|
20
|
+
# @param lng [Float]
|
|
21
|
+
#
|
|
22
|
+
# @param back [Integer] The number of days back to fetch observations.
|
|
23
|
+
#
|
|
24
|
+
# @param detail [Symbol, Phoebe::Models::Data::Observations::Geo::Recent::NotableListParams::Detail] Include a subset (simple), or all (full), of the fields available.
|
|
25
|
+
#
|
|
26
|
+
# @param dist [Integer] The search radius from the given position, in kilometers.
|
|
27
|
+
#
|
|
28
|
+
# @param hotspot [Boolean] Only fetch observations from hotspots
|
|
29
|
+
#
|
|
30
|
+
# @param max_results [Integer] Only fetch this number of observations
|
|
31
|
+
#
|
|
32
|
+
# @param spp_locale [String] Use this language for species common names
|
|
33
|
+
#
|
|
34
|
+
# @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
35
|
+
#
|
|
36
|
+
# @return [Array<Phoebe::Models::Data::Observation>]
|
|
37
|
+
#
|
|
38
|
+
# @see Phoebe::Models::Data::Observations::Geo::Recent::NotableListParams
|
|
39
|
+
def list(params)
|
|
40
|
+
parsed, options = Phoebe::Data::Observations::Geo::Recent::NotableListParams.dump_request(params)
|
|
41
|
+
@client.request(
|
|
42
|
+
method: :get,
|
|
43
|
+
path: "data/obs/geo/recent/notable",
|
|
44
|
+
query: parsed.transform_keys(max_results: "maxResults", spp_locale: "sppLocale"),
|
|
45
|
+
model: Phoebe::Internal::Type::ArrayOf[Phoebe::Data::Observation],
|
|
46
|
+
options: options
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# @api private
|
|
51
|
+
#
|
|
52
|
+
# @param client [Phoebe::Client]
|
|
53
|
+
def initialize(client:)
|
|
54
|
+
@client = client
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Resources
|
|
5
|
+
class Data
|
|
6
|
+
class Observations
|
|
7
|
+
class Geo
|
|
8
|
+
class Recent
|
|
9
|
+
class Species
|
|
10
|
+
# Get all observations of a species, seen up to 30 days ago, at any location
|
|
11
|
+
# within a radius of up to 50 kilometers, from a given set of coordinates. Results
|
|
12
|
+
# include only the most recent observation from each location in the region
|
|
13
|
+
# specified.
|
|
14
|
+
#
|
|
15
|
+
# #### URL parameters
|
|
16
|
+
#
|
|
17
|
+
# | Name | Description |
|
|
18
|
+
# | ----------- | ----------------------- |
|
|
19
|
+
# | speciesCode | The eBird species code. |
|
|
20
|
+
#
|
|
21
|
+
# #### Notes
|
|
22
|
+
#
|
|
23
|
+
# The species code is typically a 6-letter code, e.g. horlar for Horned Lark. You
|
|
24
|
+
# can get complete set of species code from the GET eBird Taxonomy end-point.
|
|
25
|
+
#
|
|
26
|
+
# @overload list(species_code, lat:, lng:, back: nil, dist: nil, hotspot: nil, include_provisional: nil, max_results: nil, spp_locale: nil, request_options: {})
|
|
27
|
+
#
|
|
28
|
+
# @param species_code [String] The eBird species code.
|
|
29
|
+
#
|
|
30
|
+
# @param lat [Float]
|
|
31
|
+
#
|
|
32
|
+
# @param lng [Float]
|
|
33
|
+
#
|
|
34
|
+
# @param back [Integer] The number of days back to fetch observations.
|
|
35
|
+
#
|
|
36
|
+
# @param dist [Integer] The search radius from the given position, in kilometers.
|
|
37
|
+
#
|
|
38
|
+
# @param hotspot [Boolean] Only fetch observations from hotspots
|
|
39
|
+
#
|
|
40
|
+
# @param include_provisional [Boolean] Include observations which have not yet been reviewed.
|
|
41
|
+
#
|
|
42
|
+
# @param max_results [Integer] Only fetch this number of observations
|
|
43
|
+
#
|
|
44
|
+
# @param spp_locale [String] Use this language for species common names
|
|
45
|
+
#
|
|
46
|
+
# @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
47
|
+
#
|
|
48
|
+
# @return [Array<Phoebe::Models::Data::Observation>]
|
|
49
|
+
#
|
|
50
|
+
# @see Phoebe::Models::Data::Observations::Geo::Recent::SpecieListParams
|
|
51
|
+
def list(species_code, params)
|
|
52
|
+
parsed, options = Phoebe::Data::Observations::Geo::Recent::SpecieListParams.dump_request(params)
|
|
53
|
+
@client.request(
|
|
54
|
+
method: :get,
|
|
55
|
+
path: ["data/obs/geo/recent/%1$s", species_code],
|
|
56
|
+
query: parsed.transform_keys(
|
|
57
|
+
include_provisional: "includeProvisional",
|
|
58
|
+
max_results: "maxResults",
|
|
59
|
+
spp_locale: "sppLocale"
|
|
60
|
+
),
|
|
61
|
+
model: Phoebe::Internal::Type::ArrayOf[Phoebe::Data::Observation],
|
|
62
|
+
options: options
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# @api private
|
|
67
|
+
#
|
|
68
|
+
# @param client [Phoebe::Client]
|
|
69
|
+
def initialize(client:)
|
|
70
|
+
@client = client
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Resources
|
|
5
|
+
class Data
|
|
6
|
+
class Observations
|
|
7
|
+
class Geo
|
|
8
|
+
class Recent
|
|
9
|
+
# @return [Phoebe::Resources::Data::Observations::Geo::Recent::Species]
|
|
10
|
+
attr_reader :species
|
|
11
|
+
|
|
12
|
+
# @return [Phoebe::Resources::Data::Observations::Geo::Recent::Notable]
|
|
13
|
+
attr_reader :notable
|
|
14
|
+
|
|
15
|
+
# Get the list of recent observations (up to 30 days ago) of birds seen at
|
|
16
|
+
# locations within a radius of up to 50 kilometers, from a given set of
|
|
17
|
+
# coordinates. Results include only the most recent observation for each species
|
|
18
|
+
# in the region specified.
|
|
19
|
+
#
|
|
20
|
+
# @overload list(lat:, lng:, back: nil, cat: nil, dist: nil, hotspot: nil, include_provisional: nil, max_results: nil, sort: nil, spp_locale: nil, request_options: {})
|
|
21
|
+
#
|
|
22
|
+
# @param lat [Float]
|
|
23
|
+
#
|
|
24
|
+
# @param lng [Float]
|
|
25
|
+
#
|
|
26
|
+
# @param back [Integer] The number of days back to fetch observations.
|
|
27
|
+
#
|
|
28
|
+
# @param cat [Symbol, Phoebe::Models::Data::Observations::Geo::RecentListParams::Cat] Only fetch observations from these taxonomic categories
|
|
29
|
+
#
|
|
30
|
+
# @param dist [Integer] The search radius from the given position, in kilometers.
|
|
31
|
+
#
|
|
32
|
+
# @param hotspot [Boolean] Only fetch observations from hotspots
|
|
33
|
+
#
|
|
34
|
+
# @param include_provisional [Boolean] Include observations which have not yet been reviewed.
|
|
35
|
+
#
|
|
36
|
+
# @param max_results [Integer] Only fetch this number of observations
|
|
37
|
+
#
|
|
38
|
+
# @param sort [Symbol, Phoebe::Models::Data::Observations::Geo::RecentListParams::Sort] Sort observations by taxonomy or by date, most recent first.
|
|
39
|
+
#
|
|
40
|
+
# @param spp_locale [String] Use this language for species common names
|
|
41
|
+
#
|
|
42
|
+
# @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
43
|
+
#
|
|
44
|
+
# @return [Array<Phoebe::Models::Data::Observation>]
|
|
45
|
+
#
|
|
46
|
+
# @see Phoebe::Models::Data::Observations::Geo::RecentListParams
|
|
47
|
+
def list(params)
|
|
48
|
+
parsed, options = Phoebe::Data::Observations::Geo::RecentListParams.dump_request(params)
|
|
49
|
+
@client.request(
|
|
50
|
+
method: :get,
|
|
51
|
+
path: "data/obs/geo/recent",
|
|
52
|
+
query: parsed.transform_keys(
|
|
53
|
+
include_provisional: "includeProvisional",
|
|
54
|
+
max_results: "maxResults",
|
|
55
|
+
spp_locale: "sppLocale"
|
|
56
|
+
),
|
|
57
|
+
model: Phoebe::Internal::Type::ArrayOf[Phoebe::Data::Observation],
|
|
58
|
+
options: options
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# @api private
|
|
63
|
+
#
|
|
64
|
+
# @param client [Phoebe::Client]
|
|
65
|
+
def initialize(client:)
|
|
66
|
+
@client = client
|
|
67
|
+
@species = Phoebe::Resources::Data::Observations::Geo::Recent::Species.new(client: client)
|
|
68
|
+
@notable = Phoebe::Resources::Data::Observations::Geo::Recent::Notable.new(client: client)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Resources
|
|
5
|
+
class Data
|
|
6
|
+
class Observations
|
|
7
|
+
class Geo
|
|
8
|
+
# @return [Phoebe::Resources::Data::Observations::Geo::Recent]
|
|
9
|
+
attr_reader :recent
|
|
10
|
+
|
|
11
|
+
# @api private
|
|
12
|
+
#
|
|
13
|
+
# @param client [Phoebe::Client]
|
|
14
|
+
def initialize(client:)
|
|
15
|
+
@client = client
|
|
16
|
+
@recent = Phoebe::Resources::Data::Observations::Geo::Recent.new(client: client)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Resources
|
|
5
|
+
class Data
|
|
6
|
+
class Observations
|
|
7
|
+
class Nearest
|
|
8
|
+
class GeoSpecies
|
|
9
|
+
# Find the nearest locations where a species has been seen recently. #### Notes
|
|
10
|
+
# The species code is typically a 6-letter code, e.g. barswa for Barn Swallow. You
|
|
11
|
+
# can get complete set of species code from the GET eBird Taxonomy end-point.
|
|
12
|
+
#
|
|
13
|
+
# @overload list(species_code, lat:, lng:, back: nil, dist: nil, hotspot: nil, include_provisional: nil, max_results: nil, spp_locale: nil, request_options: {})
|
|
14
|
+
#
|
|
15
|
+
# @param species_code [String] The eBird species code.
|
|
16
|
+
#
|
|
17
|
+
# @param lat [Float]
|
|
18
|
+
#
|
|
19
|
+
# @param lng [Float]
|
|
20
|
+
#
|
|
21
|
+
# @param back [Integer] The number of days back to fetch observations.
|
|
22
|
+
#
|
|
23
|
+
# @param dist [Integer] Only fetch observations within this distance of the provided lat/lng
|
|
24
|
+
#
|
|
25
|
+
# @param hotspot [Boolean] Only fetch observations from hotspots
|
|
26
|
+
#
|
|
27
|
+
# @param include_provisional [Boolean] Include observations which have not yet been reviewed.
|
|
28
|
+
#
|
|
29
|
+
# @param max_results [Integer] Only fetch up to this number of observations
|
|
30
|
+
#
|
|
31
|
+
# @param spp_locale [String] Use this language for species common names
|
|
32
|
+
#
|
|
33
|
+
# @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
34
|
+
#
|
|
35
|
+
# @return [Array<Phoebe::Models::Data::Observation>]
|
|
36
|
+
#
|
|
37
|
+
# @see Phoebe::Models::Data::Observations::Nearest::GeoSpecieListParams
|
|
38
|
+
def list(species_code, params)
|
|
39
|
+
parsed, options = Phoebe::Data::Observations::Nearest::GeoSpecieListParams.dump_request(params)
|
|
40
|
+
@client.request(
|
|
41
|
+
method: :get,
|
|
42
|
+
path: ["data/nearest/geo/recent/%1$s", species_code],
|
|
43
|
+
query: parsed.transform_keys(
|
|
44
|
+
include_provisional: "includeProvisional",
|
|
45
|
+
max_results: "maxResults",
|
|
46
|
+
spp_locale: "sppLocale"
|
|
47
|
+
),
|
|
48
|
+
model: Phoebe::Internal::Type::ArrayOf[Phoebe::Data::Observation],
|
|
49
|
+
options: options
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# @api private
|
|
54
|
+
#
|
|
55
|
+
# @param client [Phoebe::Client]
|
|
56
|
+
def initialize(client:)
|
|
57
|
+
@client = client
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Resources
|
|
5
|
+
class Data
|
|
6
|
+
class Observations
|
|
7
|
+
class Nearest
|
|
8
|
+
# @return [Phoebe::Resources::Data::Observations::Nearest::GeoSpecies]
|
|
9
|
+
attr_reader :geo_species
|
|
10
|
+
|
|
11
|
+
# @api private
|
|
12
|
+
#
|
|
13
|
+
# @param client [Phoebe::Client]
|
|
14
|
+
def initialize(client:)
|
|
15
|
+
@client = client
|
|
16
|
+
@geo_species = Phoebe::Resources::Data::Observations::Nearest::GeoSpecies.new(client: client)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Phoebe
|
|
4
|
+
module Resources
|
|
5
|
+
class Data
|
|
6
|
+
class Observations
|
|
7
|
+
class Recent
|
|
8
|
+
class Historic
|
|
9
|
+
# Get a list of all taxa seen in a country, region or location on a specific date,
|
|
10
|
+
# with the specific observations determined by the "rank" parameter (defaults to
|
|
11
|
+
# latest observation on the date).
|
|
12
|
+
#
|
|
13
|
+
# #### Notes Responses may be cached for 30 minutes
|
|
14
|
+
#
|
|
15
|
+
# @overload list(d, region_code:, y_:, m:, cat: nil, detail: nil, hotspot: nil, include_provisional: nil, max_results: nil, r: nil, rank: nil, spp_locale: nil, request_options: {})
|
|
16
|
+
#
|
|
17
|
+
# @param d [Integer] Path param:
|
|
18
|
+
#
|
|
19
|
+
# @param region_code [String] Path param: The country, subnational1, subnational2 or location code.
|
|
20
|
+
#
|
|
21
|
+
# @param y_ [Integer] Path param:
|
|
22
|
+
#
|
|
23
|
+
# @param m [Integer] Path param:
|
|
24
|
+
#
|
|
25
|
+
# @param cat [Symbol, Phoebe::Models::Data::Observations::Recent::HistoricListParams::Cat] Query param: Only fetch observations from these taxonomic categories
|
|
26
|
+
#
|
|
27
|
+
# @param detail [Symbol, Phoebe::Models::Data::Observations::Recent::HistoricListParams::Detail] Query param: Include a subset (simple), or all (full), of the fields available.
|
|
28
|
+
#
|
|
29
|
+
# @param hotspot [Boolean] Query param: Only fetch observations from hotspots
|
|
30
|
+
#
|
|
31
|
+
# @param include_provisional [Boolean] Query param: Include observations which have not yet been reviewed.
|
|
32
|
+
#
|
|
33
|
+
# @param max_results [Integer] Query param: Only fetch this number of observations
|
|
34
|
+
#
|
|
35
|
+
# @param r [Array<String>] Query param: Fetch observations from up to 50 locations
|
|
36
|
+
#
|
|
37
|
+
# @param rank [Symbol, Phoebe::Models::Data::Observations::Recent::HistoricListParams::Rank] Query param: Include latest observation of the day, or the first added
|
|
38
|
+
#
|
|
39
|
+
# @param spp_locale [String] Query param: Use this language for species common names
|
|
40
|
+
#
|
|
41
|
+
# @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
42
|
+
#
|
|
43
|
+
# @return [Array<Phoebe::Models::Data::Observation>]
|
|
44
|
+
#
|
|
45
|
+
# @see Phoebe::Models::Data::Observations::Recent::HistoricListParams
|
|
46
|
+
def list(d, params)
|
|
47
|
+
parsed, options = Phoebe::Data::Observations::Recent::HistoricListParams.dump_request(params)
|
|
48
|
+
region_code =
|
|
49
|
+
parsed.delete(:region_code) do
|
|
50
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
51
|
+
end
|
|
52
|
+
y_ =
|
|
53
|
+
parsed.delete(:y_) do
|
|
54
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
55
|
+
end
|
|
56
|
+
m =
|
|
57
|
+
parsed.delete(:m) do
|
|
58
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
59
|
+
end
|
|
60
|
+
@client.request(
|
|
61
|
+
method: :get,
|
|
62
|
+
path: ["data/obs/%1$s/historic/%2$s/%3$s/%4$s", region_code, y_, m, d],
|
|
63
|
+
query: parsed.transform_keys(
|
|
64
|
+
include_provisional: "includeProvisional",
|
|
65
|
+
max_results: "maxResults",
|
|
66
|
+
spp_locale: "sppLocale"
|
|
67
|
+
),
|
|
68
|
+
model: Phoebe::Internal::Type::ArrayOf[Phoebe::Data::Observation],
|
|
69
|
+
options: options
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# @api private
|
|
74
|
+
#
|
|
75
|
+
# @param client [Phoebe::Client]
|
|
76
|
+
def initialize(client:)
|
|
77
|
+
@client = client
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|