Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

photo

GET /photo

Browse photos

Example URI

Code Block
bash
bash
 http://example.com/restful_api/photo?user_id=10

...

Code Block
php
php
{
  "status": "success",
  "data": [
    {
      "is_liked": null,
      "user_id": "1",
      "photo_id": "11",
      "album_id": "0",
      "module_id": null,
      "group_id": "0",
      "privacy": "0",
      "privacy_comment": "0",
      "title": "photo_1",
      "time_stamp": "1481515372",
      "is_featured": "0",
      "is_sponsor": "0",
      "categories": null,
      "bookmark_url": "http://example.com/photo/11/509795882_preview_maxresdefault/",
      "photo_url": "http://example.com/PF.Base/file/pic/photo/2016/12/c266f348b34952c46eda13ced1daed00_1024.jpg"
    },
    {
      "is_liked": null,
      "user_id": "1",
      "photo_id": "10",
      "album_id": "0",
      "module_id": null,
      "group_id": "0",
      "privacy": "0",
      "privacy_comment": "0",
      "title": "photo_2",
      "time_stamp": "1481247906",
      "is_featured": "0",
      "is_sponsor": "0",
      "categories": null,
      "bookmark_url": "http://example.com/photo/10/509795882_preview_maxresdefault/",
      "photo_url": "http://example.com/PF.Base/file/pic/photo/2016/12/0a59cf98aef18ad53619bdec43d47c97_1024.jpg"
    }
  ],
  "messages": []
}

POST /photo

Share new photos

Example URI

...

Code Block
php
php
{
  "status": "success",
  "data": [
    {
      "is_liked": null,
      "user_id": "1",
      "photo_id": "14",
      "album_id": "0",
      "module_id": "event",
      "group_id": "1",
      "privacy": "0",
      "privacy_comment": "0",
      "title": "christmas-tree",
      "time_stamp": "1481888433",
      "is_featured": "0",
      "is_sponsor": "0",
      "categories": null,
      "bookmark_url": "http://example.com/photo/14/christmas-tree/",
      "photo_url": "http://example.com/PF.Base/file/pic/photo/2016/12/718d0e2a99dbe3091bf5e7734ed03098_1024.png"
    },
    {
      "is_liked": null,
      "user_id": "1",
      "photo_id": "15",
      "album_id": "0",
      "module_id": "event",
      "group_id": "1",
      "privacy": "0",
      "privacy_comment": "0",
      "title": "snowman",
      "time_stamp": "1481888433",
      "is_featured": "0",
      "is_sponsor": "0",
      "categories": null,
      "bookmark_url": "http://example.com/photo/15/snowman/",
      "photo_url": "http://example.com/PF.Base/file/pic/photo/2016/12/43a46fac997e887034c23c085ab0bbe8_1024.png"
    }
  ],
  "messages": [
    "Photos successfully uploaded."
  ]
}

GET /photo/:id

Get information of a specific photo

...

Code Block
php
php
{
  "status": "success",
  "data": {
    "is_liked": null,
    "user_id": "1",
    "photo_id": "15",
    "album_id": "0",
    "module_id": "event",
    "group_id": "1",
    "privacy": "0",
    "privacy_comment": "0",
    "title": "snowman",
    "time_stamp": "1481888433",
    "is_featured": "0",
    "is_sponsor": "0",
    "categories": null,
    "bookmark_url": "http://example.com/photo/15/snowman/",
    "photo_url": "http://example.com/PF.Base/file/pic/photo/2016/12/43a46fac997e887034c23c085ab0bbe8_1024.png"
  },
  "messages": []
}

PUT /photo/:id

Update information for a specific photo

...

Code Block
php
php
{
  "status": "success",
  "data": {
    "is_liked": null,
    "user_id": "1",
    "photo_id": "15",
    "album_id": "1",
    "module_id": null,
    "group_id": "0",
    "privacy": "0",
    "privacy_comment": "0",
    "title": "snowman",
    "time_stamp": "1481189921",
    "is_featured": "0",
    "is_sponsor": "0",
    "categories": [
      {
        "0": "Comedy",
        "1": "http://example.com/photo/category/4/comedy/",
        "category_id": "4"
      }
    ],
    "bookmark_url": "http://example.com/15/snowman/",
    "photo_url": "http://example.com/PF.Base/file/pic/photo/2016/12/43a46fac997e887034c23c085ab0bbe8_1024.png"
  },
  "messages": [
    "Photo successfully updated."
  ]
}

DELETE /photo/:id

Delete a specific photo

Example URI

...