GET ​/api​/v3​/account​/me​/recent_stations

Retrieve the recent stations for this account.

Request

Example Request

{
  "auth_token": "abc1245920feab98ca",
  "page": 1,
  "per_page": 30
}

Example Parameters

  • auth_token: The user's auth_token obtained by calling the auth API. If provided, the response will indicate follow status for elements in the followers array.

    • Required: yes
    • Type: string
    • Example: abc1245920feab98ca
  • page: The page number (starting at 1)

    • Required: no
    • Type: integer
    • Example: 1
  • per_page: The number of records returned in each page. Defaults to 30

    • Required: no
    • Type: integer
    • Example: 30

Response

Example Response

{
  "recent_stations": [
    {
      "id": {
      },
      "account_id": 123,
      "station_id": 123,
      "updated_at": {
      },
      "created_at": {
      },
      "last_listened_at": {
      },
      "station": {
        "title": "Starry Plough Radio",
        "id": {
        },
        "station_type": "Local Shows",
        "banner_url": "http://example.com/banner"
      }
    }
  ],
  "meta": {
    "page": {
    },
    "per_page": {
    },
    "total_pages": {
    },
    "records": {
    }
  }
}

Response Parameters

  • recent_stations: The list of recent stations, most recent first.

    • Required: yes
    • Type: array
    • Items

      • Required: no
      • id: The id of the recent station record. Returned as a string for legacy reasons, but may change in the future. Your client should accept either format.
        • Required: yes
        • Type:
          • String
          • Number
        • Example: 123
      • account_id: The recent station's associated account record id
        • Required: yes
        • Type: number
        • Example: 123
      • station_id: The recent station's associated station record id
        • Required: yes
        • Type: number
        • Example: 123
      • updated_at: the last time the recent station was updated
        • Required: yes
        • Type: date-time
        • Example: 2013-12-10 11:30:00 -0800
      • created_at: when the recent station was first listened to
        • Required: yes
        • Type: date-time
        • Example: 2013-12-10 11:30:00 -0800
      • lastlistenedat: the last time the recent station was listened to
        • Required: yes
        • Type: date-time
        • Example: 2013-12-10 11:30:00 -0800
      • station:

        • Required: no
        • title: The title of the station. Should be displayed when playing the station.
          • Required: yes
          • Type: string
          • Example: Starry Plough Radio
        • id: The id of the recent station record. Returned as a string for legacy reasons, but may change in the future. Your client should accept either format.
          • Required: yes
          • Type:
            • String
            • Number
          • Example: 123
        • station_type: The type of station returned. Also used to record statistics.
          • Required: yes
          • Type: string
          • Example: Local Shows
        • banner_url: The url of the station banner
          • Required: yes
          • Type:
            • null
            • string
          • Example: http://example.com/banner
  • meta: extra information about this response.

    • Required: no
    • page: The page requested.
      • Required: no
      • Type: Number
      • Example: 1
    • per_page: The number of records returned in each page.
      • Required: no
      • Type: Number
      • Example: 20
    • total_pages: The total number of pages available to request.
      • Required: no
      • Type: Number
      • Example: 4
    • records: The total number of records.
      • Required: no
      • Type: Number
      • Example: 75

Response Codes

Successful Response Codes

  • 200: A successful request.

Failure Response Codes

  • 404: Indicates the account was not found.

  • 401: Unauthorized request. Indicates a missing or invalid auth_token.