Skip to content

Commit 3d3d179

Browse files
committed
Update docs for 2.0.0
1 parent 1431dee commit 3d3d179

File tree

4 files changed

+66
-27
lines changed

4 files changed

+66
-27
lines changed

.travis.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: objective-c
22

33
before_install:
4-
- wget http://download.mono-project.com/archive/3.2.3/macos-10-x86/MonoFramework-MDK-3.2.3.macos10.xamarin.x86.pkg
5-
- sudo installer -pkg "MonoFramework-MDK-3.2.3.macos10.xamarin.x86.pkg" -target /
6-
- export EnableNuGetPackageRestore="true"
7-
- git submodule update --init --recursive
8-
- mono --runtime=v4.0 .nuget/NuGet.exe install NUnit.Runners -Version 2.6.1 -o packages
4+
- wget "http://download.mono-project.com/archive/3.8.0/macos-10-x86/MonoFramework-MDK-3.8.0.macos10.xamarin.x86.pkg"
5+
- sudo installer -pkg "MonoFramework-MDK-3.8.0.macos10.xamarin.x86.pkg" -target /
6+
- export EnableNuGetPackageRestore="true"
7+
- git submodule update --init --recursive
8+
- mono --runtime=v4.0 .nuget/NuGet.exe install NUnit.Runners -Version 2.6.1 -o packages
99

1010
script:
1111
- xbuild

GeoIP2/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("0.5.0.0")]
36-
[assembly: AssemblyFileVersion("0.5.0.0")]
35+
[assembly: AssemblyVersion("2.0.0.0")]
36+
[assembly: AssemblyFileVersion("2.0.0.0")]
3737

3838
[assembly: InternalsVisibleTo("MaxMind.GeoIP2.UnitTests")]

README.md

+54-20
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# GeoIP2 .NET API #
22

3-
## Beta Note ##
4-
5-
This is a beta release. The API may change before the first production
6-
release, which will be numbered 2.0.0.
7-
8-
You may find information on the GeoIP2 beta release process on [our
9-
website](http://www.maxmind.com/en/geoip2_beta).
10-
113
## Description ##
124

135
This distribution provides an API for the GeoIP2 [web services]
@@ -54,30 +46,72 @@ See the API documentation for more details.
5446

5547
## Web Service Example ##
5648

49+
### Country Service ###
50+
5751
```csharp
5852
// This creates a WebServiceClient object that can be reused across requests.
5953
// Replace "42" with your user ID and "license_key" with your license
6054
// key.
6155
var client = new WebServiceClient(42, "license_key");
6256

63-
// Replace "City" with the method corresponding to the web service that
64-
// you are using, e.g., "Country", "Insights".
65-
var city = client.City("128.101.101.101");
57+
// Do the lookup
58+
var response = client.Country("128.101.101.101");
6659

67-
Console.WriteLine(city.Country.IsoCode); // 'US'
68-
Console.WriteLine(city.Country.Name); // 'United States'
69-
Console.WriteLine(city.Country.Names["zh-CN"]); // '美国'
60+
Console.WriteLine(response.Country.IsoCode); // 'US'
61+
Console.WriteLine(response.Country.Name); // 'United States'
62+
Console.WriteLine(response.Country.Names["zh-CN"]); // '美国'
63+
```
7064

71-
Console.WriteLine(city.MostSpecificSubdivision.Name); // 'Minnesota'
72-
Console.WriteLine(city.MostSpecificSubdivision.IsoCode); // 'MN'
65+
### City Service ###
7366

74-
Console.WriteLine(city.City.Name); // 'Minneapolis'
67+
```csharp
68+
// This creates a WebServiceClient object that can be reused across requests.
69+
// Replace "42" with your user ID and "license_key" with your license
70+
// key.
71+
var client = new WebServiceClient(42, "license_key");
7572

76-
Console.WriteLine(city.Postal.Code); // '55455'
73+
// Do the lookup
74+
var response = client.City("128.101.101.101");
7775

78-
Console.WriteLine(city.Location.Latitude); // 44.9733
79-
Console.WriteLine(city.Location.Longitude); // -93.2323
76+
Console.WriteLine(response.Country.IsoCode); // 'US'
77+
Console.WriteLine(response.Country.Name); // 'United States'
78+
Console.WriteLine(response.Country.Names["zh-CN"]); // '美国'
79+
80+
Console.WriteLine(response.MostSpecificSubdivision.Name); // 'Minnesota'
81+
Console.WriteLine(response.MostSpecificSubdivision.IsoCode); // 'MN'
82+
83+
Console.WriteLine(response.City.Name); // 'Minneapolis'
84+
85+
Console.WriteLine(response.Postal.Code); // '55455'
86+
87+
Console.WriteLine(response.Location.Latitude); // 44.9733
88+
Console.WriteLine(response.Location.Longitude); // -93.2323
89+
```
90+
91+
### Insights Service ###
92+
93+
```csharp
94+
// This creates a WebServiceClient object that can be reused across requests.
95+
// Replace "42" with your user ID and "license_key" with your license
96+
// key.
97+
var client = new WebServiceClient(42, "license_key");
98+
99+
// Do the lookup
100+
var response = client.Insights("128.101.101.101");
101+
102+
Console.WriteLine(response.Country.IsoCode); // 'US'
103+
Console.WriteLine(response.Country.Name); // 'United States'
104+
Console.WriteLine(response.Country.Names["zh-CN"]); // '美国'
105+
106+
Console.WriteLine(response.MostSpecificSubdivision.Name); // 'Minnesota'
107+
Console.WriteLine(response.MostSpecificSubdivision.IsoCode); // 'MN'
108+
109+
Console.WriteLine(response.City.Name); // 'Minneapolis'
110+
111+
Console.WriteLine(response.Postal.Code); // '55455'
80112
113+
Console.WriteLine(response.Location.Latitude); // 44.9733
114+
Console.WriteLine(response.Location.Longitude); // -93.2323
81115
```
82116

83117
## Database Usage ##

releasenotes.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
GeoIP2 .NET API Release Notes
22
=============================
33

4+
2.0.0 (2014-09-29)
5+
------------------
6+
7+
* First production release.
8+
49
0.5.0 (2014-09-24)
510
------------------
611

0 commit comments

Comments
 (0)