Dokumentasi
Identitas
- Nama
- Description
✔️ Already Implemented
- URL
/report
- Method
POST
- Headers
Content-Type
:multipart/form-data
Authorization
:Bearer <token>
- Request Body
name
asstring
- Response
{ "status": "success", "error": false, "message": "Report is successfully added to Firestore", "date": "04-09-2022 07:49:49", "data": { "reportId": "auJtkpoCbuljkxis" } }
- Description
- Email
- Description
✔️ Already Implemented
- URL
/report
- Method
POST
- Headers
Content-Type
:multipart/form-data
Authorization
:Bearer <token>
- Request Body
email
asstring
- Response
{ "status": "success", "error": false, "message": "Report is successfully added to Firestore", "date": "04-09-2022 07:49:49", "data": { "reportId": "auJtkpoCbuljkxis" } }
- Description
Keterangan
- Laporan
- Description
✔️ Already Implemented
- URL
/report
- Method
POST
- Headers
Content-Type
:multipart/form-data
Authorization
:Bearer <token>
- Request Body
message
asstring
- Response
{ "status": "success", "error": false, "message": "Report is successfully added to Firestore", "date": "04-09-2022 07:49:49", "data": { "reportId": "auJtkpoCbuljkxis" } }
- Description
- Keparahan
- Description
Data Type: String
Pada field Keparahan, user akan memilih opsi Tingkat Keparahan berdasarkan nilai/value drop down list yang ada (Perlu diperbaiki sesegera mungkin, Parah, Sedang, Kecil, dan Saran).
Salah satu opsinya menjadi placeholder dari input field Tingkat Keparahan
Label Tingkat Keparahan berada di sebelah kiri drop downnya (satu line)
- URL
/report
- Method
POST
- Headers
Content-Type
:multipart/form-data
Authorization
:Bearer <token>
- Request Body
severity
asstring
- Response
{ "status": "success", "error": false, "message": "Report is successfully added to Firestore", "date": "04-09-2022 07:49:49", "data": { "reportId": "auJtkpoCbuljkxis" } }
- Description
- Platform dan Lingkungan Perangkat
- Description
Data Type: String, except RAM. RAM is number/integer
Pada field Platform dan Lingkungan Perangkat, ada 3 field bertipe Text yaitu Phone Brand, RAM, dan Android Version
Untuk RAM
batasin user dari menulis Aplhanumeric (e.g: a-z / A-Z), jadi hanya bisa fill number (e.g: 0-9)Tidak Perlu karena sudah AUTOFILLNote:
Coba tes ngisi aja fieldnyaNote 2:
Cara batasinnya pake REGEX (syntaxnya: ^[0-9]+/i ) - URL
/report
- Method
POST
- Headers
Content-Type
:multipart/form-data
Authorization
:Bearer <token>
- Request Body
phone_brand
asstring
ram
asnumber or integer
android_version
asstring
Note: Untukandroid_version
Karena nantinya ini bakal Autofill dari androidnya dan ketika aku lihat di sini (https://apilevels.com/) itu ada banyak data dan column, jadi kita hanya kirim yang "Version" column sebagai string ke database aja
- Response
{ "status": "success", "error": false, "message": "Report is successfully added to Firestore", "date": "04-09-2022 07:49:49", "data": { "reportId": "auJtkpoCbuljkxis" } }
- Description
- Lampirkan berkas, video, atau gambar (Optional, tidak wajib diisi oleh user)
- Description
Data Type: An image, file, and video are typically in a binary format
Acceptable Format: .txt/.pdf/.JPG/.png/.mp4/.mov/ | Read Here https://cloud.google.com/dlp/docs/supported-file-types
Pada field Lampirkan berkas, video, atau gambar, user akan mengupload sebuah file (txt, pdf, video, atau gambar)
User akan dibatasi oleh Size Limit sebanyak 1 MB dan Maximum File sebanyak satu buah
Referensi 1: How to Mengupload file dengan Cloud Storage di Android
Referensi 2: [Setting2 dan Adding Cloud Storage Dependencies SDK] Get started with Cloud Storage on Android
Referensi 3: How Retrieve video from Firebase Storage? kotlin
Referensi 4: Uploading image from Android to GCS
Referensi 5: How to Choose File and Upload to Firebase Storage - Android Kotlin
- URL
/report
- Method
POST
- Headers
Content-Type
:multipart/form-data
Authorization
:Bearer <token>
- Request Body
file
asfile
must be a valid image file (gif, jpg, jpeg, jpe, png), max size 1 MB
- Response
{ "status": "success", "error": false, "message": "File(s) is successfully added to Firebase Cloud Storage", "date": "04-09-2022 07:49:49", "data": { "reportId": "auJtkpoCbuljkxis" } }
- Description
GET All Reports
- Description
Tinggal Ganti HTTP Method ke
GET
- URL
/report
- Parameters & Query
- Key:
token
| Value:<secret-token>
- Key:
- Method
GET
- Headers
Authorization
:Bearer <token>
- Response
{ "status": "success", "error": false, "data": { "getDataFromFirestore": [ { "message": "Aku menemukan error di fitur login", "severity": "Saran", "name": "Gilang Martadinata", "ID_DocumentReport": "8uRommr1PaJTEDR_", "email": "geemde@gmail.com", "createdAt": "02-09-2022 16:28:31", "statusBug": "Opened", "key": "8uRommr1PaJTEDR_" }, { "name": "Hazlan Muhammad Qodri", "createdAt": "02-09-2022 16:28:00", "email": "hzlnqodrey@gmail.com", "message": "saya menemukan error di fitur penerjemah bahasa isyarat", "ID_DocumentReport": "lpaXT3gVAeqFgvVt", "severity": "Saran", "statusBug": "Assigned", "key": "lpaXT3gVAeqFgvVt" } ] } }