-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
22 changed files
with
645 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 20 additions & 1 deletion
21
app/src/main/java/org/fossasia/openevent/general/sessions/SessionApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
package org.fossasia.openevent.general.sessions | ||
|
||
import io.reactivex.Single | ||
import org.fossasia.openevent.general.speakercall.Proposal | ||
import retrofit2.http.GET | ||
import retrofit2.http.Path | ||
import retrofit2.http.Query | ||
import retrofit2.http.Body | ||
import retrofit2.http.POST | ||
import retrofit2.http.PATCH | ||
|
||
interface SessionApi { | ||
|
||
@GET("events/{eventId}/sessions?include=session-type,microlocation,track") | ||
@GET("events/{eventId}/sessions?include=session-type,microlocation,track,event") | ||
fun getSessionsForEvent( | ||
@Path("eventId") eventId: Long, | ||
@Query("sort") sort: String = "created-at", | ||
@Query("filter") sessionName: String = "[]" | ||
): Single<List<Session>> | ||
|
||
@POST("sessions?include=track,session-type,event,creator,speakers") | ||
fun createSession(@Body proposal: Proposal): Single<Session> | ||
|
||
@PATCH("sessions/{sessionId}") | ||
fun updateSession(@Path("sessionId") sessionId: Long, @Body proposal: Proposal): Single<Session> | ||
|
||
@GET("speakers/{speakerId}/sessions?include=session-type,microlocation,track,event") | ||
fun getSessionsUnderSpeaker( | ||
@Path("speakerId") speakerId: Long, | ||
@Query("filter") filter: String | ||
): Single<List<Session>> | ||
|
||
@GET("sessions/{sessionId}?include=track,session-type,event,creator,speakers") | ||
fun getSessionById(@Path("sessionId") sessionId: Long): Single<Session> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.