News-feeds

Topics

All topics with pagination numbers

GET /api/newsfeeds/topics/(int: offset)/(int: limit)

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
  {
        "response_code": 1000,
        "data": {
          "NewsFeed": [
            {
              "id": "74",
              "author": {
                "id": "1",
                "name": "Jasper Carpizo",
                "designation": "Developer",
                "photoUrl": null
              },
              "content": {
                "header": "test",
                "body": "",
                "uploaded_files": [
                  {
                    "link": "http://ls-summit.dev/repo/topic-files/topic/1/images/cb489d6c1d2ddb489064f3d3d9fd34ef.jpg",
                    "fileType": "image/jpeg"
                  }
                ],
                "dateCreated": "2017-01-10 02:00:01"
              },
              "likes": [],
              "comments": [
                {
                  "id": "2",
                  "comment": "rwerwerwerwer",
                  "author": {
                    "id": "10",
                    "name": "Marc Darren Padilla",
                    "designation": "Developer",
                    "photoUrl": "http://kingofwallpapers.com/tux/tux-001.jpg"
                  },
                  "uploaded_files": [],
                  "created_at": "2017-01-16 00:00:00"
                },
                {
                  "id": "1",
                  "comment": "asdsasdasd",
                  "author": {
                    "id": "1",
                    "name": "Cris del Rosario",
                    "designation": "Driver",
                    "photoUrl": null
                  },
                  "uploaded_files": [],
                  "created_at": "0000-00-00 00:00:00"
                }
              ]
            }
          ]
        },
        "system": {
          "created_at": "2017-01-10 02:00:02",
          "signature": "e5d1f28c9690ae7f180f80129e18007ddcffd96c",
          "message": "Success"
        }
   }
]

Create new Topic

POST /api/newsfeeds/topics/create
Parameters:
  • name (string) – the topic name
  • created_by (integer) – the participant Id
  • uploaded_files (array) – the uploaded files - optional

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
  {
        "response_code": 1000,
        "data": {
          "NewsFeed": [
            {
              "id": "74",
              "author": {
                "id": "1",
                "name": "Jasper Carpizo",
                "designation": "Developer",
                "photoUrl": null
              },
              "content": {
                "header": "test",
                "body": "",
                "uploaded_files": [
                  {
                    "link": "http://ls-summit.dev/repo/topic-files/topic/1/images/cb489d6c1d2ddb489064f3d3d9fd34ef.jpg",
                    "fileType": "image/jpeg"
                  }
                ],
                "dateCreated": "2017-01-10 02:00:01"
              },
              "likes": [],
              "comments": [
                {
                  "id": "2",
                  "comment": "rwerwerwerwer",
                  "author": {
                    "id": "10",
                    "name": "Marc Darren Padilla",
                    "designation": "Developer",
                    "photoUrl": "http://kingofwallpapers.com/tux/tux-001.jpg"
                  },
                  "uploaded_files": [],
                  "created_at": "2017-01-16 00:00:00"
                },
                {
                  "id": "1",
                  "comment": "asdsasdasd",
                  "author": {
                    "id": "1",
                    "name": "Cris del Rosario",
                    "designation": "Driver",
                    "photoUrl": null
                  },
                  "uploaded_files": [],
                  "created_at": "0000-00-00 00:00:00"
                }
              ]
            }
          ]
        },
        "system": {
          "created_at": "2017-01-10 02:00:02",
          "signature": "e5d1f28c9690ae7f180f80129e18007ddcffd96c",
          "message": "Success"
        }
   }
]

Get topic details by Id

