Skip to content

Commit 7090d46

Browse files
committed
Update documentation
1 parent 5239333 commit 7090d46

12 files changed

+88
-85
lines changed

blog/2020-10-10-welcome.md

Lines changed: 0 additions & 72 deletions
This file was deleted.

docs/api/all-countries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Highlight = ({children, color}) => (
1616
</span>
1717
);
1818

19-
<Highlight color="#25c2a0">GET</Highlight> /countries
19+
<Highlight color="#25c2a0">GET</Highlight> /v1/countries
2020

2121
## Security
2222
This api use API KEY as an authentication method.

docs/api/all-states.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Highlight = ({children, color}) => (
1616
</span>
1717
);
1818

19-
<Highlight color="#25c2a0">GET</Highlight> /states
19+
<Highlight color="#25c2a0">GET</Highlight> /v1/states
2020

2121
## Security
2222
This api use API KEY as an authentication method.

docs/api/cities-by-country.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
id: cities-by-country
3+
title: Get a list of Cities within country
4+
sidebar_label: Cities By Country
5+
---
6+
7+
export const Highlight = ({children, color}) => (
8+
<span
9+
style={{
10+
backgroundColor: color,
11+
borderRadius: '2px',
12+
color: '#fff',
13+
padding: '0.2rem',
14+
}}>
15+
{children}
16+
</span>
17+
);
18+
19+
<Highlight color="#25c2a0">GET</Highlight> /v1/countries/[ciso]/cities
20+
21+
## Security
22+
This api use API KEY as an authentication method.
23+
* Name: <Highlight color="#1877F2">X-CSCAPI-KEY</Highlight>
24+
* In: header
25+
26+
## Request Parameters
27+
| Name | Located in | Description | Required | Type |
28+
| ---- | ---------- | ----------- | -------- | ---- |
29+
| ciso | URL | ISO2 Code of Country | <Highlight color="#d73232">Required</Highlight> | string |
30+
31+
## Response
32+
| Code | Description |
33+
| ---- | ----------- |
34+
| 200 | Return a list of cities |
35+
| 401 | Unauthorized. |
36+
| 404 | Not Found. |
37+
38+
## Example Success Response
39+
```json
40+
[
41+
{
42+
"id": 133024,
43+
"name": "Mumbai",
44+
},
45+
...
46+
]
47+
```
48+
49+
## Example Error Response
50+
```json
51+
{
52+
"error'": "Unauthorized. You shouldn't be here."
53+
}
54+
```
55+
56+
## Example Not Found Response
57+
```json
58+
{
59+
"error'": "No Cities found."
60+
}
61+
```

docs/api/cities-by-state-country.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Highlight = ({children, color}) => (
1616
</span>
1717
);
1818

19-
<Highlight color="#25c2a0">GET</Highlight> /countries/[ciso]/states/[siso]/cities
19+
<Highlight color="#25c2a0">GET</Highlight> /v1/countries/[ciso]/states/[siso]/cities
2020

2121
## Security
2222
This api use API KEY as an authentication method.

docs/api/country.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Highlight = ({children, color}) => (
1616
</span>
1717
);
1818

19-
<Highlight color="#25c2a0">GET</Highlight> /countries/[ciso]
19+
<Highlight color="#25c2a0">GET</Highlight> /v1/countries/[ciso]
2020

2121
## Security
2222
This api use API KEY as an authentication method.

docs/api/state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Highlight = ({children, color}) => (
1616
</span>
1717
);
1818

19-
<Highlight color="#25c2a0">GET</Highlight> /countries/[ciso]/states/[siso]
19+
<Highlight color="#25c2a0">GET</Highlight> /v1/countries/[ciso]/states/[siso]
2020

2121
## Security
2222
This api use API KEY as an authentication method.

docs/api/states-by-country.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Highlight = ({children, color}) => (
1616
</span>
1717
);
1818

