phoebe 0.1.0.pre.alpha.1 → 0.1.0.pre.alpha.2

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.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +82 -0
  3. data/README.md +10 -1
  4. data/lib/phoebe/client.rb +15 -1
  5. data/lib/phoebe/internal/transport/base_client.rb +2 -0
  6. data/lib/phoebe/internal/transport/pooled_net_requester.rb +13 -11
  7. data/lib/phoebe/internal/util.rb +61 -10
  8. data/lib/phoebe/models/data/observations/geo/recent/specie_list_params.rb +8 -1
  9. data/lib/phoebe/models/data/observations/nearest/geo_specie_list_params.rb +8 -1
  10. data/lib/phoebe/models/data/observations/recent/historic_list_params.rb +8 -1
  11. data/lib/phoebe/models/data/observations/recent/notable_list_params.rb +8 -1
  12. data/lib/phoebe/models/data/observations/recent/specie_retrieve_params.rb +8 -1
  13. data/lib/phoebe/models/data/observations/recent_list_params.rb +8 -1
  14. data/lib/phoebe/models/product/checklist_view_params.rb +7 -1
  15. data/lib/phoebe/models/product/list_retrieve_params.rb +8 -1
  16. data/lib/phoebe/models/product/lists/historical_retrieve_params.rb +8 -1
  17. data/lib/phoebe/models/product/species_list_list_params.rb +7 -1
  18. data/lib/phoebe/models/product/stat_retrieve_params.rb +7 -1
  19. data/lib/phoebe/models/product/top100_retrieve_params.rb +8 -1
  20. data/lib/phoebe/models/ref/hotspot/info_retrieve_params.rb +7 -1
  21. data/lib/phoebe/models/ref/hotspot_list_params.rb +8 -1
  22. data/lib/phoebe/models/ref/region/adjacent_list_params.rb +7 -1
  23. data/lib/phoebe/models/ref/region/info_retrieve_params.rb +8 -1
  24. data/lib/phoebe/models/ref/region/list_list_params.rb +8 -1
  25. data/lib/phoebe/models/ref/taxonomy/form_list_params.rb +7 -1
  26. data/lib/phoebe/models/ref/taxonomy/species_group_list_params.rb +9 -1
  27. data/lib/phoebe/resources/data/observations/geo/recent/notable.rb +7 -1
  28. data/lib/phoebe/resources/data/observations/geo/recent/species.rb +7 -1
  29. data/lib/phoebe/resources/data/observations/geo/recent.rb +17 -1
  30. data/lib/phoebe/resources/data/observations/geo.rb +5 -0
  31. data/lib/phoebe/resources/data/observations/nearest/geo_species.rb +7 -1
  32. data/lib/phoebe/resources/data/observations/nearest.rb +5 -0
  33. data/lib/phoebe/resources/data/observations/recent/historic.rb +10 -4
  34. data/lib/phoebe/resources/data/observations/recent/notable.rb +7 -1
  35. data/lib/phoebe/resources/data/observations/recent/species.rb +7 -1
  36. data/lib/phoebe/resources/data/observations/recent.rb +22 -1
  37. data/lib/phoebe/resources/data/observations.rb +5 -0
  38. data/lib/phoebe/resources/product/checklist.rb +5 -0
  39. data/lib/phoebe/resources/product/lists/historical.rb +7 -1
  40. data/lib/phoebe/resources/product/lists.rb +12 -1
  41. data/lib/phoebe/resources/product/species_list.rb +5 -0
  42. data/lib/phoebe/resources/product/stats.rb +5 -0
  43. data/lib/phoebe/resources/product/top100.rb +7 -1
  44. data/lib/phoebe/resources/product.rb +25 -0
  45. data/lib/phoebe/resources/ref/hotspot/geo.rb +4 -1
  46. data/lib/phoebe/resources/ref/hotspot/info.rb +2 -0
  47. data/lib/phoebe/resources/ref/hotspot.rb +8 -1
  48. data/lib/phoebe/resources/ref/region/adjacent.rb +1 -0
  49. data/lib/phoebe/resources/ref/region/info.rb +3 -1
  50. data/lib/phoebe/resources/ref/region/list.rb +3 -1
  51. data/lib/phoebe/resources/ref/region.rb +3 -0
  52. data/lib/phoebe/resources/ref/taxonomy/ebird.rb +2 -1
  53. data/lib/phoebe/resources/ref/taxonomy/species_groups.rb +2 -1
  54. data/lib/phoebe/resources/ref.rb +2 -0
  55. data/lib/phoebe/version.rb +1 -1
  56. data/rbi/phoebe/internal/util.rbi +29 -1
  57. data/rbi/phoebe/models/data/observations/geo/recent/specie_list_params.rbi +6 -0
  58. data/rbi/phoebe/models/data/observations/nearest/geo_specie_list_params.rbi +6 -0
  59. data/rbi/phoebe/models/data/observations/recent/historic_list_params.rbi +6 -0
  60. data/rbi/phoebe/models/data/observations/recent/notable_list_params.rbi +6 -0
  61. data/rbi/phoebe/models/data/observations/recent/specie_retrieve_params.rbi +6 -0
  62. data/rbi/phoebe/models/data/observations/recent_list_params.rbi +6 -0
  63. data/rbi/phoebe/models/product/checklist_view_params.rbi +13 -5
  64. data/rbi/phoebe/models/product/list_retrieve_params.rbi +10 -1
  65. data/rbi/phoebe/models/product/lists/historical_retrieve_params.rbi +6 -0
  66. data/rbi/phoebe/models/product/species_list_list_params.rbi +13 -5
  67. data/rbi/phoebe/models/product/stat_retrieve_params.rbi +6 -1
  68. data/rbi/phoebe/models/product/top100_retrieve_params.rbi +6 -0
  69. data/rbi/phoebe/models/ref/hotspot/info_retrieve_params.rbi +13 -5
  70. data/rbi/phoebe/models/ref/hotspot_list_params.rbi +6 -0
  71. data/rbi/phoebe/models/ref/region/adjacent_list_params.rbi +13 -5
  72. data/rbi/phoebe/models/ref/region/info_retrieve_params.rbi +6 -0
  73. data/rbi/phoebe/models/ref/region/list_list_params.rbi +6 -0
  74. data/rbi/phoebe/models/ref/taxonomy/form_list_params.rbi +13 -5
  75. data/rbi/phoebe/models/ref/taxonomy/species_group_list_params.rbi +14 -0
  76. data/rbi/phoebe/resources/data/observations/geo/recent/notable.rbi +5 -0
  77. data/rbi/phoebe/resources/data/observations/geo/recent/species.rbi +5 -0
  78. data/rbi/phoebe/resources/data/observations/geo/recent.rbi +15 -0
  79. data/rbi/phoebe/resources/data/observations/geo.rbi +5 -0
  80. data/rbi/phoebe/resources/data/observations/nearest/geo_species.rbi +5 -0
  81. data/rbi/phoebe/resources/data/observations/nearest.rbi +5 -0
  82. data/rbi/phoebe/resources/data/observations/recent/historic.rbi +8 -3
  83. data/rbi/phoebe/resources/data/observations/recent/notable.rbi +5 -0
  84. data/rbi/phoebe/resources/data/observations/recent/species.rbi +5 -0
  85. data/rbi/phoebe/resources/data/observations/recent.rbi +20 -0
  86. data/rbi/phoebe/resources/data/observations.rbi +5 -0
  87. data/rbi/phoebe/resources/product/checklist.rbi +5 -0
  88. data/rbi/phoebe/resources/product/lists/historical.rbi +5 -0
  89. data/rbi/phoebe/resources/product/lists.rbi +10 -0
  90. data/rbi/phoebe/resources/product/species_list.rbi +5 -0
  91. data/rbi/phoebe/resources/product/stats.rbi +5 -0
  92. data/rbi/phoebe/resources/product/top100.rbi +5 -0
  93. data/rbi/phoebe/resources/product.rbi +25 -0
  94. data/rbi/phoebe/resources/ref/hotspot/geo.rbi +2 -0
  95. data/rbi/phoebe/resources/ref/hotspot/info.rbi +2 -0
  96. data/rbi/phoebe/resources/ref/hotspot.rbi +6 -0
  97. data/rbi/phoebe/resources/ref/region/adjacent.rbi +1 -0
  98. data/rbi/phoebe/resources/ref/region/info.rbi +1 -0
  99. data/rbi/phoebe/resources/ref/region/list.rbi +1 -0
  100. data/rbi/phoebe/resources/ref/region.rbi +3 -0
  101. data/rbi/phoebe/resources/ref.rbi +2 -0
  102. data/sig/phoebe/internal/util.rbs +14 -0
  103. data/sig/phoebe/models/data/observations/geo/recent/specie_list_params.rbs +5 -0
  104. data/sig/phoebe/models/data/observations/nearest/geo_specie_list_params.rbs +5 -0
  105. data/sig/phoebe/models/data/observations/recent/historic_list_params.rbs +5 -0
  106. data/sig/phoebe/models/data/observations/recent/notable_list_params.rbs +5 -0
  107. data/sig/phoebe/models/data/observations/recent/specie_retrieve_params.rbs +5 -0
  108. data/sig/phoebe/models/data/observations/recent_list_params.rbs +5 -0
  109. data/sig/phoebe/models/product/checklist_view_params.rbs +11 -3
  110. data/sig/phoebe/models/product/list_retrieve_params.rbs +6 -1
  111. data/sig/phoebe/models/product/lists/historical_retrieve_params.rbs +5 -0
  112. data/sig/phoebe/models/product/species_list_list_params.rbs +11 -3
  113. data/sig/phoebe/models/product/stat_retrieve_params.rbs +5 -1
  114. data/sig/phoebe/models/product/top100_retrieve_params.rbs +5 -0
  115. data/sig/phoebe/models/ref/hotspot/info_retrieve_params.rbs +11 -3
  116. data/sig/phoebe/models/ref/hotspot_list_params.rbs +9 -1
  117. data/sig/phoebe/models/ref/region/adjacent_list_params.rbs +11 -3
  118. data/sig/phoebe/models/ref/region/info_retrieve_params.rbs +5 -0
  119. data/sig/phoebe/models/ref/region/list_list_params.rbs +5 -0
  120. data/sig/phoebe/models/ref/taxonomy/form_list_params.rbs +11 -3
  121. data/sig/phoebe/models/ref/taxonomy/species_group_list_params.rbs +8 -1
  122. metadata +16 -2
