-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathconsultant_apidoc.txt
More file actions
314 lines (220 loc) · 10.4 KB
/
consultant_apidoc.txt
File metadata and controls
314 lines (220 loc) · 10.4 KB
1
2
3
4
5
6
7
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
.................. API DOC CONSULTANT ....................
............................................................... USER APPOINTMENT DETAILS API..............................
URL_1= http://3.109.14.4/consult/api_user_appoint?user=raju%20rastogi .... user specific data
URL_2= http://3.109.14.4/consult/api_user_appoint?type=all ..... all appointments data for all users
END POINT = api_user_appoint
QUERY PARAMETER= user AND type (where user= username and type = all/nothing )
EXPLAINATION = 1. From this api, we will get the data regarding the appointment details of particular
user (either consulatnt or public user ) , and to get user specific data all you need
to do is that under query parameter(user) you have to enter the name of the user(consultant/public user).
2. AND same api can be used to get details of all the appointments, for this all you have to do is that
under query parameter (type) you have to enter 'all'.
SQL QUERY= "SELECT * FROM `appointment` WHERE `username` = '$user'; ... user specific query
SQL QUERY= "SELECT * FROM `appointment` ; ..... query to get all details of appointment
TABLE NAME = 'appointment'
RESPONSE= we will get all user details in json format
ex-
{
"status": "true", // status returns true if data for appointment was found
"data":[
{
"cid": "5", //consultant id
"category": "nutrition", // speciality/category of consultant
"username": "parththosani", // username
"cname": "dr.mohan das", // consultant name
"date_appointment": "2021-08-24", // date of consultant
"status": "active", // status=active if appointment was booked and payment was paid else inactive
"email": "parth@gmail.com", // email of user
"mobile": "9854512541", // mobileno. of user
"bid": "915200", // booking id
"time_appointment": "12:35:00" // time of appointment
"com_mob": "9998754343" // consultant mob
} // time of appointment
}],
"result": "found" // result -found tells that there is data in table
}
DATATYPE OF RESPONSE : JSON OBJECT
DATATYPE:
# Name Type
1 cid int
2 category varchar(100)
3 username varchar(100)
4 cname varchar(100)
5 date_appointment date
6 status varchar(100)
7 email varchar(100)
8 mobile varchar(20)
9 bidPrimary int
10 time_appointment time
11 com_mob varchar(20)
.................................................................... CONSULTANT GIVEN APPOINTMENTS.........................
URL_1=http://3.109.14.4/consult/api_con_appoint?type=all&consultant=raju%20rastogi ................. ALL appointments detail which particular consultant have
url_2 =http://3.109.14.4/consult/api_con_appoint?type=all&consultant=raju%20rastogi&user=parththosani ...... details of appointment given by consultant to particular user
END POINT =api_con_appoint
QUERY PARAMETER= user AND type and consultant (where user= username and type = all/nothing and consultant = consultant name )
EXPLAINATION = 1. From this api, we will get the data regarding the appointment details
if i am consultant and i want to see all the of appointment given by me- than i will hit this api
in this api there are 3 query parameter one is type and other is user and consultant ,
type=all and consultant= cons. name than you will get all the details of appointment given,
but is type != all, consultant=cons.name and user=username ,
than we will get details of that particular patient to which consultant hAS given time for appointment.
SQL QUERY= "SELECT * FROM `appointment` WHERE `cname` = '$user' AND `username` = '$patient'; ... user specific query
SQL QUERY= "SELECT * FROM `appointment` WHERE `cname` = '$user'; ..... query to get all details of appointment
TABLE NAME = 'appointment'
RESPONSE= we will get all user details in json format
ex-
{
"status": "true", // status returns true if data for appointment was found
"data":[
{
"cid": "5", //consultant id
"category": "nutrition", // speciality/category of consultant
"username": "parththosani", // username
"cname": "dr.mohan das", // consultant name
"date_appointment": "2021-08-24", // date of consultant
"status": "active", // status=active if appointment was booked and payment was paid else inactive
"email": "parth@gmail.com", // email of user
"mobile": "9854512541", // mobileno. of user
"bid": "915200", // booking id
"time_appointment": "12:35:00" // time of appointment
"com_mob": "9998754343" // consultant mob
} // time of appointment
}],
"result": "found" // result -found tells that there is data in table
}
DATATYPE OF RESPONSE : JSON OBJECT
DATATYPE:
# Name Type
1 cid int
2 category varchar(100)
3 username varchar(100)
4 cname varchar(100)
5 date_appointment date
6 status varchar(100)
7 email varchar(100)
8 mobile varchar(20)
9 bidPrimary int
10 time_appointment time
11 com_mob varchar(20)
.................................................................... chat api -- GLOBAL AND PRIVATE ......................................................
URL_GLOBAL = http://3.109.14.4/consult/api_chat?room=global
URL_PRIVATE = http://3.109.14.4/consult/api_chat?id=bid61524&room=private
END POINT =api_chat
QUERY PARAMETER= room AND id (where room= global/private and id = roomid(required only when room is private) )
EXPLAINATION = 1. From this api, we will get the data regarding the chat msg
if i want to get chat msg which are global and all i need to do is under query parameter room i have to write 'global'
and if i want msg from particular room id than i have to enter room= private and in id = roomid of that user
SQL QUERY= "SELECT * FROM `msg` WHERE `room` = 'global1' ; ... global msg query
SQL QUERY= "SELECT * FROM `msg` WHERE `room` = '$id'; ..... query to get msg of particular room
TABLE NAME = 'msg'
RESPONSE= we will get all user details in json format
ex-
{
"status": "true",
"data": [
{
"sno": "19", // serial no
"msg": "hello baaby", // msg
"room": "bid61524", // room id
"ip": "::1", // server ip
"rtime": "2021-08-09 11:01:56" // time of msg
}
],
"result": "found"
}
DATATYPE OF RESPONSE= JSON
DATATYPE- # Name Type
1 sno int (primary)
2 msg text
3 room text
4 ip text
5 rtime datetime
.................................................................... AUTHENTICATING USER API ......................................................
URL_GLOBAL = http://3.109.14.4/consult/api_authenticate?user=jaydeep&password=jaydeep12345
END POINT =api_authenticate
QUERY PARAMETER= user AND password (where user= username and password = password )
EXPLAINATION = 1. this api is used to authenticate user ,that a user exist in our database or not, for this in query parameter
you have to send user = username and password= password
SQL QUERY= ""SELECT * FROM `login` WHERE `username`='$user' and 'password' = 'password'";
TABLE NAME = 'login'
RESPONSE= we will get all user details in json format
ex-
{
"status": "success", // user exist in table if status success
"data": {
"email": "jaydeep@gmail.com", // user email
"username": "jaydeep" // user name
},
"result": "found" // data found in table
}
DATATYPE OF RESPONSE= JSON
DATATYPE- # Name Type
1 UIDPrimary int
2 username varchar(30)
3 password varchar(30)
4 name varchar(30)
5 email varchar(30)
6 phone decimal(10,0)
7 img longblob
.......................................................................... CONSULATNT DETAIL API....................................................................
URL_1 = http://3.109.14.4/consult/api_getconsultant?user=all ............. to get all consultant
URL_PRIVATE = http://3.109.14.4/consult/api_getconsultant?user=raju rastogi ......... to get particular consultant
END POINT =api_getconsultant
QUERY PARAMETER= user (where user =all/username )
EXPLAINATION = 1. From this api, we will get the data regarding the consultant
if i want to get all consultant details all i need to do is under query parameter user i have to write 'all'
and if i want consultant detail for particular consultant than i have to enter user= username of that user
SQL QUERY= "SELECT * FROM `consultant` ; ... all consultant query
SQL QUERY= "SELECT * FROM `consultant` WHERE `name` = '$user'; ..... query to get particular consultant
TABLE NAME = 'consultant'
RESPONSE= we will get all user details in json format
ex-
{
"status": "success",
"data": [
{
"c_id": "1",
"name": "raju rastogi",
"category": "paediatrition",
"office": "n-23,andheri,maharastra",
"mobile": "999896471",
"ctime": "16:24:00",
"pass": "123",
"lno": "123332",
"stime": "20:23:00",
"email": "raju2@gmail.com",
"img": "http://3.109.14.4/consult/img/1.jpg"
},
]
"result": "found"
}
DATATYPE OF RESPONSE= JSON
............................................................................ USER DETAIL API.....................................................
URL_1 = http://3.109.14.4/consult/api_getalluser?user=all ............. to get all user
URL_PRIVATE = http://3.109.14.4/consult/api_getalluser?user=parththosani ......... to get particular user
END POINT =api_getalluser
QUERY PARAMETER= user (where user =all/username )
EXPLAINATION = 1. From this api, we will get the data regarding the user
if i want to get all user details all i need to do is under query parameter user i have to write 'all'
and if i want user detail for particular user than i have to enter user= username of that user
SQL QUERY= "SELECT * FROM `login` ; ... all user query
SQL QUERY= "SELECT * FROM `login` WHERE `username` = '$user'; ..... query to get particular user
TABLE NAME = 'login'
RESPONSE= we will get all user details in json format
ex-
{
"status": "success",
"data": [
{
"UID": "1",
"username": "manassinkar",
"password": "manas12345",
"name": "Manas",
"email": "manas.sinkar@gmail.com",
"phone": "9022942188",
"img": "http://3.109.14.4/consult/img/2.jpg"
},
]
"result": "found"
}
DATATYPE OF RESPONSE= JSON