File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,13 @@ CHANGELOG
1313 same value.
1414* Updated documentation of anonymizer properties - ` isAnonymousVpn `
1515 and ` isHostingProvider ` - to be more descriptive.
16+ * The ` userCount ` property was added to ` GeoIp2\Record\Traits ` . This is an
17+ integer which indicates the estimated number of users sharing the
18+ IP/network during the past 24 hours. This output is available from GeoIP2
19+ Precision Insights.
20+ * The ` staticIpScore ` property was added to ` GeoIp2\Record\Traits ` . This is
21+ a float which indicates how static or dynamic an IP address is. This
22+ output is available from GeoIP2 Precision Insights.
1623
17242.9.0 (2018-04-10)
1825------------------
Original file line number Diff line number Diff line change 7171 * @property-read string|null $organization The name of the organization associated
7272 * with the IP address. This attribute is only available from the City and
7373 * Insights web services and the GeoIP2 Enterprise database.
74+ * @property-read float|null $staticIPScore An indicator of how static or
75+ * dynamic an IP address is. This property is only available from GeoIP2
76+ * Precision Insights.
7477 * @property-read int|null $userCount The estimated number of users sharing
7578 * the IP/network during the past 24 hours. For IPv4, the count is for the
7679 * individual IP. For IPv6, the count is for the /64 network. This property is
@@ -121,6 +124,7 @@ class Traits extends AbstractRecord
121124 'isTorExitNode ' ,
122125 'network ' ,
123126 'organization ' ,
127+ 'staticIpScore ' ,
124128 'userCount ' ,
125129 'userType ' ,
126130 ];
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ public function testFull()
7474 'is_tor_exit_node ' => true ,
7575 'isp ' => 'Comcast ' ,
7676 'organization ' => 'Blorg ' ,
77+ 'static_ip_score ' => 1.3 ,
7778 'user_count ' => 2 ,
7879 'user_type ' => 'college ' ,
7980 ],
@@ -182,6 +183,12 @@ public function testFull()
182183 '$model->traits->isAnonymousProxy is false '
183184 );
184185
186+ $ this ->assertSame (
187+ 1.3 ,
188+ $ model ->traits ->staticIpScore ,
189+ 'staticIPScore is correct '
190+ );
191+
185192 $ this ->assertSame (
186193 22 ,
187194 $ model ->maxmind ->queriesRemaining ,
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ private function getResponse($service, $ipAddress)
3333 {
3434 if ($ service === 'Insights ' ) {
3535 $ insights = unserialize (serialize ($ this ->country ));
36+ $ insights ['traits ' ]['static_ip_score ' ] = 1.3 ;
3637 $ insights ['traits ' ]['user_count ' ] = 2 ;
3738
3839 $ responses = [
@@ -253,6 +254,12 @@ public function testInsights()
253254 'network '
254255 );
255256
257+ $ this ->assertSame (
258+ 1.3 ,
259+ $ record ->traits ->staticIpScore ,
260+ 'staticIPScore is 1.3 '
261+ );
262+
256263 $ this ->assertSame (
257264 2 ,
258265 $ record ->traits ->userCount ,
You can’t perform that action at this time.
0 commit comments