GET /api/newsfeeds/topics/(int: topic_id)/details

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
  {
        "response_code": 1000,
        "data": {
          "NewsFeed": [
            {
              "id": "74",
              "author": {
                "id": "1",
                "name": "Jasper Carpizo",
                "designation": "Developer",
                "photoUrl": null
              },
              "content": {
                "header": "test",
                "body": "",
                "uploaded_files": [
                  {
                    "link": "http://ls-summit.dev/repo/topic-files/topic/1/images/cb489d6c1d2ddb489064f3d3d9fd34ef.jpg",
                    "fileType": "image/jpeg"
                  }
                ],
                "dateCreated": "2017-01-10 02:00:01"
              },
              "likes": [],
               "comments": [
                {
                  "id": "2",
                  "comment": "rwerwerwerwer",
                  "author": {
                    "id": "10",
                    "name": "Marc Darren Padilla",
                    "designation": "Developer",
                    "photoUrl": "http://kingofwallpapers.com/tux/tux-001.jpg"
                  },
                  "uploaded_files": [],
                  "created_at": "2017-01-16 00:00:00"
                },
                {
                  "id": "1",
                  "comment": "asdsasdasd",
                  "author": {
                    "id": "1",
                    "name": "Cris del Rosario",
                    "designation": "Driver",
                    "photoUrl": null
                  },
                  "uploaded_files": [],
                  "created_at": "0000-00-00 00:00:00"
                }
              ]
            }
          ]
        },
        "system": {
          "created_at": "2017-01-10 02:00:02",
          "signature": "e5d1f28c9690ae7f180f80129e18007ddcffd96c",
          "message": "Success"
        }
   }
]

Update topic details by Id

PUT /api/newsfeeds/topics/(int: topic_id)/update
Parameters:
  • name (string) – the topic name
  • created_by (integer) – the participant Id
  • updated_by (integer) – the participant Id
  • uploaded_files (array) – the uploaded files - optional

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
  {
        "response_code": 1000,
        "data": {
          "NewsFeed": [
            {
              "id": "74",
              "author": {
                "id": "1",
                "name": "Jasper Carpizo",
                "designation": "Developer",
                "photoUrl": null
              },
              "content": {
                "header": "test",
                "body": "",
                "uploaded_files": [
                  {
                    "link": "http://ls-summit.dev/repo/topic-files/topic/1/images/cb489d6c1d2ddb489064f3d3d9fd34ef.jpg",
                    "fileType": "image/jpeg"
                  }
                ],
                "dateCreated": "2017-01-10 02:00:01"
              },
              "likes": [],
               "comments": [
                {
                  "id": "2",
                  "comment": "rwerwerwerwer",
                  "author": {
                    "id": "10",
                    "name": "Marc Darren Padilla",
                    "designation": "Developer",
                    "photoUrl": "http://kingofwallpapers.com/tux/tux-001.jpg"
                  },
                  "uploaded_files": [],
                  "created_at": "2017-01-16 00:00:00"
                },
                {
                  "id": "1",
                  "comment": "asdsasdasd",
                  "author": {
                    "id": "1",
                    "name": "Cris del Rosario",
                    "designation": "Driver",
                    "photoUrl": null
                  },
                  "uploaded_files": [],
                  "created_at": "0000-00-00 00:00:00"
                }
              ]
            }
          ]
        },
        "system": {
          "created_at": "2017-01-10 02:00:02",
          "signature": "e5d1f28c9690ae7f180f80129e18007ddcffd96c",
          "message": "Success"
        }
   }
]

Delete topic by Id

DELETE /api/newsfeeds/topics/(int: topic_id)/delete

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
 {
        "response_code": 2000,
        "data": {
          "message": "Deleted Topic Id: 1"
        },
        "system": {
          "created_at": "2017-01-10 07:51:21",
          "signature": "bd5897d23449cb2be45a01286580d291bd6195c1",
          "redirect_url": 1002,
          "message": "Redirected"
        }
  }
]

Comments

All comments with pagination numbers

