@@ -8,6 +8,7 @@ import retrofit2.Response
8
8
import retrofit2.http.Body
9
9
import retrofit2.http.DELETE
10
10
import retrofit2.http.GET
11
+ import retrofit2.http.Header
11
12
import retrofit2.http.PATCH
12
13
import retrofit2.http.POST
13
14
import retrofit2.http.Path
@@ -25,6 +26,7 @@ interface ScheduleApi {
25
26
26
27
@GET(" /v2/schedule/groups/{groupId}/events" )
27
28
suspend fun getEventsAuthorized (
29
+ @Header(" Authorization" ) token : String ,
28
30
@Path(" groupId" ) groupId : String ,
29
31
@Query(" week" ) week : Int ,
30
32
@Query(" showOwnSelective" ) showOwnSelective : Boolean ,
@@ -36,24 +38,28 @@ interface ScheduleApi {
36
38
37
39
@GET(" /v2/schedule/events/{eventId}" )
38
40
suspend fun getEventInfo (
41
+ @Header(" Authorization" ) token : String ,
39
42
@Path(" eventId" ) eventId : String ,
40
43
@Query(" week" ) week : Any // You can define the type accordingly
41
44
): Response <DetailedEventResponse >
42
45
43
46
@DELETE(" /v2/schedule/groups/{groupId}/events/{eventId}" )
44
47
suspend fun deleteEventById (
48
+ @Header(" Authorization" ) token : String ,
45
49
@Path(" groupId" ) groupId : String ,
46
50
@Path(" eventId" ) eventId : String
47
51
): Response <DetailedEventResponse >
48
52
49
53
@POST(" /v2/schedule/events" )
50
54
suspend fun addEvent (
55
+ @Header(" Authorization" ) token : String ,
51
56
@Body body : PostEventDTO ,
52
57
@Query(" groupId" ) groupId : String
53
58
): Response <DetailedEventResponse >
54
59
55
60
@PATCH(" /v2/schedule/groups/{groupId}/events/{eventId}" )
56
61
suspend fun editEvent (
62
+ @Header(" Authorization" ) token : String ,
57
63
@Body body : PatchEventDTO ,
58
64
@Path(" groupId" ) groupId : String ,
59
65
@Path(" eventId" ) eventId : String
0 commit comments