@@ -9,7 +9,13 @@ module Phoebe
9
9
  extend Phoebe::Internal::Type::RequestParameters::Converter
10
10
  include Phoebe::Internal::Type::RequestParameters
11
11
 
12
- # @!method initialize(request_options: {})
12
+ # @!attribute loc_id
13
+ #
14
+ # @return [String]
15
+ required :loc_id, String
16
+
17
+ # @!method initialize(loc_id:, request_options: {})
18
+ # @param loc_id [String]
13
19
  # @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}]
14
20
  end
15
21
  end
@@ -8,6 +8,11 @@ module Phoebe
8
8
  extend Phoebe::Internal::Type::RequestParameters::Converter
9
9
  include Phoebe::Internal::Type::RequestParameters
10
10
 
11
+ # @!attribute region_code
12
+ #
13
+ # @return [String]
14
+ required :region_code, String
15
+
11
16
  # @!attribute back
12
17
  # The number of days back to fetch hotspots.
13
18
  #
@@ -20,7 +25,9 @@ module Phoebe
20
25
  # @return [Symbol, Phoebe::Models::Ref::HotspotListParams::Fmt, nil]
21
26
  optional :fmt, enum: -> { Phoebe::Ref::HotspotListParams::Fmt }
22
27
 
23
- # @!method initialize(back: nil, fmt: nil, request_options: {})
28
+ # @!method initialize(region_code:, back: nil, fmt: nil, request_options: {})
29
+ # @param region_code [String]
30
+ #
24
31
  # @param back [Integer] The number of days back to fetch hotspots.
