GET ​/api​/v3​/account​/:id​/activity

Returns recent activity for this user, useful for displaying activity timelines for a given account.

Request

Example Request

{
  "page": 1,
  "per_page": 10
}

Example Parameters

  • page: The page to request

    • Required: no
    • Type: integer
    • Example: 1
  • per_page: The number of records returned in each page. Default is 20.

    • Required: no
    • Type: integer
    • Example: 10

Response

Example Response

{
  "meta": {
    "page": 1,
    "total_pages": 4,
    "per_page": 10,
    "records": 2492
  },
  "activities": [
    {
      "id": 4,
      "trackable_id": 7,
      "trackable_type": "account",
      "action": "user_activity_following_user",
      "recipient_type": "Account",
      "recipient_id": 6,
      "created_at": "2015-02-13 15:36:37 -0800",
      "trackable_account_id": 7,
      "destination": {
        "id": 7,
        "type": "user_profile"
      },
      "summary": "Following Jesse Pinkman",
      "subject": "Jesse Pinkman",
      "subtitle": "jesse",
      "images": {
        "small": {
          "w": 33,
          "h": 33,
          "url": "http://test.host/assets/default-avatar-avatar_33-02.png"
        },
        "medium": {
          "w": 66,
          "h": 66,
          "url": "http://test.host/assets/default-avatar-avatar_66-02.png"
        },
        "large": {
          "w": 168,
          "h": 168,
          "url": "http://test.host/assets/default-avatar-mobile_large_retina-02.png"
        }
      }
    }
  ]
}

Response Parameters

  • meta: Meta information about this response, like paging

    • Required: no
    • page: The current page returned
      • Required: no
      • Type: integer
      • Example: 1
    • total_pages: The total number of pages available to request
      • Required: no
      • Type: integer
      • Example: 4
    • per_page: The number of records returned in each page.
      • Required: no
      • Type: integer
      • Example: 10
    • records: The total number of records available.
      • Required: no
      • Type: integer
      • Example: 2492
  • activities: An array of activities pertaining to the specified account.

    • Required: no
    • Type: array
    • Items

      • Required: no
      • id: The id of the activity.
        • Required: no
        • Type: integer
        • Example: 4
      • trackable_id: The id of the item the activity is "about". For track favorited activities, this would be the track id. Look at trackable_type to determine what type of record it relates to.
        • Required: no
        • Type: integer
        • Example: 7
      • trackable_type: The type of item the activity refers to. Could be a "track", an "account", a "band_profile", or other objects.
        • Required: no
        • Type: string
        • Example: account
      • action: The action this activity relates to. For instance, "facebookfriendjoined" or "useractivityfollowedbyuser".
        • Required: no
        • Type: string
        • Example: useractivityfollowing_user
      • recipient_type: Who's timeline this belongs to. For this response, always "Account", but for other timeline endpoints this could be other classes.
        • Required: no
        • Type: string
        • Example: Account
      • recipient_id: The id of the recipient. For this endpoint, it matches the account you requested.
        • Required: no
        • Type: integer
        • Example: 6
      • created_at: The date (in UTC) when the activity occurred.
        • Required: no
        • Type: string
        • Example: 2015-02-13 15:36:37 -0800
      • trackableaccountid: The related account this item refers to. Helpful if the record is a band, a track, or another user, this always relates to that account.
        • Required: no
        • Type: integer
        • Example: 7
      • destination: An object that specifies where you should take the user if they click/tap on this activity. Not gauranteed to be present, if not clicks/taps should be ignored.

        • Required: no
        • id: The id of the record
          • Required: no
          • Type: integer
          • Example: 7
        • type: The type of record
          • Required: no
          • Type: string
          • Example: user_profile
      • summary: A one-line summary of the activity

        • Required: no
        • Type: string
        • Example: Following Jesse Pinkman
      • subject: A descriptive string for the subject of the activity. Useful if you want to break the information in the summary onto multiple lines, or style independently.

        • Required: no
        • Type: string
        • Example: Jesse Pinkman
      • subtitle: An optional subtitle providing secondary, but related display strings for the subject. For a track, this would be the band name. For a following/followed_by activity, this is the account's username.

        • Required: no
        • Type:
          • string
          • null
        • Example: jesse
      • images: An optional list of images you can use to display along with the activity item.

        • Required: no
        • small: A small image version

          • Required: no
          • w: The image width
          • h: The image height
          • url: The url to this image version
        • medium: A medium-sized image version

          • Required: no
          • w: The image width
          • h: The image height
          • url: The url to this image version
        • large: A large image version

          • Required: no
          • w: The image width
          • h: The image height
          • url: The url to this image version

Response Codes

Successful Response Codes

  • 200: Successful response

Failure Response Codes

  • 404: The provided account id was not found