-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
44 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# Annotations | ||
|
||
The annotations for Ktorfit |
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
8 changes: 5 additions & 3 deletions
8
ktorfit-annotations/src/commonMain/kotlin/de/jensklingenberg/ktorfit/http/Body.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,10 +1,12 @@ | ||
package de.jensklingenberg.ktorfit.http | ||
|
||
/** | ||
* Use this to upload data in an HTTP Body | ||
* | ||
Use this to upload data in an HTTP Body | ||
@POST("createIssue") | ||
fun upload(@Body issue: Issue) | ||
* ``` | ||
* @POST("createIssue") | ||
* fun upload(@Body issue: Issue) | ||
* ``` | ||
*/ | ||
@Target(AnnotationTarget.VALUE_PARAMETER) | ||
annotation class Body |
8 changes: 7 additions & 1 deletion
8
ktorfit-annotations/src/commonMain/kotlin/de/jensklingenberg/ktorfit/http/DELETE.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,7 +1,13 @@ | ||
package de.jensklingenberg.ktorfit.http | ||
|
||
/** Make a DELETE request. | ||
* | ||
* ``` | ||
* @DELETE("deleteIssue") | ||
* fun deleteIssue(@Query("id") id: String) | ||
* ``` | ||
* @param value relative url path, if empty, you need to have a parameter with [Url] | ||
* */ | ||
* | ||
*/ | ||
@Target(AnnotationTarget.FUNCTION) | ||
annotation class DELETE(val value: String = "") |
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
2 changes: 1 addition & 1 deletion
2
ktorfit-annotations/src/commonMain/kotlin/de/jensklingenberg/ktorfit/http/FieldMap.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
4 changes: 4 additions & 0 deletions
4
ktorfit-annotations/src/commonMain/kotlin/de/jensklingenberg/ktorfit/http/GET.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
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
10 changes: 3 additions & 7 deletions
10
ktorfit-annotations/src/commonMain/kotlin/de/jensklingenberg/ktorfit/http/Url.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,14 +1,10 @@ | ||
package de.jensklingenberg.ktorfit.http | ||
|
||
|
||
/** | ||
* ``` | ||
* @GET | ||
* suspend fun request(@Url url: String): List<Comment> | ||
* | ||
@GET() | ||
suspend fun request(@Url url: String): List< Comment> | ||
*/ | ||
@Target(AnnotationTarget.VALUE_PARAMETER) | ||
annotation class Url |