Skip to content

Recent notifications list

Rafael Chacon edited this page Feb 22, 2012 · 1 revision

Description:

Return the recent notifications for current user

The notifications includes:

  • likes
  • trackings
  • mentions
  • followings

These notifications are sorted by created date (SEQ is sorted desc too), recent notification first.

###URL: GET http://public-api.piictu.com/v2/notifications

###HTTP method(s): GET

###Requires authentication (Authentication and Authorization): true

###Parameters:

  • page (optional:integer): Specifies the page of results to retrieve, default = 1.
  • rpp (optional:integer): results per page, default =10, max = 50.
  • since_seq (optional:integer): Returns results with an SEQ greater than (that is, more recent than) the specified SEQ.
  • max_seq (optional:integer): Returns results with an SEQ less than (that is, older than) or equal to the specified SEQ.

###Usage example:

Example using cURL:

curl -i http://public-api.piictu.com/v2/notifications \
 -F page=2 \
 -F rpp=5 \
 -X GET \
 -H "Authorization: OAuth 2540af0de12cb2367691516b8477b0b7bd66dbd8ab6840b147340c6898c4eebd"

###Response:

On success

  • HTTP response code is 200 (ok)
  • HTTP response body is a JSON string (the response doesn't include pagination info) like this:
{
  "notifications": [
  {
    "notification": {
      "created_at": "2012-02-08T22:37:59Z",
        "seq": 13287406791824502,
        "type": "following",
        "user_id": "4df3b43e490fa000010003ff",
        "from": {
          "avatar_url": null,
          "bio": "",
          "fullname": "",
          "username": "edgartest",
          "id": "4f2998b4c6954f0001000001"
        }
    }
  },
  {
    "notification": {
      "created_at": "2012-02-02T08:07:06Z",
        "seq": 13281700260860208,
        "type": "mention",
        "user_id": "4df3b43e490fa000010003ff",
        "from": {
          "avatar_url": "http://piictu.s3.amazonaws.com/avatars/4da9ca7ffe07656dcf000014/90x90_1315503185",
          "bio": "Piictu Inc.",
          "fullname": "Petr Reichl",
          "username": "meap",
          "id": "4da9ca7ffe07656dcf000014"
        },
      "photo": {
        "caption": null,
        "stream_title": "Show your watch!",
        "thumbnail": "http://cdn-staging.piictu.com/photos%2F4f2a441dd818b80001000001%2F90x90",
        "url": "http://cdn-staging.piictu.com/photos%2F4f2a441dd818b80001000001%2Foriginal",
        "id": "4f2a441dd818b80001000001",
        "stream_id": "4dff755f94f7fb0001001d58"
      }
    }
  },
  {
    "notification": {
      "created_at": "2012-01-30T01:51:53Z",
        "seq": 13278883139829378,
        "type": "like",
        "user_id": "4df3b43e490fa000010003ff",
        "from": {
          "avatar_url": "http://cdn.piictu.com/avatars/4ecbc393327f180001000143/90x90_1321976828",
          "bio": "19. Pittsburgh. Point Park University.",
          "fullname": "Jo Weber",
          "username": "joweber62",
          "id": "4ecbc393327f180001000143"
        },
      "photo": {
        "caption": "Books!",
        "stream_title": "Take a Piic of something essential",
        "thumbnail": "http://cdn.piictu.com/photos%2F4f218220914552000100002f%2F90x90",
        "url": "http://cdn.piictu.com/photos%2F4f218220914552000100002f%2Foriginal",
        "id": "4f218220914552000100002f",
        "stream_id": "4f215a0c914552000100000f"
      }
    }
  },
  {
    "notification": {
      "created_at": "2012-01-29T18:51:20Z",
        "seq": 13278630804444170,
        "type": "like",
        "user_id": "4df3b43e490fa000010003ff",
        "from": {
          "avatar_url": "http://cdn.piictu.com/avatars/4dfe7a3979febd0001001160/90x90_1324770370",
          "bio": "",
          "fullname": "Jaime Dichi",
          "username": "jamesdichi",
          "id": "4dfe7a3979febd0001001160"
        },
      "photo": {
        "caption": null,
        "stream_title": "By the sea...",
        "thumbnail": "http://cdn.piictu.com/photos%2F4f230a33d4e750000100004c%2F90x90",
        "url": "http://cdn.piictu.com/photos%2F4f230a33d4e750000100004c%2Foriginal",
        "id": "4f230a33d4e750000100004c",
        "stream_id": "4e5a8385046bab0001000585"
      }
    }
  },
  {
    "notification": {
      "created_at": "2012-01-29T02:56:16Z",
        "seq": 13278057760017364,
        "type": "like",
        "user_id": "4df3b43e490fa000010003ff",
        "from": {
          "avatar_url": "http://cdn.piictu.com/avatars/4e00c98748a4cb0001000431/90x90_1326073740",
          "bio": null,
          "fullname": "",
          "username": "trillian1",
          "id": "4e00c98748a4cb0001000431"
        },
      "photo": {
        "caption": null,
        "stream_title": "By the sea...",
        "thumbnail": "http://cdn.piictu.com/photos%2F4f230a33d4e750000100004c%2F90x90",
        "url": "http://cdn.piictu.com/photos%2F4f230a33d4e750000100004c%2Foriginal",
        "id": "4f230a33d4e750000100004c",
        "stream_id": "4e5a8385046bab0001000585"
      }
    }
  },
  {
    "notification": {
      "created_at": "2012-01-28T15:27:28Z",
        "seq": 13277644485207158,
        "type": "like",
        "user_id": "4df3b43e490fa000010003ff",
        "from": {
          "avatar_url": "http://cdn.piictu.com/avatars/4e13086bc26f620001000861/90x90",
          "bio": "",
          "fullname": "Jazz Decker",
          "username": "jazminrae",
          "id": "4e13086bc26f620001000861"
        },
      "photo": {
        "caption": null,
        "stream_title": "By the sea...",
        "thumbnail": "http://cdn.piictu.com/photos%2F4f230a33d4e750000100004c%2F90x90",
        "url": "http://cdn.piictu.com/photos%2F4f230a33d4e750000100004c%2Foriginal",
        "id": "4f230a33d4e750000100004c",
        "stream_id": "4e5a8385046bab0001000585"
      }
    }
  },
  {
    "notification": {
      "created_at": "2012-01-28T07:40:03Z",
        "seq": 13277364035952912,
        "type": "like",
        "user_id": "4df3b43e490fa000010003ff",
        "from": {
          "avatar_url": null,
          "bio": null,
          "fullname": null,
          "username": "mariannananna",
          "id": "4f0387f6cdb3ab0001000002"
        },
      "photo": {
        "caption": "Sunny day!",
        "stream_title": "Sunny day!",
        "thumbnail": "http://cdn.piictu.com/photos%2F4ec53ac58519590001000134%2F90x90",
        "url": "http://cdn.piictu.com/photos%2F4ec53ac58519590001000134%2Foriginal",
        "id": "4ec53ac58519590001000134",
        "stream_id": "4ec53aca074a74000100012a"
      }
    }
  },
  {
    "notification": {
      "created_at": "2012-01-28T07:40:03Z",
        "seq": 13277364034019640,
        "type": "like",
        "user_id": "4df3b43e490fa000010003ff",
        "from": {
          "avatar_url": null,
          "bio": null,
          "fullname": null,
          "username": "mariannananna",
          "id": "4f0387f6cdb3ab0001000002"
        },
      "photo": {
        "caption": "El mar...",
        "stream_title": "El mar...",
        "thumbnail": "http://cdn.piictu.com/photos%2F4f0b15ae9feacf0001000011%2F90x90",
        "url": "http://cdn.piictu.com/photos%2F4f0b15ae9feacf0001000011%2Foriginal",
        "id": "4f0b15ae9feacf0001000011",
        "stream_id": "4f0b15b23c2ae3000100001a"
      }
    }
  },
  {
    "notification": {
      "created_at": "2012-01-28T07:39:56Z",
        "seq": 13277363961194760,
        "type": "like",
        "user_id": "4df3b43e490fa000010003ff",
        "from": {
          "avatar_url": null,
          "bio": null,
          "fullname": null,
          "username": "mariannananna",
          "id": "4f0387f6cdb3ab0001000002"
        },
      "photo": {
        "caption": "Is it the snow approaching to you?",
        "stream_title": "Is it the snow approaching to you?",
        "thumbnail": "http://cdn.piictu.com/photos%2F4f11f61f05ab2a0001000119%2F90x90",
        "url": "http://cdn.piictu.com/photos%2F4f11f61f05ab2a0001000119%2Foriginal",
        "id": "4f11f61f05ab2a0001000119",
        "stream_id": "4f11f62105ab2a000100011a"
      }
    }
  },
  {
    "notification": {
      "created_at": "2012-01-28T07:39:53Z",
        "seq": 13277363936690510,
        "type": "like",
        "user_id": "4df3b43e490fa000010003ff",
        "from": {
          "avatar_url": null,
          "bio": null,
          "fullname": null,
          "username": "mariannananna",
          "id": "4f0387f6cdb3ab0001000002"
        },
      "photo": {
        "caption": "These are the days!",
        "stream_title": "These are the days!",
        "thumbnail": "http://cdn.piictu.com/photos%2F4f131285f25bd500010000c8%2F90x90",
        "url": "http://cdn.piictu.com/photos%2F4f131285f25bd500010000c8%2Foriginal",
        "id": "4f131285f25bd500010000c8",
        "stream_id": "4f13128605e959000100009a"
      }
    }
  }
  ]
}

Clone this wiki locally