-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRetrofitService.kt
42 lines (30 loc) · 901 Bytes
/
RetrofitService.kt
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
package com.example.myapplication
import retrofit2.Call
import retrofit2.http.*
interface RetrofitService {
@GET("json/students/")
fun getStudentsList() : Call<ArrayList<personn>>
@POST("json/students/")
fun createStudent(
@Body params : HashMap<String, Any>
) : Call<personn>
@POST("json/students/")
fun createStudentEasy(
@Body person : personn
) : Call<personn>
@POST("user/signup/")
@FormUrlEncoded
fun register(
@Field("username")username : String,
@Field("password1")password1 : String,
@Field("password2")password2 : String
) : Call<User>
@POST("user/login/")
@FormUrlEncoded
fun login(
@Field("username") username : String,
@Field("password") password : String
) : Call<User>
@GET("/instagram/post/lis/all/")
fun getAllPosts() : Call<ArrayList<Post>>
}