You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ API that provides information on the **administrative areas of Indonesia**, from
11
11
12
12
Built with [NestJS framework](https://nestjs.com) and writen in TypeScript. [Prisma](https://www.prisma.io) is used as the ORM to interact with any kind of database (in future). For now, we use MongoDB.
13
13
14
+
> **NEW!**[Island endpoints 🏝️](#12-get-islands-by-name) available in version 1.2.0 or higher.
15
+
14
16
<h2>Table of Content</h2>
15
17
16
18
-[Getting Started](#getting-started)
@@ -24,11 +26,14 @@ Built with [NestJS framework](https://nestjs.com) and writen in TypeScript. [Pri
24
26
-[4. Get Regencies by Name](#4-get-regencies-by-name)
25
27
-[5. Get Specific Regency](#5-get-specific-regency)
26
28
-[6. Get All Districts in a Regency](#6-get-all-districts-in-a-regency)
29
+
-[Get All Islands in a Regency](#get-all-islands-in-a-regency)
27
30
-[7. Get Districts by Name](#7-get-districts-by-name)
28
31
-[8. Get Specific District](#8-get-specific-district)
29
32
-[9. Get All Villages in a District](#9-get-all-villages-in-a-district)
30
33
-[10. Get Villages by Name](#10-get-villages-by-name)
31
34
-[11. Get Specific Village](#11-get-specific-village)
35
+
-[12. Get Islands by Name](#12-get-islands-by-name)
36
+
-[13. Get Specific Island](#13-get-specific-island)
32
37
-[Query Parameters](#query-parameters)
33
38
-[`sortBy`](#sortby)
34
39
-[`sortOrder`](#sortorder)
@@ -149,6 +154,19 @@ GET /regencies/{regencyCode}/districts
149
154
150
155
> This endpoint also support [`sortBy`][sortby-query] and [`sortOrder`][sortorder-query] queries.
151
156
157
+
### Get All Islands in a Regency
158
+
159
+
```
160
+
GET /regencies/{regencyCode}/islands
161
+
```
162
+
163
+
- Use this endpoint to **get all islands in a regency**.
164
+
- The `{regencyCode}` must be **4 numeric characters**. If not, you will get `400 Bad Request` response.
165
+
- This endpoint **will return** the array of island if the `{regencyCode}` is exists. Otherwise, you will get a `404 Not Found` response.
- Use this endpoint to **get the islands by its name**.
238
+
- The `{islandName}`**is required** and must be **at least 3 characters**, maximum 255 characters, and does not contains any other symbols besides `'-/`. If not, you will get `400 Bad Request` response.
239
+
- This endpoint **will return** an array of island, or an **empty array**`[]` if there are no island matched with the `{islandName}`.
0 commit comments