25
32
  #
26
33
  # @param fmt [Symbol, Phoebe::Models::Ref::HotspotListParams::Fmt] Fetch the records in CSV or JSON format.
@@ -9,7 +9,13 @@ module Phoebe
9
9
  extend Phoebe::Internal::Type::RequestParameters::Converter
10
10
  include Phoebe::Internal::Type::RequestParameters
11
11
 
12
- # @!method initialize(request_options: {})
12
+ # @!attribute region_code
13
+ #
14
+ # @return [String]
15
+ required :region_code, String
16
+
17
+ # @!method initialize(region_code:, request_options: {})
18
+ # @param region_code [String]
13
19
  # @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}]
14
20
  end
15
21
  end
@@ -9,6 +9,11 @@ module Phoebe
9
9
  extend Phoebe::Internal::Type::RequestParameters::Converter
10
10
  include Phoebe::Internal::Type::RequestParameters
11
11
 
12
+ # @!attribute region_code
13
+ #
14
+ # @return [String]
15
+ required :region_code, String
16
+
12
17
  # @!attribute delim
13
18
  # The characters used to separate elements in the name.
14
19
  #
@@ -21,7 +26,9 @@ module Phoebe
21
26
  # @return [Symbol, Phoebe::Models::Ref::Region::InfoRetrieveParams::RegionNameFormat, nil]
22
27
  optional :region_name_format, enum: -> { Phoebe::Ref::Region::InfoRetrieveParams::RegionNameFormat }
23
28
 
24
- # @!method initialize(delim: nil, region_name_format: nil, request_options: {})
29
+ # @!method initialize(region_code:, delim: nil, region_name_format: nil, request_options: {})
30
+ # @param region_code [String]
31
+ #
25
32
  # @param delim [String] The characters used to separate elements in the name.
26
33
  #
27
34
  # @param region_name_format [Symbol, Phoebe::Models::Ref::Region::InfoRetrieveParams::RegionNameFormat] Control how the name is displayed.
@@ -14,15 +14,22 @@ module Phoebe
14
14
  # @return [String]
15
15
  required :region_type, String
16
16
 
17
+ # @!attribute parent_region_code
18
+ #
19
+ # @return [String]
20
+ required :parent_region_code, String
21
+
17
22
  # @!attribute fmt
18
23
  # Fetch the records in CSV or JSON format.
19
24
  #
20
25
  # @return [Symbol, Phoebe::Models::Ref::Region::ListListParams::Fmt, nil]
21
26
  optional :fmt, enum: -> { Phoebe::Ref::Region::ListListParams::Fmt }
22
27
 
23
- # @!method initialize(region_type:, fmt: nil, request_options: {})
28
+ # @!method initialize(region_type:, parent_region_code:, fmt: nil, request_options: {})
24
29
  # @param region_type [String]
25
30
  #
31
+ # @param parent_region_code [String]
32
+ #
26
33
  # @param fmt [Symbol, Phoebe::Models::Ref::Region::ListListParams::Fmt] Fetch the records in CSV or JSON format.
27
34
  #
28
35
  # @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}]
@@ -9,7 +9,13 @@ module Phoebe
9
9
  extend Phoebe::Internal::Type::RequestParameters::Converter
