StudyPlanetApi

interface StudyPlanetApi

Retrofit API interface for Study Planet, defining various HTTP methods for interacting with the Study Planet server.

Functions

Link copied to clipboard
@GET(value = "v1/users")
abstract suspend fun authenticate(): AuthenticatedUserDto

Authenticates the current user.

Link copied to clipboard
@GET(value = "v1/health/version")
abstract suspend fun getHealth(): HealthDto

Checks the health and version of the Study Planet server.

Link copied to clipboard
@POST(value = "v1/users/login")
abstract suspend fun login(@Body body: LoginDto): AuthenticatedUserDto

Attempts to log in a user with the provided LoginDto.

Link copied to clipboard
@POST(value = "v1/users/register")
abstract suspend fun register(@Body body: RegisterDto): AuthenticatedUserDto

Registers a new user with the provided RegisterDto.

Link copied to clipboard
@POST(value = "v1/actions/discover")
abstract suspend fun startDiscovering(@Body body: DiscoverActionDto): Response<Unit>

Initiates the process of discovering a new planet.

Link copied to clipboard
@POST(value = "v1/actions/explore")
abstract suspend fun startExploring(@Body body: ExploreActionDto): Response<Unit>

Initiates the process of exploring a planet.

Link copied to clipboard
@PUT(value = "v1/actions/discover")
abstract suspend fun stopDiscovering(@Body body: DiscoverActionDto): DiscoverActionResponseDto

Stops the process of discovering a planet.

Link copied to clipboard
@PUT(value = "v1/actions/explore")
abstract suspend fun stopExploring(@Body body: ExploreActionDto): ExploreActionResponseDto

Stops the process of exploring a planet.