Skip to content

Commit

Permalink
Deprecate metro code
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Jan 13, 2025
1 parent bd2fb16 commit c37cffb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

* Ruby 3.0+ is now required. If you're using Ruby 2.5, 2.6, or 2.7, please
use version 1.2.0 of this gem.
* Deprecated `metro_code` on `MaxMind::GeoIP2::Record::Location`. The code
values are no longer being maintained.

## 1.2.0 (2023-12-04)

Expand Down
6 changes: 3 additions & 3 deletions lib/maxmind/geoip2/record/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ def longitude
get('longitude')
end

# The metro code of the location if the location is in the US. MaxMind
# returns the same metro codes as the Google AdWords API. See
# https://developers.google.com/adwords/api/docs/appendix/cities-DMAregions.
# The metro code is a no-longer-maintained code for targeting
# advertisements in Google.
#
# @return [Integer, nil]
# @deprecated Code values are no longer maintained.
def metro_code
get('metro_code')
end
Expand Down

0 comments on commit c37cffb

Please sign in to comment.