19-
<Highlight color="#25c2a0">GET</Highlight> /countries/[ciso]/states
19+
<Highlight color="#25c2a0">GET</Highlight> /v1/countries/[ciso]/states
2020

2121
## Security
2222
This api use API KEY as an authentication method.

docs/contributing.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ sidebar_label: Contributing
66

77
There are a couple of ways in which you can contribute to Oxidizer, for example:
88

9-
- [Submit bugs and feature requests](https://github.com/dr5hn/countries-states-cities-database/issues), and help us verify as they are checked in
10-
- Review the [Contibution Guidelines](https://github.com/dr5hn/countries-states-cities-database/blob/master/CONTRIBUTING.md) and make pull requests for anything from typos to new content suggestion
9+
- [Submit bugs](https://github.com/dr5hn/countries-states-cities-database/issues), and help us verify as they are checked in.
10+
- [Submit Feature Requests, Feedbacks & Suggestions](https://github.com/dr5hn/countries-states-cities-database/discussions), and help us verify as they are checked in
11+
- Review the [Contibution Guidelines](https://github.com/dr5hn/countries-states-cities-database/blob/master/.github/CONTRIBUTING.md) and make pull requests for anything from typos to new content suggestion.

docs/getting-started.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ slug: /
88
![release](https://img.shields.io/github/v/release/dr5hn/countries-states-cities-database?style=flat-square)
99
![size](https://img.shields.io/github/repo-size/dr5hn/countries-states-cities-database?label=size&style=flat-square)
1010

11-
🌍 World countries, states/regions, cities in JSON, SQL, XML, PLIST, YAML and CSV. All Countries, Cities, States with ISO2, ISO3, Country Code, Phone Code, Capital and Currency [Linked with Each Other By ID]
11+
🌍 World countries, states, regions, provinces, cities, towns in JSON, SQL, XML, PLIST, YAML, and CSV. All Countries, States, Cities with ISO2, ISO3, Country Code, Phone Code, Capital, Native Language, Timezones, Latitude, Longitude, Region, Subregion, Flag Emoji, and Currency. #countries #states #cities
1212

1313
## Insights
14-
Total Countries : 248 <br/>
15-
Total States/Regions/Municipalities : 4,872 <br/>
16-
Total Cities/Towns/Districts : 143,892 <br/>
14+
Total Countries : 250<br/>
15+
Total States/Regions/Municipalities : 4,874<br/>
16+
Total Cities/Towns/Districts : 146,156<br/>
17+
18+
Last Updated On : 22nd December 2020
1719

1820
:::info
1921

docusaurus.config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
projectName: 'csc-website', // Usually your repo name.
1616
customFields: {
1717
description:
18-
'An optimized site generator in React. Docusaurus helps you to move fast and write content. Build documentation websites, blogs, marketing pages, and more.',
18+
'🌍 World countries, states, regions, provinces, cities, towns in JSON, SQL, XML, PLIST, YAML, and CSV. All Countries, States, Cities with ISO2, ISO3, Country Code, Phone Code, Capital, Native Language, Timezones, Latitude, Longitude, Region, Subregion, Flag Emoji, and Currency. #countries #states #cities - dr5hn/countries-states-cities-database',
1919
},
2020
plugins: [
2121
'docusaurus-plugin-sass',
@@ -109,6 +109,16 @@ module.exports = {
109109
label: "Demo",
110110
position: "left",
111111
},
112+
{
113+
href: "https://github.com/dr5hn/countries-states-cities-database/discussions/151",
114+
label: "Feedback/Suggestions",
115+
position: "right",
116+
},
117+
{
118+
href: "https://github.com/dr5hn/csc-website/issues",
119+
label: "Bug/Issues",
120+
position: "right",
121+
},
112122
{
113123
to: "request",
114124
activeBasePath: "request",

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = {
1515
"api/states-by-country",
1616
"api/state",
1717
"api/cities-by-state-country",
18+
"api/cities-by-country",
1819
],
1920
},
2021
{

0 commit comments

Comments
 (0)