@@ -27,77 +27,102 @@ init_per_suite(Config) ->
2727end_per_suite (_Config ) ->
2828 ok = application :stop (ipinfo ).
2929
30+
31+ % %% ipinfo_SUITE ==> {{badmatch,{ok,
32+
33+ continent =>
34+ #{<<" code" >> => <<" NA" >>,
35+ <<" name" >> => <<" North America" >>},
36+ country => <<" US" >>,
37+ country_currency =>
38+ #{<<" code" >> => <<" USD" >>,<<" symbol" >> => <<" $" >>},
39+ country_flag =>
40+ #{<<" emoji" >> => <<240 ,159 ,135 ,186 ,240 ,159 ,135 ,184 >>,
41+ <<" unicode" >> => <<" U+1F1FA U+1F1F8" >>},
42+ country_flag_url =>
43+ <<" https:/cdn.ipinfo.io/static/images/countries-flags/US.svg" >>,
44+ country_name => <<" United States" >>,
45+ hostname => <<" dns.google" >>,ip => <<" 8.8.8.8" >>,
46+ is_anonymous => false ,is_eu => false ,
47+ latitude => <<" 38.0088" >>,loc => <<" 38.0088,-122.1175" >>,
48+ longitude => <<" -122.1175" >>,org => <<" AS15169 Google LLC" >>,
49+ postal => <<" 94043" >>,region => <<" California" >>,
50+ timezone => <<" America/Los_Angeles" >>,
51+ <<" abuse" >> =>
52+ #{address =>
53+ <<" US, CA, Mountain View, 1600 Amphitheatre Parkway, 94043" >>,
54+ country => <<" US" >>,
55+ email => <<" network-abuse@google.com" >>,
56+ name => <<" Abuse" >>,<<" network" >> => <<" 8.8.8.0/24" >>,
57+ <<" phone" >> => <<" +1-650-253-0000" >>},
58+ <<" asn" >> =>
59+ #{domain => <<" google.com" >>,name => <<" Google LLC" >>,
60+ type => <<" hosting" >>,<<" asn" >> => <<" AS15169" >>,
61+ <<" route" >> => <<" 8.8.8.0/24" >>},
62+ <<" company" >> =>
63+ #{domain => <<" google.com" >>,name => <<" Google LLC" >>,
64+ type => <<" hosting" >>},
65+ <<" domains" >> =>
66+ #{ip => <<" 8.8.8.8" >>,total => 15669 ,
67+ <<" domains" >> =>
68+ [<<" hdchina.org" >>,<<" musicool.cn" >>,
69+ <<" ztgg.org" >>,<<" itempurl.com" >>,
70+ <<" authrock.com" >>]},
71+ <<" is_anycast" >> => true ,<<" is_hosting" >> => true ,
72+ <<" is_mobile" >> => false ,<<" is_satellite" >> => false ,
73+ <<" privacy" >> =>
74+ #{proxy => false ,relay => false ,service => <<>>,
75+ <<" hosting" >> => true ,<<" tor" >> => false ,
76+ <<" vpn" >> => false }}}},
77+
78+
3079details_test (Config ) ->
3180 Token = proplists :get_value (token , Config ),
3281 {ok , IpInfo } = ipinfo :create (Token ),
3382 {ok , #{
34- ip := <<" 8.8.8.8" >>,
35- loc := <<" 37.4056,-122.0775" >>,
36- hostname := <<" dns.google" >>,
37- city := <<" Mountain View" >>,
38- region := <<" California" >>,
39- country := <<" US" >>,
40- org := <<" AS15169 Google LLC" >>,
41- postal := <<" 94043" >>,
42- timezone := <<" America/Los_Angeles" >>,
43- country_name := <<" United States" >>,
44- latitude := <<" 37.4056" >>,
45- longitude := <<" -122.0775" >>,
46- is_eu := false ,
47- country_flag := #{
48- <<" emoji" >> := <<240 ,159 ,135 ,186 ,240 ,159 ,135 ,184 >>,
49- <<" unicode" >> := <<" U+1F1FA U+1F1F8" >>
50- },
51- country_currency := #{
52- <<" code" >> := <<" USD" >>,
53- <<" symbol" >> := <<" $" >>
54- },
55- continent := #{
56- <<" code" >> := <<" NA" >>,
57- <<" name" >> := <<" North America" >>
58- },
59- country_flag_url := <<" https:/cdn.ipinfo.io/static/images/countries-flags/US.svg" >>,
60- is_anonymous := false ,
61- <<" abuse" >> := #{
62- name := <<" Abuse" >>,
63- address := <<" US, CA, Mountain View, 1600 Amphitheatre Parkway, 94043" >>,
64- country := <<" US" >>,
65- email := <<" network-abuse@google.com" >>,
66- <<" network" >> := <<" 8.8.8.0/24" >>,
67- <<" phone" >> := <<" +1-650-253-0000" >>
68- },
69- <<" asn" >> := #{
70- name := <<" Google LLC" >>,
71- type := <<" hosting" >>,
72- domain := <<" google.com" >>,
73- <<" asn" >> := <<" AS15169" >>,
74- <<" route" >> := <<" 8.8.8.0/24" >>
75- },
76- <<" company" >> := #{
77- name := <<" Google LLC" >>,
78- type := <<" hosting" >>,
79- domain := <<" google.com" >>
80- },
81- <<" domains" >> := #{
82- total := 15669 ,ip := <<" 8.8.8.8" >>,
83- <<" domains" >> := [
84- <<" hdchina.org" >>,
85- <<" musicool.cn" >>,
86- <<" ztgg.org" >>,
87- <<" itempurl.com" >>,
88- <<" authrock.com" >>
89- ]
90- },
91- <<" is_anycast" >> := true ,
92- <<" is_hosting" >> := true ,
93- <<" is_mobile" >> := false ,
94- <<" is_satellite" >> := false ,
95- <<" privacy" >> := #{
96- service := <<>>,
97- proxy := false ,
98- relay := false ,
99- <<" hosting" >> := true ,
100- <<" tor" >> := false ,
101- <<" vpn" >> := false
102- }
83+ city => <<" Mountain View" >>,
84+ continent =>
85+ #{<<" code" >> => <<" NA" >>,
86+ <<" name" >> => <<" North America" >>},
87+ country => <<" US" >>,
88+ country_currency =>
89+ #{<<" code" >> => <<" USD" >>,<<" symbol" >> => <<" $" >>},
90+ country_flag =>
91+ #{<<" emoji" >> => <<240 ,159 ,135 ,186 ,240 ,159 ,135 ,184 >>,
92+ <<" unicode" >> => <<" U+1F1FA U+1F1F8" >>},
93+ country_flag_url =>
94+ <<" https:/cdn.ipinfo.io/static/images/countries-flags/US.svg" >>,
95+ country_name => <<" United States" >>,
96+ hostname => <<" dns.google" >>,ip => <<" 8.8.8.8" >>,
97+ is_anonymous => false ,is_eu => false ,
98+ latitude => <<" 38.0088" >>,loc => <<" 38.0088,-122.1175" >>,
99+ longitude => <<" -122.1175" >>,org => <<" AS15169 Google LLC" >>,
100+ postal => <<" 94043" >>,region => <<" California" >>,
101+ timezone => <<" America/Los_Angeles" >>,
102+ <<" abuse" >> =>
103+ #{address =>
104+ <<" US, CA, Mountain View, 1600 Amphitheatre Parkway, 94043" >>,
105+ country => <<" US" >>,
106+ email => <<" network-abuse@google.com" >>,
107+ name => <<" Abuse" >>,<<" network" >> => <<" 8.8.8.0/24" >>,
108+ <<" phone" >> => <<" +1-650-253-0000" >>},
109+ <<" asn" >> =>
110+ #{domain => <<" google.com" >>,name => <<" Google LLC" >>,
111+ type => <<" hosting" >>,<<" asn" >> => <<" AS15169" >>,
112+ <<" route" >> => <<" 8.8.8.0/24" >>},
113+ <<" company" >> =>
114+ #{domain => <<" google.com" >>,name => <<" Google LLC" >>,
115+ type => <<" hosting" >>},
116+ <<" domains" >> =>
117+ #{ip => <<" 8.8.8.8" >>,total => 15669 ,
118+ <<" domains" >> =>
119+ [<<" hdchina.org" >>,<<" musicool.cn" >>,
120+ <<" ztgg.org" >>,<<" itempurl.com" >>,
121+ <<" authrock.com" >>]},
122+ <<" is_anycast" >> => true ,<<" is_hosting" >> => true ,
123+ <<" is_mobile" >> => false ,<<" is_satellite" >> => false ,
124+ <<" privacy" >> =>
125+ #{proxy => false ,relay => false ,service => <<>>,
126+ <<" hosting" >> => true ,<<" tor" >> => false ,
127+ <<" vpn" >> => false }
103128 }} = ipinfo :details (IpInfo , <<" 8.8.8.8" >>).
0 commit comments