Permalink
Browse files

Update response examples

  • Loading branch information...
jloh committed Nov 29, 2018
1 parent f77f320 commit 9fa4f8410375fc66550ab85830d940dddaea3d81
Showing with 126 additions and 68 deletions.
  1. +66 −68 content/docs/v1/endpoints.md
  2. +1 −0 layouts/partials/head/css.html
  3. +59 −0 static/css/syntax.css
@@ -234,22 +234,17 @@ countryip({
When querying multiple IPs using the `ip` arg the return becomes a list like below:
```javascript
countryip(
[
{
"name": "United States",
"country": "US",
"ip": "8.8.8.8",
"country_3": "USA"
},
{
"name": "United States",
"country": "US",
"ip": "198.35.26.96",
"country_3": "USA"
}
]
)
countryip([{
"country": "US",
"country_3": "USA",
"ip": "8.8.8.8",
"name": "United States"
}, {
"country": "US",
"country_3": "USA",
"ip": "198.35.26.96",
"name": "United States"
}])
```
{{% /md %}}
</div>
@@ -404,16 +399,18 @@ This endpoint mainly contains geographical information about an IP, such as its
{{% md %}}
```json
{
"accuracy": 1000,
"area_code": "0",
"asn": 15169,
"continent_code": "NA",
"country": "United States",
"country_code": "US",
"country_code3": "USA",
"ip": "8.8.8.8",
"latitude": "37.7510",
"longitude": "-97.8220",
"organization": "AS15169 Google Inc.",
"timezone": ""
"latitude": "37.751",
"longitude": "-97.822",
"organization": "AS15169 Google LLC",
"organization_name": "Google LLC"
}
```
@@ -422,28 +419,32 @@ When multiple IPs are queried using the the `ip` arg on a request you get a resp
```json
[
{
"accuracy": 1000,
"area_code": "0",
"asn": 15169,
"continent_code": "NA",
"country": "United States",
"country_code": "US",
"country_code3": "USA",
"ip": "8.8.8.8",
"latitude": "37.7510",
"longitude": "-97.8220",
"organization": "AS15169 Google Inc.",
"timezone": ""
"latitude": "37.751",
"longitude": "-97.822",
"organization": "AS15169 Google LLC",
"organization_name": "Google LLC"
},
{
"accuracy": 1000,
"area_code": "0",
"city": "San Francisco",
"asn": 14907,
"continent_code": "NA",
"country": "United States",
"country_code": "US",
"country_code3": "USA",
"ip": "198.35.26.96",
"organization": "AS14907 Wikimedia Foundation, Inc.",
"region": "California",
"timezone": "America/Los_Angeles"
"latitude": "37.751",
"longitude": "-97.822",
"organization": "AS14907 Wikimedia Foundation Inc.",
"organization_name": "Wikimedia Foundation Inc."
}
]
```
@@ -452,54 +453,51 @@ When multiple IPs are queried using the the `ip` arg on a request you get a resp
<div role="tabpanel" class="tab-pane" id="geo-example-jsonp">{{% md %}}
```javascript
geoip({
"city": "San Francisco",
"timezone": "America\/Los_Angeles",
"organization": "AS14907 Wikimedia Foundation, Inc.",
"region": "California",
"latitude": "37.7898",
"country_code": "US",
"ip": "8.8.8.8",
"longitude": "-122.3942",
"organization_name": "Google LLC",
"accuracy": 1000,
"asn": 15169,
"organization": "AS15169 Google LLC",
"longitude": "-97.822",
"country_code3": "USA",
"area_code": "0",
"continent_code": "US",
"ip": "8.8.8.8",
"country": "United States",
"country_code3": "USA"
"continent_code": "NA",
"country_code": "US",
"latitude": "37.751"
})
```
When querying multiple IPs using the `ip` arg the return becomes a list like below:
```javascript
geoip(
[
{
"longitude": "-97.8220",
"latitude": "37.7510",
"timezone": "",
"organization": "AS15169 Google Inc.",
"country_code": "US",
"ip": "8.8.8.8",
"area_code": "0",
"continent_code": "NA",
"country": "United States",
"country_code3": "USA"
},
{
"longitude": "-122.3942",
"city": "San Francisco",
"timezone": "America\/Los_Angeles",
"region": "California",
"organization": "AS14907 Wikimedia Foundation, Inc.",
"country_code": "US",
"ip": "198.35.26.96",
"latitude": "37.7898",
"area_code": "0",
"continent_code": "NA",
"country": "United States",
"country_code3": "USA"
}
]
)
geoip([{
"organization_name": "Google LLC",
"accuracy": 1000,
"asn": 15169,
"organization": "AS15169 Google LLC",
"longitude": "-97.822",
"country_code3": "USA",
"area_code": "0",
"ip": "8.8.8.8",
"country": "United States",
"continent_code": "NA",
"country_code": "US",
"latitude": "37.751"
}, {
"organization_name": "Wikimedia Foundation Inc.",
"accuracy": 1000,
"asn": 14907,
"organization": "AS14907 Wikimedia Foundation Inc.",
"longitude": "-97.822",
"country_code3": "USA",
"area_code": "0",
"ip": "198.35.26.96",
"country": "United States",
"continent_code": "NA",
"country_code": "US",
"latitude": "37.751"
}])
```
{{% /md %}}
</div>
@@ -7,6 +7,7 @@
<!-- Theme CSS -->
<link id="theme-style" rel="stylesheet" href="/css/styles.css">
<link id="theme-style" rel="stylesheet" href="/css/custom.css?v=0.0.1">
<link id="theme-style" rel="stylesheet" href="/css/syntax.css?v=0.0.1">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
{{ "<!--[if lt IE 9]>" | safeHTML }}
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
@@ -0,0 +1,59 @@
/* Background */ .chroma { color: #f8f8f2; background-color: #272822 }
/* Error */ .chroma .err { color: #960050; background-color: #1e0010 }
/* LineTableTD */ .chroma .lntd { ; vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { ; border-spacing: 0; padding: 0; margin: 0; border: 0; width: 100%; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc; display: block; width: 100% }
/* LineNumbersTable */ .chroma .lnt { ; margin-right: 0.4em; padding: 0 0.4em 0 0.4em; display: block; }
/* LineNumbers */ .chroma .ln { ; margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
/* Keyword */ .chroma .k { color: #66d9ef }
/* KeywordConstant */ .chroma .kc { color: #66d9ef }
/* KeywordDeclaration */ .chroma .kd { color: #66d9ef }
/* KeywordNamespace */ .chroma .kn { color: #f92672 }
/* KeywordPseudo */ .chroma .kp { color: #66d9ef }
/* KeywordReserved */ .chroma .kr { color: #66d9ef }
/* KeywordType */ .chroma .kt { color: #66d9ef }
/* NameAttribute */ .chroma .na { color: #a6e22e }
/* NameClass */ .chroma .nc { color: #a6e22e }
/* NameConstant */ .chroma .no { color: #66d9ef }
/* NameDecorator */ .chroma .nd { color: #a6e22e }
/* NameException */ .chroma .ne { color: #a6e22e }
/* NameFunction */ .chroma .nf { color: #a6e22e }
/* NameOther */ .chroma .nx { color: #a6e22e }
/* NameTag */ .chroma .nt { color: #f92672 }
/* Literal */ .chroma .l { color: #ae81ff }
/* LiteralDate */ .chroma .ld { color: #e6db74 }
/* LiteralString */ .chroma .s { color: #e6db74 }
/* LiteralStringAffix */ .chroma .sa { color: #e6db74 }
/* LiteralStringBacktick */ .chroma .sb { color: #e6db74 }
/* LiteralStringChar */ .chroma .sc { color: #e6db74 }
/* LiteralStringDelimiter */ .chroma .dl { color: #e6db74 }
/* LiteralStringDoc */ .chroma .sd { color: #e6db74 }
/* LiteralStringDouble */ .chroma .s2 { color: #e6db74 }
/* LiteralStringEscape */ .chroma .se { color: #ae81ff }
/* LiteralStringHeredoc */ .chroma .sh { color: #e6db74 }
/* LiteralStringInterpol */ .chroma .si { color: #e6db74 }
/* LiteralStringOther */ .chroma .sx { color: #e6db74 }
/* LiteralStringRegex */ .chroma .sr { color: #e6db74 }
/* LiteralStringSingle */ .chroma .s1 { color: #e6db74 }
/* LiteralStringSymbol */ .chroma .ss { color: #e6db74 }
/* LiteralNumber */ .chroma .m { color: #ae81ff }
/* LiteralNumberBin */ .chroma .mb { color: #ae81ff }
/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff }
/* LiteralNumberHex */ .chroma .mh { color: #ae81ff }
/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff }
/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff }
/* LiteralNumberOct */ .chroma .mo { color: #ae81ff }
/* Operator */ .chroma .o { color: #f92672 }
/* OperatorWord */ .chroma .ow { color: #f92672 }
/* Comment */ .chroma .c { color: #75715e }
/* CommentHashbang */ .chroma .ch { color: #75715e }
/* CommentMultiline */ .chroma .cm { color: #75715e }
/* CommentSingle */ .chroma .c1 { color: #75715e }
/* CommentSpecial */ .chroma .cs { color: #75715e }
/* CommentPreproc */ .chroma .cp { color: #75715e }
/* CommentPreprocFile */ .chroma .cpf { color: #75715e }
/* GenericDeleted */ .chroma .gd { color: #f92672 }
/* GenericEmph */ .chroma .ge { font-style: italic }
/* GenericInserted */ .chroma .gi { color: #a6e22e }
/* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { color: #75715e }

0 comments on commit 9fa4f84

Please sign in to comment.