diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5115826..20c9e44 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,17 +5,14 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -30,7 +27,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -43,9 +62,9 @@
-
+ {
+ "associatedIndex": 8
+}
@@ -62,10 +81,11 @@
"RunOnceActivity.ShowReadmeOnStart": "true",
"Spring Boot.TampopotestApplication.executor": "Run",
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true",
- "git-widget-placeholder": "master",
+ "git-widget-placeholder": "swgemini3",
"junie.onboarding.icon.badge.shown": "true",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "C:/Users/student/IdeaProjects/tampopo-server",
+ "node.js.selected.package.tslint": "(autodetect)",
"to.speed.mode.migration.done": "true",
"vue.rearranger.settings.migration": "true"
}
@@ -96,9 +116,30 @@
1764234417568
+
+
+ 1766048059448
+
+
+
+ 1766048059448
+
+
+
+ 1766048073429
+
+
+
+ 1766048073429
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/example/tampopotest/ActivityController.java b/src/main/java/com/example/tampopotest/ActivityController.java
new file mode 100644
index 0000000..19363ae
--- /dev/null
+++ b/src/main/java/com/example/tampopotest/ActivityController.java
@@ -0,0 +1,68 @@
+package com.example.tampopotest;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+@RestController
+@RequestMapping("/users/{user-id}/activities")
+public class ActivityController {
+
+ @GetMapping
+ public Map getActivities(@PathVariable("user-id") String userId, @RequestParam(name = "filter", required = false) String filter) {
+ System.out.println("Getting activities for user: " + userId + " with filter: " + filter);
+ // ダミーデータの返却
+ return Map.of(
+ "24", Map.of(
+ "userId", "test",
+ "activityId", "24",
+ "text", "今暇やねん",
+ "updateTime", "2025/05/14 15:20"
+ ),
+ "33", Map.of(
+ "userId", "test",
+ "activityId", "33",
+ "text", "お風呂入ってたわ",
+ "updateTime", "2025/05/14 23:50"
+ )
+ );
+ }
+
+ @PostMapping
+ public String createActivity(@PathVariable("user-id") String userId, @RequestParam("token") String token, @RequestParam("new-activity") String newActivity) {
+ System.out.println("Creating activity for user: " + userId + " with token: " + token);
+ return "24";
+ }
+
+ @GetMapping("/{activity-id}")
+ public Map getActivity(@PathVariable("user-id") String userId, @PathVariable("activity-id") String activityId) {
+ return Map.of(
+ "userId", userId,
+ "activity-id", activityId,
+ "text", "にったんに会った",
+ "updated-time", "2025/05/14 15:30"
+ );
+ }
+
+ @DeleteMapping("/{activity-id}")
+ public ResponseEntity deleteActivity(@PathVariable("user-id") String userId, @PathVariable("activity-id") String activityId, @RequestParam("token") String token) {
+ System.out.println("Deleting activity: " + activityId + " for user: " + userId + " with token: " + token);
+ return ResponseEntity.ok().build();
+ }
+
+ @GetMapping("/{activity-id}/text")
+ public String getActivityText(@PathVariable("user-id") String userId, @PathVariable("activity-id") String activityId) {
+ return "今起きた";
+ }
+
+ @GetMapping("/{activity-id}/updated-time")
+ public String getActivityUpdatedTime(@PathVariable("user-id") String userId, @PathVariable("activity-id") String activityId) {
+ return "2025/05/14 01:00";
+ }
+
+ @GetMapping("/last-updated-time")
+ public String getLastUpdatedTime(@PathVariable("user-id") String userId) {
+ return "2025/05/14 01:00";
+ }
+}
diff --git a/src/main/java/com/example/tampopotest/ChatRequestController.java b/src/main/java/com/example/tampopotest/ChatRequestController.java
new file mode 100644
index 0000000..d53b07e
--- /dev/null
+++ b/src/main/java/com/example/tampopotest/ChatRequestController.java
@@ -0,0 +1,22 @@
+package com.example.tampopotest;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/chat-requests")
+public class ChatRequestController {
+
+ @PostMapping("/")
+ public ResponseEntity createChatRequest(@RequestParam("token") String token, @RequestParam("sender-id") String senderId, @RequestParam("receiver-id") String receiverId) {
+ System.out.println("Creating chat request from " + senderId + " to " + receiverId + " with token: " + token);
+ return new ResponseEntity<>("2", HttpStatus.NO_CONTENT);
+ }
+
+ @DeleteMapping("/{chat-request-id}/")
+ public ResponseEntity deleteChatRequest(@PathVariable("chat-request-id") int chatRequestId, @RequestParam("token") String token) {
+ System.out.println("Deleting chat request: " + chatRequestId + " with token: " + token);
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+}
diff --git a/src/main/java/com/example/tampopotest/ChatRoomController.java b/src/main/java/com/example/tampopotest/ChatRoomController.java
new file mode 100644
index 0000000..1698357
--- /dev/null
+++ b/src/main/java/com/example/tampopotest/ChatRoomController.java
@@ -0,0 +1,80 @@
+package com.example.tampopotest;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Collections;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/chat-rooms")
+public class ChatRoomController {
+
+ @PostMapping("/")
+ public Map createChatRoom(@RequestParam("user0-id") String user0Id, @RequestParam("user1-id") String user1Id, @RequestParam("token") String token) {
+ System.out.println("Creating chat room for " + user0Id + " and " + user1Id + " with token: " + token);
+ return Map.of(
+ "chatRoomId", "1",
+ "user0Id", "test",
+ "user1Id", "test1",
+ "messages", Collections.emptyList(),
+ "users", Collections.emptyList(),
+ "empty", false,
+ "message", Collections.emptyList()
+ );
+ }
+
+ @GetMapping("/")
+ public Map getChatRoom(@RequestParam("user0-id") String user0Id, @RequestParam("token") String token) {
+ System.out.println("Getting chat room for user: " + user0Id + " with token: " + token);
+ return Map.of(
+ "chatRoomId", "1",
+ "user0Id", "test",
+ "user1Id", "test1",
+ "messages", Collections.emptyList(),
+ "users", Collections.emptyList(),
+ "empty", false,
+ "message", Collections.emptyList()
+ );
+ }
+
+ @GetMapping("/{chatroom-id}/{user-id}/")
+ public Map getMessage(@PathVariable("chatroom-id") int chatroomId, @PathVariable("user-id") String userId, @RequestParam("token") String token) {
+ System.out.println("Getting message from user " + userId + " in chatroom " + chatroomId + " with token: " + token);
+ return Map.of("message", "この後ご飯行かんー?");
+ }
+
+ @DeleteMapping("/{chatroom-id}/{user-id}/")
+ public Map deleteChatRoom(@PathVariable("chatroom-id") int chatroomId, @PathVariable("user-id") String userId, @RequestParam("token") String token) {
+ System.out.println("Deleting chat room " + chatroomId + " for user " + userId + " with token: " + token);
+ return Map.of("message", "ユーザをルームから退出しました");
+ }
+
+ @PutMapping("/{chatroom-id}/{user-id}/")
+ public Map addUserToChatRoom(@PathVariable("chatroom-id") String chatroomId, @PathVariable("user-id") String userId, @RequestParam("token") String token) {
+ System.out.println("Adding user " + userId + " to chatroom " + chatroomId + " with token: " + token);
+ return Map.of(
+ "chatRoomId", "1",
+ "user0Id", "test",
+ "user1Id", "test1",
+ "messages", Collections.emptyList(),
+ "users", Collections.emptyList(),
+ "empty", false,
+ "message", Collections.emptyList()
+ );
+ }
+
+ @PutMapping("/{chatroom-id}/{user-id}/message")
+ public Map updateMessage(@PathVariable("chatroom-id") String chatroomId, @PathVariable("user-id") String userId, @RequestParam("token") String token, @RequestParam("message") String message) {
+ System.out.println("Updating message for user " + userId + " in chatroom " + chatroomId + " with token: " + token);
+ return Map.of(
+ "chatRoomId", "1",
+ "user0Id", "test",
+ "user1Id", "test1",
+ "messages", Collections.singletonList(Map.of("senderId", "test1", "contest", "今暇ー?")),
+ "users", Collections.emptyList(),
+ "empty", false,
+ "message", Collections.singletonList(Map.of("senderId", "test1", "contest", "今暇ー?"))
+ );
+ }
+}
diff --git a/src/main/java/com/example/tampopotest/FriendController.java b/src/main/java/com/example/tampopotest/FriendController.java
new file mode 100644
index 0000000..80bc21c
--- /dev/null
+++ b/src/main/java/com/example/tampopotest/FriendController.java
@@ -0,0 +1,29 @@
+package com.example.tampopotest;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+@RestController
+public class FriendController {
+
+ @GetMapping("/users/{user-id}/friends")
+ public List getFriends(@PathVariable("user-id") String userId, @RequestParam("token") String token) {
+ System.out.println("Getting friends for user: " + userId + " with token: " + token);
+ return Arrays.asList("test", "test3");
+ }
+
+ @GetMapping("/users/{user-id}/friends/{pair-id}")
+ public String getFriend(@PathVariable("user-id") String userId, @PathVariable("pair-id") String pairId, @RequestParam("token") String token) {
+ System.out.println("Getting friend for user: " + userId + " with pairId: " + pairId + " and token: " + token);
+ return "test1";
+ }
+
+ @DeleteMapping("/users/{user-id}/friends/{pair-id}")
+ public ResponseEntity deleteFriend(@PathVariable("user-id") String userId, @PathVariable("pair-id") int pairId, @RequestParam("token") String token) {
+ System.out.println("Deleting friend for user: " + userId + " with pairId: " + pairId + " and token: " + token);
+ return ResponseEntity.ok().build();
+ }
+}
diff --git a/src/main/java/com/example/tampopotest/FriendPairController.java b/src/main/java/com/example/tampopotest/FriendPairController.java
new file mode 100644
index 0000000..f01b34a
--- /dev/null
+++ b/src/main/java/com/example/tampopotest/FriendPairController.java
@@ -0,0 +1,37 @@
+package com.example.tampopotest;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/friends")
+public class FriendPairController {
+
+ @PostMapping("/")
+ public Map addFriendPair(@RequestParam("token") String token, @RequestParam("user0-id") String user0Id, @RequestParam("user1-id") String user1Id) {
+ System.out.println("Adding friend pair for " + user0Id + " and " + user1Id + " with token: " + token);
+ return Map.of("id", 18, "user0Id", "test", "user1Id", "yy");
+ }
+
+ @GetMapping("/pairs/{pair-id}/")
+ public Map getFriendPair(@PathVariable("pair-id") int pairId, @RequestParam("token") String token) {
+ System.out.println("Getting friend pair: " + pairId + " with token: " + token);
+ return Map.of("id", "18", "user0Id", "test", "user1Id", "test1");
+ }
+
+ @DeleteMapping("/pairs/{pair-id}/")
+ public ResponseEntity deleteFriendPair(@PathVariable("pair-id") int pairId, @RequestParam("token") String token) {
+ System.out.println("Deleting friend pair: " + pairId + " with token: " + token);
+ return ResponseEntity.ok().build();
+ }
+
+ @GetMapping("/users/{user-id}")
+ public List getFriendsOfUser(@PathVariable("user-id") String userId, @RequestParam("token") String token) {
+ System.out.println("Getting friends of user: " + userId + " with token: " + token);
+ return Arrays.asList("test1", "test2", "test3");
+ }
+}
diff --git a/src/main/java/com/example/tampopotest/FriendRequestController.java b/src/main/java/com/example/tampopotest/FriendRequestController.java
new file mode 100644
index 0000000..9bc7e6a
--- /dev/null
+++ b/src/main/java/com/example/tampopotest/FriendRequestController.java
@@ -0,0 +1,34 @@
+package com.example.tampopotest;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/friend-requests")
+public class FriendRequestController {
+
+ @GetMapping
+ public List