A fork of Simple Time Tracker with WearOS support. (Now integrated upstream)
0

Configure Feed

Select the types of activity you want to include in your feed.

refactor: Rename `POST` to `PUT`

According to MDN, `PUT` is the verb with the semantics for
replacing the set of resources at a specific path -- what we are
doing for `setCurrentActivities`. This rename reduces semantic
confusion even though it has no impacts on runtime behavior.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT

Joseph Hale (Feb 26, 2024, 10:27 PM -0700) ebbb5c07 de321da5

+3 -3
+1 -1
app/src/main/res/values/wear.xml
··· 8 8 <item>/stt//GET/ping</item> 9 9 <item>/stt//GET/activities</item> 10 10 <item>/stt//GET/activities/current</item> 11 - <item>/stt//POST/activities/current</item> 11 + <item>/stt//PUT/activities/current</item> 12 12 <item>/stt//GET/activities/:ID/tags</item> 13 13 <item>/stt//GET/settings</item> 14 14 </string-array>
+1 -1
wearrpc/src/main/java/com/example/util/simpletimetracker/wearrpc/Request.kt
··· 9 9 val PING = "/stt//GET/ping" 10 10 val QUERY_ACTIVITIES = "/stt//GET/activities" 11 11 val QUERY_CURRENT_ACTIVITIES = "/stt//GET/activities/current" 12 - val SET_CURRENT_ACTIVITIES = "/stt//POST/activities/current" 12 + val SET_CURRENT_ACTIVITIES = "/stt//PUT/activities/current" 13 13 val QUERY_TAGS_FOR_ACTIVITY = "/stt//GET/activities/:ID/tags" 14 14 val QUERY_SETTINGS = "/stt//GET/settings" 15 15 }
+1 -1
wearrpc/src/main/java/com/example/util/simpletimetracker/wearrpc/SimpleTimeTrackerAPI.kt
··· 32 32 suspend fun queryCurrentActivities(): Array<CurrentActivity> 33 33 34 34 /** 35 - * /stt//POST/activities/current 35 + * /stt//PUT/activities/current 36 36 * 37 37 * Replaces the currently running activity/activities with the given activities 38 38 */