10
10
  include Phoebe::Internal::Type::RequestParameters
11
11
 
12
- # @!method initialize(request_options: {})
12
+ # @!attribute species_code
13
+ #
14
+ # @return [String]
15
+ required :species_code, String
16
+
17
+ # @!method initialize(species_code:, request_options: {})
18
+ # @param species_code [String]
13
19
  # @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}]
14
20
  end
15
21
  end
@@ -9,6 +9,12 @@ module Phoebe
9
9
  extend Phoebe::Internal::Type::RequestParameters::Converter
10
10
  include Phoebe::Internal::Type::RequestParameters
11
11
 
12
+ # @!attribute species_grouping
13
+ # The order in which groups are returned.
14
+ #
15
+ # @return [Symbol, Phoebe::Models::Ref::Taxonomy::SpeciesGroupListParams::SpeciesGrouping]
16
+ required :species_grouping, enum: -> { Phoebe::Ref::Taxonomy::SpeciesGroupListParams::SpeciesGrouping }
17
+
12
18
  # @!attribute group_name_locale
13
19
  # Locale for species group names. English names are returned for any non-listed
14
20
  # locale or any non-translated group name.
@@ -16,10 +22,12 @@ module Phoebe
16
22
  # @return [String, nil]
17
23
  optional :group_name_locale, String
18
24
 
19
- # @!method initialize(group_name_locale: nil, request_options: {})
25
+ # @!method initialize(species_grouping:, group_name_locale: nil, request_options: {})
20
26
  # Some parameter documentations has been truncated, see
21
27
  # {Phoebe::Models::Ref::Taxonomy::SpeciesGroupListParams} for more details.
22
28
  #
29
+ # @param species_grouping [Symbol, Phoebe::Models::Ref::Taxonomy::SpeciesGroupListParams::SpeciesGrouping] The order in which groups are returned.
30
+ #
23
31
  # @param group_name_locale [String] Locale for species group names. English names are returned for any non-listed lo
24
32
  #
25
33
  # @param request_options [Phoebe::RequestOptions, Hash{Symbol=>Object}]
@@ -6,6 +6,11 @@ module Phoebe
6
6
  class Observations
7
7
  class Geo
8
8
  class Recent
9
+ # The data/obs end-points are used to fetch observations submitted to eBird in
10
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
11
+ # specific country, region or location. 2. Fetch observations for nearby
12
+ # locations - up to a distance of 50km. Each end-point supports optional query
13
+ # parameters which allow you to filter the list of observations returned.
9
14
  class Notable
10
15
  # Get the list of notable observations (up to 30 days ago) of birds seen at
11
16
  # locations within a radius of up to 50 kilometers, from a given set of
@@ -38,10 +43,11 @@ module Phoebe
38
43
  # @see Phoebe::Models::Data::Observations::Geo::Recent::NotableListParams
39
44
  def list(params)
40
45
  parsed, options = Phoebe::Data::Observations::Geo::Recent::NotableListParams.dump_request(params)
46
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
41
47
  @client.request(
42
48
  method: :get,
43
49
  path: "data/obs/geo/recent/notable",
44
- query: parsed.transform_keys(max_results: "maxResults", spp_locale: "sppLocale"),
50
+ query: query.transform_keys(max_results: "maxResults", spp_locale: "sppLocale"),
45
51
  model: Phoebe::Internal::Type::ArrayOf[Phoebe::Data::Observation],
46
52
  options: options
47
53
  )
@@ -6,6 +6,11 @@ module Phoebe
6
6
  class Observations
7
7
  class Geo
8
8
  class Recent
9
+ # The data/obs end-points are used to fetch observations submitted to eBird in
10
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
11
+ # specific country, region or location. 2. Fetch observations for nearby
12
+ # locations - up to a distance of 50km. Each end-point supports optional query
13
+ # parameters which allow you to filter the list of observations returned.
9
14
  class Species
10
15
  # Get all observations of a species, seen up to 30 days ago, at any location
11
16
  # within a radius of up to 50 kilometers, from a given set of coordinates. Results
@@ -50,10 +55,11 @@ module Phoebe
50
55
  # @see Phoebe::Models::Data::Observations::Geo::Recent::SpecieListParams
51
56
  def list(species_code, params)
52
57
  parsed, options = Phoebe::Data::Observations::Geo::Recent::SpecieListParams.dump_request(params)
