Fakultas Ilmu Komputer UI

README.md 6.04 KB
Newer Older
LUTHFI DZAKY SAIFUDDIN's avatar
LUTHFI DZAKY SAIFUDDIN committed
1
2
# PoiPoLe-DTB Beasiswa Miskin dan Disabilitas

Dzaky Noor Hasyim's avatar
Dzaky Noor Hasyim committed
3
## Coverage
4
5
6
7
[![coverage report](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/dtb-beasiswa-miskin-dan-disabilitas/poipole-dtb-beasiswa-miskin-dan-disabilitas/badges/staging/coverage.svg?job=UnitTest)](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/dtb-beasiswa-miskin-dan-disabilitas/poipole-dtb-beasiswa-miskin-dan-disabilitas/badges/staging/coverage.svg?job=UnitTest)

## Pipeline
[![pipeline report](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/dtb-beasiswa-miskin-dan-disabilitas/poipole-dtb-beasiswa-miskin-dan-disabilitas/badges/staging/pipeline.svg?job=UnitTest)](https://gitlab.cs.ui.ac.id/ppl-fasilkom-ui/2020/ppl-c/dtb-beasiswa-miskin-dan-disabilitas/poipole-dtb-beasiswa-miskin-dan-disabilitas/badges/staging/pipeline.svg?job=UnitTest)
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

# PPLapangan Tembak & PoiPoLe - DTB Layanan Siswa Disabilitas (Back End) - bisaGo

>bisaGo is a mobile application made with Flutter and Django REST API to gather information from users about disability friendly facilities. 

## Developers

PPLapanganTembak
1. [Adzkia Aisyah Afrah Hardian](https://gitlab.cs.ui.ac.id/adzkia.aisyah)
2. [Agnes Handoko](https://gitlab.cs.ui.ac.id/agneshandoko)
3. [Fakhira Devina](https://gitlab.cs.ui.ac.id/hiradevina)
4. [Faza Siti Sabira Prakoso](https://gitlab.cs.ui.ac.id/fazasabirappl)
5. [Firriyal bin Yahya](https://gitlab.cs.ui.ac.id/feriyalbinyahya)

PoiPoLeGan
1. [Bimo Iman Smartadi](https://gitlab.cs.ui.ac.id/bimo.iman)
2. [Bayukanta Iqbal Gunawan](https://gitlab.cs.ui.ac.id/Bayukanta)
3. [Dzaky Noor Hasyim](https://gitlab.cs.ui.ac.id/NoorHasyim)
4. [Muhammad Abdurrahman](https://gitlab.cs.ui.ac.id/muhammad.abdurrahman71)
5. [Usman Sidiq](https://gitlab.cs.ui.ac.id/usman.sidiq71)



## Table of Content

* Install
* API Testing

## Install
The back end side uses django, for installing please use this command:

```bash
pip install -r requirements.txt
```

To check the dependencies that have been installed within file requirements, use this command:
```bash
pip list
```

48
## API
49
### 1. To register your account:
50
Make `POST` request to API endpoint `/api/register` with `name`, `phone_number`, `email`, `password` key.
51
52

### 2. To receive token auth
53
54
55
56
57
58
59
60
61
62
63
64
65
Make `POST` request to API endpoint `/api-token-auth/` with `username`, `password`, key. where the username is your `email`. <br>
It will return a json with key `token`.

### 3. To check your user detail:
Make `GET` request to API endpoint `/api/user-detail/` with `email` key. <br>
Alternatively, you can access `/api/user-detail/*email*` where the email is your email and without the asterisk.<br>
It will return a json with key:
* `username` : username that you can use to request your token. The same as your email
* `name` : Your full name. Saved in the last_name.
* `email` : Your email
* `phone_number` : Your phone number

### 4. To register a location:
66
Make `POST` request to API endpoint `/informasi-lokasi/lokasi/add/` with the following key:
67
68
69
70
71
72
73
* `name` : location name
* `altitude` : location altitude, a float.
* `longitude` : location longitude, a float.
* `alamat` : address
* `no_telp` : Phone number 
* `image` : string of sourc image `.jpg`

74
### 5. To view a location list:
75
Make `GET` request to API endpoint `/informasi-lokasi/lokasi/list/`. <br>
76
It will return a json list of locations with key:
Usman Sidiq's avatar
Usman Sidiq committed
77
* `id`	: id of location
78
79
80
81
82
83
84
85
* `name` : location name
* `altitude` : location altitude, a float.
* `longitude` : location longitude, a float.
* `alamat` : address
* `no_telp` : Phone number 
* `image` : string of sourc image `.jpg`

### 6. To view a location details:
86
Make `GET` request to API endpoint `/informasi-lokasi/lokasi/detail/*nama_lokasi*/`. <br>
87
88
89
90
91
92
It will return a json with key:
* `name` : location name
* `altitude` : location altitude, a float.
* `longitude` : location longitude, a float.
* `alamat` : address
* `no_telp` : Phone number 
Usman Sidiq's avatar
Usman Sidiq committed
93
* `image` : string of source image `.jpg`
94

95
### 7. To register a facility:
96
Make `POST` request to API endpoint `/informasi-lokasi/lokasi/add-fasilitas/*nama-lokasi*/` with the following key:
97
98
99
100
101
102
103
104
105
106
107
108
109
110
* `tag` : Fasility Tag
    * The options are :
        * KURSI_RODA = 'KR'
        * LIFT_DISABILITAS = 'LF'
        * TOILET_DISABILITTAS = 'TD'
        * MASJID_MUSHOLA = 'MM'
        * GUIDING_BLOCK = 'GB'
        * BIDANG_MIRING = 'BM'
        * TEMAN_DISABILITAS = 'CP'
        * JURU_BAHASA_ISYARAT = 'JI'
        * TONGKAT_DISABILITAS_NETRA = 'TN'
        * KURSI_UMUM_DISABILITAS = 'KD'
        * TEMPAT_PARKIR_DISABILITAS = 'PK'
        * RUNNING_TEXT = 'RT'
Usman Sidiq's avatar
Usman Sidiq committed
111
		* TEMPAT_PARKIR_BIASA = 'TB'
112
113
    
    * Put as a String separated by space
114
        * example: `KR LF TD`
115
116
117
<br>

* `deskripsi` : Facility description.
118
* `rating` : rating for the Facility, an integer 1-5.
119
<br>
120
121
<b>Make sure you have token it your request header.</b>
<b>Add this to your request header. `Authorization` with value `token *your_token_from_request*`</b>
122

Usman Sidiq's avatar
Usman Sidiq committed
123
### 8. To see a facility list:
124
Make `GET` request to API endpoint `/informasi-lokasi/lokasi/list-fasilitas/*nama-lokasi*/`. <br>
125
It will return a json with the following key:
Usman Sidiq's avatar
Usman Sidiq committed
126
127
128
* `id`: id of the facility
* `nama_lokasi`: location name of the facility
* `deskripsi`: the description
129
* `creator`: User's last name who registered the facility
Usman Sidiq's avatar
Usman Sidiq committed
130
131
132
133
134
135
136
* `date_time`: Date when the facility was made
* `like`: how many people like this facility. default is 0
* `dislike`: how many people dislike this facility. default is 0
* `rating`: rating of the facility. Default is 3
* `tag`: Facility tag
* `image`: Image for facility
* `is_verified`: Verified status
137
138
139


### 9. To see a facility details:
140
Make `GET` request to API endpoint `/informasi-lokasi/lokasi/detail-fasilitas/*nama-lokasi*/*id-fasilitas*/`. <br>
141
142
143
It will return a json with the following key:
* `nama_lokasi`: location name of the facility
* `deskripsi`: the description
144
145
146
147
148
149
150
151
* `creator`: User's last name who registered the facility
* `date_time`: Date when the facility was made
* `like`: how many people like this facility. default is 0
* `dislike`: how many people dislike this facility. default is 0
* `rating`: rating of the facility. Default is 3
* `tag`: Facility tag
* `image`: Image for facility
* `is_verified`: Verified status
152

153