Skip to content

Commit

Permalink
Update base url
Browse files Browse the repository at this point in the history
  • Loading branch information
bensonarafat committed Jul 25, 2024
1 parent 112c2f9 commit c005cc2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
API Endpoint

```curl
https://nigeria-states-towns-lga.onrender.com/api
https://nigeria-states-towns-lgas.onrender.com/api
```
API Overview:

Your API provides information about Nigeria State, Towns, Local Government Areas, languages spoken, hospitals, airports, universities, polytechnics, and more. Here's how to interact with it with some examples:

### Get All States and their details
1. Method: `GET`
2. Endpoint: `https://nigeria-states-towns-lga.onrender.com/api/all`
2. Endpoint: `https://nigeria-states-towns-lgas.onrender.com/api/all`
3. Description: Retrieve a list of all states in Nigeria.
4. Response: An array of state objects, each containing information about the state.

Expand All @@ -46,7 +46,7 @@ Your API provides information about Nigeria State, Towns, Local Government Areas

### Get only states information
1. Method: `GET`
2. Endpoint: `https://nigeria-states-towns-lga.onrender.com/api/states`
2. Endpoint: `https://nigeria-states-towns-lgas.onrender.com/api/states`
3. Description: Retrieve a list of all states in Nigeria.
4. Response: Returns a list of states in nigeria only

Expand Down Expand Up @@ -76,14 +76,14 @@ Your API provides information about Nigeria State, Towns, Local Government Areas

### Get Towns in a State
1. Method: `GET`
2. Endpoint: `https://nigeria-states-towns-lga.onrender.com/api/{state_code}/towns`
2. Endpoint: `https://nigeria-states-towns-lgas.onrender.com/api/{state_code}/towns`
3. Description: Retrieve a list of towns within a specific state by providing the state_code.
4. Response: An array of towns objects within the specified state.

### Example

```curl
https://nigeria-states-towns-lga.onrender.com/api/FCT/towns
https://nigeria-states-towns-lgas.onrender.com/api/FCT/towns
```
### Response

Expand All @@ -110,14 +110,14 @@ https://nigeria-states-towns-lga.onrender.com/api/FCT/towns

### Get LGA in a State
1. Method: `GET`
2. Endpoint: `https://nigeria-states-towns-lga.onrender.com/api/{state_code}/lgas`
2. Endpoint: `https://nigeria-states-towns-lgas.onrender.com/api/{state_code}/lgas`
3. Description: Retrieve a list of LGA within a specific state by providing the state_code.
4. Response: An array of lga objects within the specified state.

### Example

```curl
https://nigeria-states-towns-lga.onrender.com/api/ABIA/lgas
https://nigeria-states-towns-lgas.onrender.com/api/ABIA/lgas
```
### Response

Expand Down Expand Up @@ -150,13 +150,13 @@ You can also get items for any of the states. Examples: like the National Resour


1. Method: `GET`
2. Endpoint: `https://nigeria-states-towns-lga.onrender.com/api/{state_code}/{type}`
2. Endpoint: `https://nigeria-states-towns-lgas.onrender.com/api/{state_code}/{type}`
3. Description: Retrieve a list of items within a specific state by providing the state_code and type.
4. Response: An array of items objects within the specified state.


```curl
https://nigeria-states-towns-lga.onrender.com/api/FCT/airports
https://nigeria-states-towns-lgas.onrender.com/api/FCT/airports
```

### Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"info": {
"_postman_id": "213c44b5-c8bb-4137-911e-2a85dd34d513",
"name": "Nigeris States, Towns and Local Government Area",
"description": "## **API Endpoint**\n\n`https://nigeria-states-towns-lga.onrender.com/api` \n\nAPI Overview:\n\nYour API provides information about Nigeria State, Towns, Local Government Areas, languages spoken, hospitals, airports, universities, polytechnics, and more. Here's how to interact with it using Postman: \n\n1. **Get All States**\n \n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lga.onrender.com/api/all`\n \n- **Description:** Retrieve a list of all states in Nigeria.\n \n- **Response:** An array of state objects, each containing information about the state.\n \n\n**2\\. Get All Local Government Areas for a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lga.onrender.com/api/{state_code}/lgas`\n \n- **Description:** Retrieve a list of all Local Government Areas for a specific state by providing the `state_code`.\n \n- **Response:** An array of local government area objects within the specified state.\n \n\n**3\\. Get Towns in a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lga.onrender.com/api/{state_code}/towns`\n \n- **Description:** Retrieve a list of towns within a specific Local Government Area by providing the `state_code`.\n \n- **Response:** An array of state objects within the specified LGA.\n \n\n**4\\. Get Spoken Languages in a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lga.onrender.com/api/{state_code}/languages`\n \n- **Description:** Get a list of languages spoken in a specific state.\n \n- **Response:** An array of language objects associated with the specified state.\n \n\n**5\\. Get Hospitals in a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lga.onrender.com/api/{state_code}/hospitals`\n \n- **Description:** Retrieve a list of hospitals in a specific state.\n \n- **Response:** An array of hospital objects within the specified state.\n \n\n**6\\. Get Airports in a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lga.onrender.com/api/{state_code}/airports`\n \n- **Description:** Get a list of airports in a specific state.\n \n- **Response:** An array of airport objects within the specified state.\n \n\n**7\\. Get Universities and Polytechnics in a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lga.onrender.com/api/{state_code}/universities`\n \n- **Description:** Retrieve a list of universities and polytechnics in a specific state.\n \n- **Response:** An array of university and polytechnic objects within the specified state.\n \n\n**8\\. Additional Features:**\n\n- Your API may provide additional endpoints for more specific data, such as getting information about specific towns, language details, or individual hospitals and airports.",
"description": "## **API Endpoint**\n\n`https://nigeria-states-towns-lgas.onrender.com/api` \n\nAPI Overview:\n\nYour API provides information about Nigeria State, Towns, Local Government Areas, languages spoken, hospitals, airports, universities, polytechnics, and more. Here's how to interact with it using Postman: \n\n1. **Get All States**\n \n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lgas.onrender.com/api/all`\n \n- **Description:** Retrieve a list of all states in Nigeria.\n \n- **Response:** An array of state objects, each containing information about the state.\n \n\n**2\\. Get All Local Government Areas for a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lgas.onrender.com/api/{state_code}/lgas`\n \n- **Description:** Retrieve a list of all Local Government Areas for a specific state by providing the `state_code`.\n \n- **Response:** An array of local government area objects within the specified state.\n \n\n**3\\. Get Towns in a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lgas.onrender.com/api/{state_code}/towns`\n \n- **Description:** Retrieve a list of towns within a specific Local Government Area by providing the `state_code`.\n \n- **Response:** An array of state objects within the specified LGA.\n \n\n**4\\. Get Spoken Languages in a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lgas.onrender.com/api/{state_code}/languages`\n \n- **Description:** Get a list of languages spoken in a specific state.\n \n- **Response:** An array of language objects associated with the specified state.\n \n\n**5\\. Get Hospitals in a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lgas.onrender.com/api/{state_code}/hospitals`\n \n- **Description:** Retrieve a list of hospitals in a specific state.\n \n- **Response:** An array of hospital objects within the specified state.\n \n\n**6\\. Get Airports in a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lgas.onrender.com/api/{state_code}/airports`\n \n- **Description:** Get a list of airports in a specific state.\n \n- **Response:** An array of airport objects within the specified state.\n \n\n**7\\. Get Universities and Polytechnics in a State:**\n\n- **Method:** GET\n \n- **Endpoint:** `https://nigeria-states-towns-lgas.onrender.com/api/{state_code}/universities`\n \n- **Description:** Retrieve a list of universities and polytechnics in a specific state.\n \n- **Response:** An array of university and polytechnic objects within the specified state.\n \n\n**8\\. Additional Features:**\n\n- Your API may provide additional endpoints for more specific data, such as getting information about specific towns, language details, or individual hospitals and airports.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_uid": "16950503-213c44b5-c8bb-4137-911e-2a85dd34d513"
},
Expand Down Expand Up @@ -1625,12 +1625,12 @@
{
"id": "132cc748-469d-42de-a872-4e59a4cd3af3",
"key": "endpoint",
"value": "https://nigeria-states-towns-lga.onrender.com/api"
"value": "https://nigeria-states-towns-lgas.onrender.com/api"
},
{
"id": "820d55c7-0551-4f0c-9f08-72ff4617dcc3",
"key": "endpoint2",
"value": "https://nigeria-states-towns-lga.onrender.com/api",
"value": "https://nigeria-states-towns-lgas.onrender.com/api",
"type": "string"
},
{
Expand Down

0 comments on commit c005cc2

Please sign in to comment.