SWE574-Fall2023-Group1 / SWE574-Fall2023-G1-mobile

Mobile code repository for SWE574 Fall2023 Group1
MIT License
6 stars 1 forks source link

Implement Activity Stream Page #96

Closed ayhncvdr2 closed 9 months ago

ayhncvdr2 commented 9 months ago

Implement an Activity Stream page for the mobile application, showcasing various user activities. The page will provide insights into interactions such as follows, unfollows, comments, likes, and new story creations. Additionally, upon tapping an activity, users will be redirected to the target user's profile. Furthermore, a PATCH request will be sent to mark the activity as viewed.

ckertam commented 9 months ago

To get activity stream you should send a GET API Request to below endpoint /user/activities

To click on activities you should send PATCH API Request to below endpoint /user/activities/{activity.id}

For the types of the activity you can check below photo

image

response as below

{ "success": true, "msg": "Activities got", "activity": [ { "id": 60, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-12-15T16:44:46.267922Z", "viewed": false, "target_user": 1, "target_user_username": "cano14", "target_story": 69, "target_story_title": "Story Interval year" }, { "id": 32, "user": 1, "user_username": "cano14", "activity_type": "unfollowed_user", "date": "2023-12-03T17:49:03.405972Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": null, "target_story_title": null }, { "id": 31, "user": 1, "user_username": "cano14", "activity_type": "followed_user", "date": "2023-12-03T17:49:02.783744Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": null, "target_story_title": null }, { "id": 30, "user": 1, "user_username": "cano14", "activity_type": "unfollowed_user", "date": "2023-12-03T17:49:01.856752Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": null, "target_story_title": null }, { "id": 29, "user": 1, "user_username": "cano14", "activity_type": "followed_user", "date": "2023-12-03T17:49:00.996676Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": null, "target_story_title": null }, { "id": 28, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T22:38:46.885861Z", "viewed": true, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 27, "user": 1, "user_username": "cano14", "activity_type": "story_unliked", "date": "2023-11-29T22:38:37.179011Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 26, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T22:38:13.424927Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 6, "target_story_title": "TagTest9" }, { "id": 25, "user": 1, "user_username": "cano14", "activity_type": "story_unliked", "date": "2023-11-29T22:38:05.694797Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 6, "target_story_title": "TagTest9" }, { "id": 24, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T22:17:09.984307Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 23, "user": 1, "user_username": "cano14", "activity_type": "story_unliked", "date": "2023-11-29T22:17:07.095520Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 22, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T22:14:14.917671Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 21, "user": 1, "user_username": "cano14", "activity_type": "story_unliked", "date": "2023-11-29T22:14:13.227050Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 20, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T22:02:45.916065Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 19, "user": 1, "user_username": "cano14", "activity_type": "story_unliked", "date": "2023-11-29T22:02:43.850536Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 18, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T22:01:30.549985Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 17, "user": 1, "user_username": "cano14", "activity_type": "story_unliked", "date": "2023-11-29T22:01:29.575548Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 16, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:59:33.462494Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 15, "user": 1, "user_username": "cano14", "activity_type": "story_unliked", "date": "2023-11-29T21:59:30.577246Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 14, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:57:09.155635Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 13, "user": 1, "user_username": "cano14", "activity_type": "story_unliked", "date": "2023-11-29T21:57:05.569323Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 12, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:55:19.886708Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 5, "target_story_title": "TagTest6" }, { "id": 11, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:54:41.523274Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 10, "user": 1, "user_username": "cano14", "activity_type": "story_unliked", "date": "2023-11-29T21:54:34.516419Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 9, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:49:53.093903Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 6, "target_story_title": "TagTest9" }, { "id": 8, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:49:18.965756Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 7, "user": 1, "user_username": "cano14", "activity_type": "story_unliked", "date": "2023-11-29T21:48:11.528727Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 6, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:41:41.725729Z", "viewed": false, "target_user": 2, "target_user_username": "cano19", "target_story": 7, "target_story_title": "TestTag" }, { "id": 5, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:41:09.922584Z", "viewed": false, "target_user": 1, "target_user_username": "cano14", "target_story": 4, "target_story_title": "TagTest4" }, { "id": 4, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:41:05.125012Z", "viewed": false, "target_user": 1, "target_user_username": "cano14", "target_story": 3, "target_story_title": "TagTest3" }, { "id": 3, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:34:11.003150Z", "viewed": false, "target_user": 1, "target_user_username": "cano14", "target_story": 5, "target_story_title": "TagTest6" }, { "id": 2, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:34:06.649679Z", "viewed": false, "target_user": 1, "target_user_username": "cano14", "target_story": 6, "target_story_title": "TagTest9" }, { "id": 1, "user": 1, "user_username": "cano14", "activity_type": "story_liked", "date": "2023-11-29T21:34:02.107788Z", "viewed": false, "target_user": 1, "target_user_username": "cano14", "target_story": 7, "target_story_title": "TestTag" } ] }