58
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
53
59
  @client.request(
54
60
  method: :get,
55
61
  path: ["data/obs/geo/recent/%1$s", species_code],
56
- query: parsed.transform_keys(
62
+ query: query.transform_keys(
57
63
  include_provisional: "includeProvisional",
58
64
  max_results: "maxResults",
59
65
  spp_locale: "sppLocale"
@@ -5,10 +5,25 @@ module Phoebe
5
5
  class Data
6
6
  class Observations
7
7
  class Geo
8
+ # The data/obs end-points are used to fetch observations submitted to eBird in
9
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
10
+ # specific country, region or location. 2. Fetch observations for nearby
11
+ # locations - up to a distance of 50km. Each end-point supports optional query
12
+ # parameters which allow you to filter the list of observations returned.
8
13
  class Recent
14
+ # The data/obs end-points are used to fetch observations submitted to eBird in
15
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
16
+ # specific country, region or location. 2. Fetch observations for nearby
17
+ # locations - up to a distance of 50km. Each end-point supports optional query
18
+ # parameters which allow you to filter the list of observations returned.
9
19
  # @return [Phoebe::Resources::Data::Observations::Geo::Recent::Species]
10
20
  attr_reader :species
11
21
 
22
+ # The data/obs end-points are used to fetch observations submitted to eBird in
23
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
24
+ # specific country, region or location. 2. Fetch observations for nearby
25
+ # locations - up to a distance of 50km. Each end-point supports optional query
26
+ # parameters which allow you to filter the list of observations returned.
12
27
  # @return [Phoebe::Resources::Data::Observations::Geo::Recent::Notable]
13
28
  attr_reader :notable
14
29
 
@@ -46,10 +61,11 @@ module Phoebe
46
61
  # @see Phoebe::Models::Data::Observations::Geo::RecentListParams
47
62
  def list(params)
48
63
  parsed, options = Phoebe::Data::Observations::Geo::RecentListParams.dump_request(params)
64
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
49
65
  @client.request(
50
66
  method: :get,
51
67
  path: "data/obs/geo/recent",
52
- query: parsed.transform_keys(
68
+ query: query.transform_keys(
53
69
  include_provisional: "includeProvisional",
54
70
  max_results: "maxResults",
55
71
  spp_locale: "sppLocale"
@@ -5,6 +5,11 @@ module Phoebe
5
5
  class Data
6
6
  class Observations
7
7
  class Geo
8
+ # The data/obs end-points are used to fetch observations submitted to eBird in
9
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
10
+ # specific country, region or location. 2. Fetch observations for nearby
11
+ # locations - up to a distance of 50km. Each end-point supports optional query
12
+ # parameters which allow you to filter the list of observations returned.
8
13
  # @return [Phoebe::Resources::Data::Observations::Geo::Recent]
9
14
  attr_reader :recent
10
15
 
@@ -5,6 +5,11 @@ module Phoebe
5
5
  class Data
6
6
  class Observations
7
7
  class Nearest
8
+ # The data/obs end-points are used to fetch observations submitted to eBird in
9
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
10
+ # specific country, region or location. 2. Fetch observations for nearby
11
+ # locations - up to a distance of 50km. Each end-point supports optional query
12
+ # parameters which allow you to filter the list of observations returned.
8
13
  class GeoSpecies
9
14
  # Find the nearest locations where a species has been seen recently. #### Notes
10
15
  # The species code is typically a 6-letter code, e.g. barswa for Barn Swallow. You
@@ -37,10 +42,11 @@ module Phoebe
37
42
  # @see Phoebe::Models::Data::Observations::Nearest::GeoSpecieListParams
38
43
  def list(species_code, params)
39
44
  parsed, options = Phoebe::Data::Observations::Nearest::GeoSpecieListParams.dump_request(params)
45
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
40
46
  @client.request(
41
47
  method: :get,
42
48
  path: ["data/nearest/geo/recent/%1$s", species_code],
43
- query: parsed.transform_keys(
49
+ query: query.transform_keys(
44
50
  include_provisional: "includeProvisional",
45
51
  max_results: "maxResults",
46
52
  spp_locale: "sppLocale"
@@ -5,6 +5,11 @@ module Phoebe
5
5
  class Data
6
6
  class Observations
7
7
  class Nearest
8
+ # The data/obs end-points are used to fetch observations submitted to eBird in
9
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
10
+ # specific country, region or location. 2. Fetch observations for nearby
11
+ # locations - up to a distance of 50km. Each end-point supports optional query
12
+ # parameters which allow you to filter the list of observations returned.
8
13
  # @return [Phoebe::Resources::Data::Observations::Nearest::GeoSpecies]
9
14
  attr_reader :geo_species
10
15
 
@@ -5,6 +5,11 @@ module Phoebe
5
5
  class Data
6
6
  class Observations
7
7
  class Recent
8
+ # The data/obs end-points are used to fetch observations submitted to eBird in
9
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
10
+ # specific country, region or location. 2. Fetch observations for nearby
11
+ # locations - up to a distance of 50km. Each end-point supports optional query
12
+ # parameters which allow you to filter the list of observations returned.
8
13
  class Historic
9
14
  # Get a list of all taxa seen in a country, region or location on a specific date,
10
15
  # with the specific observations determined by the "rank" parameter (defaults to
@@ -14,13 +19,13 @@ module Phoebe
14
19
  #
15
20
  # @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
21
  #
17
- # @param d [Integer] Path param:
22
+ # @param d [Integer] Path param
18
23
  #
19
24
  # @param region_code [String] Path param: The country, subnational1, subnational2 or location code.
20
25
  #
21
- # @param y_ [Integer] Path param:
26
+ # @param y_ [Integer] Path param
22
27
  #
23
- # @param m [Integer] Path param:
28
+ # @param m [Integer] Path param
24
29
  #
25
30
  # @param cat [Symbol, Phoebe::Models::Data::Observations::Recent::HistoricListParams::Cat] Query param: Only fetch observations from these taxonomic categories
26
31
  #
@@ -45,6 +50,7 @@ module Phoebe
45
50
  # @see Phoebe::Models::Data::Observations::Recent::HistoricListParams
46
51
  def list(d, params)
47
52
  parsed, options = Phoebe::Data::Observations::Recent::HistoricListParams.dump_request(params)
53
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
48
54
  region_code =
49
55
  parsed.delete(:region_code) do
50
56
  raise ArgumentError.new("missing required path argument #{_1}")
@@ -60,7 +66,7 @@ module Phoebe
60
66
  @client.request(
61
67
  method: :get,
62
68
  path: ["data/obs/%1$s/historic/%2$s/%3$s/%4$s", region_code, y_, m, d],
63
- query: parsed.transform_keys(
69
+ query: query.transform_keys(
64
70
  include_provisional: "includeProvisional",
65
71
  max_results: "maxResults",
66
72
  spp_locale: "sppLocale"
@@ -5,6 +5,11 @@ module Phoebe
5
5
  class Data
6
6
  class Observations
7
7
  class Recent
8
+ # The data/obs end-points are used to fetch observations submitted to eBird in
9
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
10
+ # specific country, region or location. 2. Fetch observations for nearby
11
+ # locations - up to a distance of 50km. Each end-point supports optional query
12
+ # parameters which allow you to filter the list of observations returned.
8
13
  class Notable
9
14
  # Get the list of recent, notable observations (up to 30 days ago) of birds seen
10
15
  # in a country, region or location. Notable observations can be for locally or
@@ -34,10 +39,11 @@ module Phoebe
34
39
  # @see Phoebe::Models::Data::Observations::Recent::NotableListParams
35
40
  def list(region_code, params = {})
36
41
  parsed, options = Phoebe::Data::Observations::Recent::NotableListParams.dump_request(params)
42
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
37
43
  @client.request(
38
44
  method: :get,
39
45
  path: ["data/obs/%1$s/recent/notable", region_code],
40
- query: parsed.transform_keys(max_results: "maxResults", spp_locale: "sppLocale"),
46
+ query: query.transform_keys(max_results: "maxResults", spp_locale: "sppLocale"),
41
47
  model: Phoebe::Internal::Type::ArrayOf[Phoebe::Data::Observation],
42
48
  options: options
43
49
  )
@@ -5,6 +5,11 @@ module Phoebe
5
5
  class Data
6
6
  class Observations
7
7
  class Recent
8
+ # The data/obs end-points are used to fetch observations submitted to eBird in
9
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
10
+ # specific country, region or location. 2. Fetch observations for nearby
11
+ # locations - up to a distance of 50km. Each end-point supports optional query
12
+ # parameters which allow you to filter the list of observations returned.
8
13
  class Species
9
14
  # Get the recent observations, up to 30 days ago, of a particular species in a
10
15
  # country, region or location. Results include only the most recent observation
@@ -43,6 +48,7 @@ module Phoebe
43
48
  # @see Phoebe::Models::Data::Observations::Recent::SpecieRetrieveParams
44
49
  def retrieve(species_code, params)
45
50
  parsed, options = Phoebe::Data::Observations::Recent::SpecieRetrieveParams.dump_request(params)
51
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
46
52
  region_code =
47
53
  parsed.delete(:region_code) do
48
54
  raise ArgumentError.new("missing required path argument #{_1}")
@@ -50,7 +56,7 @@ module Phoebe
50
56
  @client.request(
51
57
  method: :get,
52
58
  path: ["data/obs/%1$s/recent/%2$s", region_code, species_code],
53
- query: parsed.transform_keys(
59
+ query: query.transform_keys(
54
60
  include_provisional: "includeProvisional",
55
61
  max_results: "maxResults",
56
62
  spp_locale: "sppLocale"
@@ -4,13 +4,33 @@ module Phoebe
4
4
  module Resources
5
5
  class Data
6
6
  class Observations
7
+ # The data/obs end-points are used to fetch observations submitted to eBird in
8
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
9
+ # specific country, region or location. 2. Fetch observations for nearby
10
+ # locations - up to a distance of 50km. Each end-point supports optional query
11
+ # parameters which allow you to filter the list of observations returned.
7
12
  class Recent
13
+ # The data/obs end-points are used to fetch observations submitted to eBird in
14
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
15
+ # specific country, region or location. 2. Fetch observations for nearby
16
+ # locations - up to a distance of 50km. Each end-point supports optional query
17
+ # parameters which allow you to filter the list of observations returned.
8
18
  # @return [Phoebe::Resources::Data::Observations::Recent::Notable]
9
19
  attr_reader :notable
10
20
 
21
+ # The data/obs end-points are used to fetch observations submitted to eBird in
22
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
23
+ # specific country, region or location. 2. Fetch observations for nearby
24
+ # locations - up to a distance of 50km. Each end-point supports optional query
25
+ # parameters which allow you to filter the list of observations returned.
11
26
  # @return [Phoebe::Resources::Data::Observations::Recent::Species]
12
27
  attr_reader :species
13
28
 
29
+ # The data/obs end-points are used to fetch observations submitted to eBird in
30
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
31
+ # specific country, region or location. 2. Fetch observations for nearby
32
+ # locations - up to a distance of 50km. Each end-point supports optional query
33
+ # parameters which allow you to filter the list of observations returned.
14
34
  # @return [Phoebe::Resources::Data::Observations::Recent::Historic]
15
35
  attr_reader :historic
16
36
 
@@ -43,10 +63,11 @@ module Phoebe
43
63
  # @see Phoebe::Models::Data::Observations::RecentListParams
44
64
  def list(region_code, params = {})
45
65
  parsed, options = Phoebe::Data::Observations::RecentListParams.dump_request(params)
66
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
46
67
  @client.request(
47
68
  method: :get,
48
69
  path: ["data/obs/%1$s/recent", region_code],
49
- query: parsed.transform_keys(
70
+ query: query.transform_keys(
50
71
  include_provisional: "includeProvisional",
51
72
  max_results: "maxResults",
52
73
  spp_locale: "sppLocale"
@@ -4,6 +4,11 @@ module Phoebe
4
4
  module Resources
5
5
  class Data
6
6
  class Observations
7
+ # The data/obs end-points are used to fetch observations submitted to eBird in
8
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
9
+ # specific country, region or location. 2. Fetch observations for nearby
10
+ # locations - up to a distance of 50km. Each end-point supports optional query
11
+ # parameters which allow you to filter the list of observations returned.
7
12
  # @return [Phoebe::Resources::Data::Observations::Recent]
8
13
  attr_reader :recent
9
14
 
@@ -3,6 +3,11 @@
3
3
  module Phoebe
4
4
  module Resources
5
5
  class Product
6
+ # The product end-points make it easy to get the information shown in various
7
+ # pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The
8
+ # checklists submitted on a given date. 3. The most recent checklists
9
+ # submitted. 4. A summary of the checklists submitted on a given date. 5. The
10
+ # details and all the observations of a checklist.
6
11
  class Checklist
7
12
  # Get the details and observations of a checklist.
8
13
  #
@@ -4,6 +4,11 @@ module Phoebe
4
4
  module Resources
5
5
  class Product
6
6
  class Lists
7
+ # The product end-points make it easy to get the information shown in various
8
+ # pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The
9
+ # checklists submitted on a given date. 3. The most recent checklists
10
+ # submitted. 4. A summary of the checklists submitted on a given date. 5. The
11
+ # details and all the observations of a checklist.
7
12
  class Historical
8
13
  # Some parameter documentations has been truncated, see
9
14
  # {Phoebe::Models::Product::Lists::HistoricalRetrieveParams} for more details.
@@ -32,6 +37,7 @@ module Phoebe
32
37
  # @see Phoebe::Models::Product::Lists::HistoricalRetrieveParams
33
38
  def retrieve(d, params)
34
39
  parsed, options = Phoebe::Product::Lists::HistoricalRetrieveParams.dump_request(params)
40
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
35
41
  region_code =
36
42
  parsed.delete(:region_code) do
37
43
  raise ArgumentError.new("missing required path argument #{_1}")
@@ -47,7 +53,7 @@ module Phoebe
47
53
  @client.request(
48
54
  method: :get,
49
55
  path: ["product/lists/%1$s/%2$s/%3$s/%4$s", region_code, y_, m, d],
50
- query: parsed.transform_keys(max_results: "maxResults", sort_key: "sortKey"),
56
+ query: query.transform_keys(max_results: "maxResults", sort_key: "sortKey"),
51
57
  model: Phoebe::Internal::Type::ArrayOf[Phoebe::Models::Product::Lists::HistoricalRetrieveResponseItem],
52
58
  options: options
53
59
  )
@@ -3,7 +3,17 @@
3
3
  module Phoebe
4
4
  module Resources
5
5
  class Product
6
+ # The data/obs end-points are used to fetch observations submitted to eBird in
7
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
8
+ # specific country, region or location. 2. Fetch observations for nearby
9
+ # locations - up to a distance of 50km. Each end-point supports optional query
10
+ # parameters which allow you to filter the list of observations returned.
6
11
  class Lists
12
+ # The product end-points make it easy to get the information shown in various
13
+ # pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The
14
+ # checklists submitted on a given date. 3. The most recent checklists
15
+ # submitted. 4. A summary of the checklists submitted on a given date. 5. The
16
+ # details and all the observations of a checklist.
7
17
  # @return [Phoebe::Resources::Product::Lists::Historical]
8
18
  attr_reader :historical
9
19
 
@@ -22,10 +32,11 @@ module Phoebe
22
32
  # @see Phoebe::Models::Product::ListRetrieveParams
23
33
  def retrieve(region_code, params = {})
24
34
  parsed, options = Phoebe::Product::ListRetrieveParams.dump_request(params)
35
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
25
36
  @client.request(
26
37
  method: :get,
27
38
  path: ["product/lists/%1$s", region_code],
28
- query: parsed.transform_keys(max_results: "maxResults"),
39
+ query: query.transform_keys(max_results: "maxResults"),
29
40
  model: Phoebe::Internal::Type::ArrayOf[Phoebe::Models::Product::ListRetrieveResponseItem],
30
41
  options: options
31
42
  )
@@ -3,6 +3,11 @@
3
3
  module Phoebe
4
4
  module Resources
5
5
  class Product
6
+ # The product end-points make it easy to get the information shown in various
7
+ # pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The
8
+ # checklists submitted on a given date. 3. The most recent checklists
9
+ # submitted. 4. A summary of the checklists submitted on a given date. 5. The
10
+ # details and all the observations of a checklist.
6
11
  class SpeciesList
7
12
  # Some parameter documentations has been truncated, see
8
13
  # {Phoebe::Models::Product::SpeciesListListParams} for more details.
@@ -3,6 +3,11 @@
3
3
  module Phoebe
4
4
  module Resources
5
5
  class Product
6
+ # The product end-points make it easy to get the information shown in various
7
+ # pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The
8
+ # checklists submitted on a given date. 3. The most recent checklists
9
+ # submitted. 4. A summary of the checklists submitted on a given date. 5. The
10
+ # details and all the observations of a checklist.
6
11
  class Stats
7
12
  # Get a summary of the number of checklist submitted, species seen and
8
13
  # contributors on a given date for a country or region.
@@ -3,6 +3,11 @@
3
3
  module Phoebe
4
4
  module Resources
5
5
  class Product
6
+ # The product end-points make it easy to get the information shown in various
7
+ # pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The
8
+ # checklists submitted on a given date. 3. The most recent checklists
9
+ # submitted. 4. A summary of the checklists submitted on a given date. 5. The
10
+ # details and all the observations of a checklist.
6
11
  class Top100
7
12
  # Some parameter documentations has been truncated, see
8
13
  # {Phoebe::Models::Product::Top100RetrieveParams} for more details.
@@ -46,6 +51,7 @@ module Phoebe
46
51
  # @see Phoebe::Models::Product::Top100RetrieveParams
47
52
  def retrieve(d, params)
48
53
  parsed, options = Phoebe::Product::Top100RetrieveParams.dump_request(params)
54
+ query = Phoebe::Internal::Util.encode_query_params(parsed)
49
55
  region_code =
50
56
  parsed.delete(:region_code) do
51
57
  raise ArgumentError.new("missing required path argument #{_1}")
@@ -61,7 +67,7 @@ module Phoebe
61
67
  @client.request(
62
68
  method: :get,
63
69
  path: ["product/top100/%1$s/%2$s/%3$s/%4$s", region_code, y_, m, d],
64
- query: parsed.transform_keys(max_results: "maxResults", ranked_by: "rankedBy"),
70
+ query: query.transform_keys(max_results: "maxResults", ranked_by: "rankedBy"),
65
71
  model: Phoebe::Internal::Type::ArrayOf[Phoebe::Models::Product::Top100RetrieveResponseItem],
66
72
  options: options
67
73
  )
@@ -3,18 +3,43 @@
3
3
  module Phoebe
4
4
  module Resources
5
5
  class Product
6
+ # The data/obs end-points are used to fetch observations submitted to eBird in
7
+ # checklists. There are two categories of end-point: 1. Fetch observations for a
8
+ # specific country, region or location. 2. Fetch observations for nearby
9
+ # locations - up to a distance of 50km. Each end-point supports optional query
10
+ # parameters which allow you to filter the list of observations returned.
6
11
  # @return [Phoebe::Resources::Product::Lists]
7
12
  attr_reader :lists
8
13
 
14
+ # The product end-points make it easy to get the information shown in various
15
+ # pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The
16
+ # checklists submitted on a given date. 3. The most recent checklists
17
+ # submitted. 4. A summary of the checklists submitted on a given date. 5. The
18
+ # details and all the observations of a checklist.
9
19
  # @return [Phoebe::Resources::Product::Top100]
10
20
  attr_reader :top100
11
21
 
22
+ # The product end-points make it easy to get the information shown in various
23
+ # pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The
24
+ # checklists submitted on a given date. 3. The most recent checklists
25
+ # submitted. 4. A summary of the checklists submitted on a given date. 5. The
26
+ # details and all the observations of a checklist.
12
27
  # @return [Phoebe::Resources::Product::Stats]
13
28
  attr_reader :stats
14
29
 
30
+ # The product end-points make it easy to get the information shown in various
31
+ # pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The
32
+ # checklists submitted on a given date. 3. The most recent checklists
33
+ # submitted. 4. A summary of the checklists submitted on a given date. 5. The
34
+ # details and all the observations of a checklist.
15
35
  # @return [Phoebe::Resources::Product::SpeciesList]
16
36
  attr_reader :species_list
17
37
 
38
+ # The product end-points make it easy to get the information shown in various
39
+ # pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The
40
+ # checklists submitted on a given date. 3. The most recent checklists
41
+ # submitted. 4. A summary of the checklists submitted on a given date. 5. The
42
+ # details and all the observations of a checklist.
18
43
  # @return [Phoebe::Resources::Product::Checklist]
19
44
  attr_reader :checklist
20
45