bounswe / 2021SpringGroup11

Welcome to our github repository. We are 11th group of CMPE451 Fundamentals of Software Engineering course. We will work on a software project as a team throughout this term.
http://bounswe11.com.s3-website.us-east-2.amazonaws.com/
4 stars 0 forks source link

Write a MongoDB model for JSON-LD Actvity Stream #321

Closed SelmanB closed 2 years ago

SelmanB commented 2 years ago

A model that stores the events logged by the functionality specified in #326 is necessary. It should comply with the finding from #320 to make implementation of #322 and #323 easier.

EAltunoglu commented 2 years ago

// PATH CREATE { "@context": "https://www.w3.org/ns/activitystreams", "summary": "{username} created a path {PATH_NAME}", "type": "Create", "actor": { "type": "Person", "name": "{username}" }, "object": { "id": "{frontend path link}", "type": "Document", "name": "{path name}" } }

// PATH ENROLL { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Eren enrolled to {PATH_NAME}", "type": "Join", "actor": { "type": "Person", "name": "{username}" }, "object": { "id": "{frontend path link}", "type": "Document", "name": "{path name}" } }

// PATH FOLLOW { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Eren followed {PATH_NAME}", "type": "Follow", "actor": { "type": "Person", "name": "{username}" }, "object": { "id": "{frontend path link}", "type": "Document", "name": "{path name}" } }

// TASK FINISH { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Eren finished a task {task_name}", "type": "Create", "actor": { "type": "Person", "name": "{username}" }, "object": { "type": "Event", "name": "{task name} finished", "attributedTo": { "id": "{frontend path link}", "type": "Document", "name": "{path name}" }, } }

// TOPIC FOLLOW { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Eren followed a topic {topic_name}", "type": "Follow", "actor": { // "id": "{frontend user link}", "type": "Person", "name": "{username}" }, "object": { "type": "Document", "name": "{topic_name}", } }

// USER FOLLOW { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Eren followed a user {username}", "type": "Follow", "actor": { "type": "Person", "name": "{username}" }, "object": { "type": "Person", "name": "{username}", } }

// hepsine published eklencek

SelmanB commented 2 years ago

See this file for the implementation. All other code reading from or writing into the activitystreams collection is supposed to use that interface for correct formatting.