GET /api/newsfeeds/topics/(int: topic_id)/comments/(int: offset)/(int: limit)

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
      {
        "response_code": 1000,
        "data": {
            "comments": [
                  {
                    "id": "2",
                    "comment": "rwerwerwerwer",
                    "author": {
                      "id": "10",
                      "name": "Marc Darren Padilla",
                      "designation": "Developer",
                      "photoUrl": "http://kingofwallpapers.com/tux/tux-001.jpg"
                    },
                    "created_by": "10",
                    "uploaded_files": []
                  }
            ]
        },
        "system": {
          "created_at": "2017-01-10 08:19:01",
          "signature": "cebc40ecbb8fba30e798429dc4f528dc0ff0a0b9",
          "message": "Success"
        }
      }
]

Create Comment with topic Id

POST /api/newsfeeds/topics/(int: topic_id)/comments/create
Parameters:
  • comment (string) – the comment
  • created_by (integer) – the participant Id
  • uploaded_files (array) – the uploaded files - optional

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
      {
        "response_code": 1000,
        "data": {
             "comments": [
                  {
                    "id": "2",
                    "comment": "rwerwerwerwer",
                    "author": {
                      "id": "10",
                      "name": "Marc Darren Padilla",
                      "designation": "Developer",
                      "photoUrl": "http://kingofwallpapers.com/tux/tux-001.jpg"
                    },
                    "created_by": "10",
                    "uploaded_files": []
                  }
            ]
        },
        "system": {
          "created_at": "2017-01-10 08:19:01",
          "signature": "cebc40ecbb8fba30e798429dc4f528dc0ff0a0b9",
          "message": "Success"
        }
      }
]

Get comment details by Id

GET /api/newsfeeds/comments/(int: comment_id)/details

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
      {
        "response_code": 1000,
        "data": {
             "comments": [
                  {
                    "id": "2",
                    "comment": "rwerwerwerwer",
                    "author": {
                      "id": "10",
                      "name": "Marc Darren Padilla",
                      "designation": "Developer",
                      "photoUrl": "http://kingofwallpapers.com/tux/tux-001.jpg"
                    },
                    "created_by": "10",
                    "uploaded_files": []
                  }
            ]
        },
        "system": {
          "created_at": "2017-01-10 08:19:01",
          "signature": "cebc40ecbb8fba30e798429dc4f528dc0ff0a0b9",
          "message": "Success"
        }
      }
]

Update comment details by Id

PUT /api/newsfeeds/comments/(int: comment_id)/update
Parameters:
  • comment (string) – the comment
  • created_by (integer) – the participant Id
  • updated_by (integer) – the participant Id
  • uploaded_files (array) – the uploaded files - optional

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
      {
        "response_code": 1000,
        "data": {
             "comments": [
                  {
                    "id": "2",
                    "comment": "rwerwerwerwer",
                    "author": {
                      "id": "10",
                      "name": "Marc Darren Padilla",
                      "designation": "Developer",
                      "photoUrl": "http://kingofwallpapers.com/tux/tux-001.jpg"
                    },
                    "created_by": "10",
                    "uploaded_files": []
                  }
            ]
        },
        "system": {
          "created_at": "2017-01-10 08:19:01",
          "signature": "cebc40ecbb8fba30e798429dc4f528dc0ff0a0b9",
          "message": "Success"
        }
      }
]

Delete comment by Id

DELETE /api/newsfeeds/comments/(int: comment_id)/delete

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
      {
        "response_code": 2000,
        "data": {
          "message": "Deleted Comment Id: 57"
        },
        "system": {
          "created_at": "2017-01-10 08:31:14",
          "signature": "095c946c9cff54cf10b7a34d15e794ef83671320",
          "redirect_url": 1002,
          "message": "Redirected"
        }
      }
]

Uploaded Files

Delete file by Id

DELETE /api/newsfeeds/files/(int: file_Id)/delete

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8

[
      {
        "response_code": 2000,
        "data": {
          "message": "Deleted File Id: 55"
        },
        "system": {
          "created_at": "2017-01-10 08:36:05",
          "signature": "a058834cb7e123bef1ea0f2ff6776e325d30734e",
          "redirect_url": 1002,
          "message": "Redirected"
        }
      }
]