Skip to content

Commit 15cdc5b

Browse files
committed
Adjust api paths for comment endpoints
1 parent 6dda6c3 commit 15cdc5b

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

library/src/main/kotlin/me/proxer/library/api/comment/InternalApi.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import retrofit2.http.Query
1313
*/
1414
internal interface InternalApi {
1515

16-
@GET("comments/info")
16+
@GET("comment/info")
1717
fun commentById(@Query("id") id: String): ProxerCall<Comment>
1818

19-
@GET("comments/entry")
19+
@GET("comment/entry")
2020
fun commentByEntry(@Query("eid") entryId: String): ProxerCall<Comment>
2121

2222
@FormUrlEncoded
23-
@POST("comments/create")
23+
@POST("comment/create")
2424
fun create(
2525
@Field("eid") entryId: String,
2626
@Field("rating") rating: Int?,
@@ -30,7 +30,7 @@ internal interface InternalApi {
3030
): ProxerCall<Unit>
3131

3232
@FormUrlEncoded
33-
@POST("comments/update")
33+
@POST("comment/update")
3434
fun update(
3535
@Field("id") id: String,
3636
@Field("rating") rating: Int?,

library/src/test/kotlin/me/proxer/library/api/comment/CommentEndpointTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class CommentEndpointTest : ProxerTest() {
4444
.execute()
4545
}
4646

47-
request.path shouldEqual "/api/v1/comments/info?id=12"
47+
request.path shouldEqual "/api/v1/comment/info?id=12"
4848
}
4949

5050
@Test
@@ -56,7 +56,7 @@ class CommentEndpointTest : ProxerTest() {
5656
.execute()
5757
}
5858

59-
request.path shouldEqual "/api/v1/comments/entry?eid=7"
59+
request.path shouldEqual "/api/v1/comment/entry?eid=7"
6060
}
6161

6262
@Test

library/src/test/kotlin/me/proxer/library/api/comment/UpdateCommentEndpointTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class UpdateCommentEndpointTest : ProxerTest() {
3838
.execute()
3939
}
4040

41-
request.path shouldEqual "/api/v1/comments/create"
41+
request.path shouldEqual "/api/v1/comment/create"
4242
}
4343

4444
@Test
@@ -90,7 +90,7 @@ class UpdateCommentEndpointTest : ProxerTest() {
9090
.execute()
9191
}
9292

93-
request.path shouldEqual "/api/v1/comments/update"
93+
request.path shouldEqual "/api/v1/comment/update"
9494
}
9595

9696
@Test

0 commit comments

Comments
 (0)