Свойство MIssing в ответ на API SoundCloud

У меня проблемы с получением некоторых данных о треках с некоторыми из них.

Я использую конечную точку /tracks с запросом GET HTTP, чтобы сделать запрос. И для примера для этого трека:

id = 76255568

Вот JSON, который я получаю:

{
"artwork_url" = "https://i1.sndcdn.com/artworks-000039059040-szzrcm-large.jpg";
"attachments_uri" = "https://api.soundcloud.com/tracks/76255568/attachments";
bpm = "<null>";
commentable = 1;
"created_at" = "2013/01/24 12:14:16 +0000";
description = "Bonobo\U2019s Live Album \U2018The North Borders Tour - Live\U2019 is released on 6 Oct 2014. Available on CD + DVD with 70-page hardback book, or ltd vinyl and audio download.\n\nORDER NOW\nBonobo Store: http://bonobomusic.com/shop\nAmazon: smarturl.it/northborderslivecd\niTunes: smarturl.it/northbordersliveit\n\nPREVIEW\nDVD Trailer: youtu.be/onCHyksRWiE\nMore Info: bonobomusic.com/news/live";
downloadable = 0;
duration = 352371;
"embeddable_by" = all;
genre = Electronic;
id = 76255568;
isrc = "";
"key_signature" = "";
kind = track;
label =     {
    "avatar_url" = "https://i1.sndcdn.com/avatars-000099073699-09bigf-large.jpg";
    id = 95982;
    kind = user;
    "last_modified" = "2014/10/15 13:58:34 +0000";
    permalink = "ninja-tune";
    "permalink_url" = "http://soundcloud.com/ninja-tune";
    uri = "https://api.soundcloud.com/users/95982";
    username = "Ninja Tune";
};
"label_id" = 95982;
"label_name" = "Ninja Tune";
"last_modified" = "2014/10/15 16:14:00 +0000";
license = "all-rights-reserved";
"original_content_size" = 15437251;
"original_format" = mp3;
permalink = cirrus;
"permalink_url" = "http://soundcloud.com/bonobo/cirrus";
policy = ALLOW;
"purchase_title" = "<null>";
"purchase_url" = "http://bonobomusic.com/shop";
release = "";
"release_day" = "<null>";
"release_month" = "<null>";
"release_year" = "<null>";
sharing = public;
state = finished;
"stream_url" = "https://api.soundcloud.com/tracks/76255568/stream";
streamable = 1;
"tag_list" = "bonobo cirrus north borders ninja tune electronic house instrumental cyriak";
title = Cirrus;
"track_type" = original;
uri = "https://api.soundcloud.com/tracks/76255568";
user =     {
    "avatar_url" = "https://i1.sndcdn.com/avatars-000101336939-rzj1kf-large.jpg";
    id = 8962073;
    kind = user;
    "last_modified" = "2014/10/15 13:57:43 +0000";
    permalink = bonobo;
    "permalink_url" = "http://soundcloud.com/bonobo";
    uri = "https://api.soundcloud.com/users/8962073";
    username = bonobo;
};
"user_id" = 8962073;
"video_url" = "http://www.youtube.com/watch?v=WF34N4gJAKE&feature=youtu.be";
"waveform_url" = "https://w1.sndcdn.com/vR5ukuOzyLbw_m.png";
}

Недвижимость playback_count пропал, отсутствует. Может быть какой-то другой, но я хотел бы использовать этот. Когда я использую приложение iOS Souncloud, отображается счетчик.

У вас есть идеи, как его найти? Является ли это возможным?

Спасибо

2 ответа

В последней версии SoundCloud API playback_count возвращается для этого трека:

HTTP GET: https://api.soundcloud.com/tracks/107686148&client_id={CLIENT_ID}

Отклик:

{
  "kind": "track",
  "id": 76255568,
  "created_at": "2013/01/24 12:14:16 +0000",
  "user_id": 8962073,
  "duration": 352346,
  "commentable": true,
  "state": "finished",
  "original_content_size": 39680549,
  "last_modified": "2018/08/08 23:49:24 +0000",
  "sharing": "public",
  "tag_list": "",
  "permalink": "cirrus",
  "streamable": true,
  "embeddable_by": "all",
  "purchase_url": "http://bonobomusic.com/shop",
  "purchase_title": null,
  "label_id": 95982,
  "genre": "Electronic",
  "title": "Cirrus",
  "description": "Bonobo’s Live Album ‘The North Borders Tour - Live’ is available on CD + DVD with 70-page hardback book, or ltd vinyl and audio download.\n\nORDER NOW\nBonobo Store: http://bonobomusic.com/shop\nAmazon: smarturl.it/northborderslivecd\niTunes: smarturl.it/northbordersliveit\n\nPREVIEW\nDVD Trailer: youtu.be/onCHyksRWiE\nMore Info: bonobomusic.com/news/live",
  "label_name": "Ninja Tune",
  "release": "",
  "track_type": "original",
  "key_signature": "",
  "isrc": "GBCFB1300100",
  "video_url": "http://www.youtube.com/watch?v=WF34N4gJAKE&feature=youtu.be",
  "bpm": null,
  "release_year": 2013,
  "release_month": 1,
  "release_day": 21,
  "original_format": "flac",
  "license": "all-rights-reserved",
  "uri": "https://api.soundcloud.com/tracks/76255568",
  "user": {
    "id": 8962073,
    "kind": "user",
    "permalink": "bonobo",
    "username": "bonobo",
    "last_modified": "2018/04/03 11:36:24 +0000",
    "uri": "https://api.soundcloud.com/users/8962073",
    "permalink_url": "http://soundcloud.com/bonobo",
    "avatar_url": "https://i1.sndcdn.com/avatars-000316888849-d2fwcv-large.jpg"
  },
  "permalink_url": "https://soundcloud.com/bonobo/cirrus",
  "artwork_url": "https://i1.sndcdn.com/artworks-zDHju4alpJDk-0-large.jpg",
  "stream_url": "https://api.soundcloud.com/tracks/76255568/stream",
  "download_url": "https://api.soundcloud.com/tracks/76255568/download",
  "playback_count": 3214194,
  "download_count": 0,
  "favoritings_count": 55066,
  "reposts_count": 10580,
  "comment_count": 1296,
  "label": {
    "id": 95982,
    "kind": "user",
    "permalink": "ninja-tune",
    "username": "Ninja Tune",
    "last_modified": "2018/08/30 14:06:40 +0000",
    "uri": "https://api.soundcloud.com/users/95982",
    "permalink_url": "http://soundcloud.com/ninja-tune",
    "avatar_url": "https://i1.sndcdn.com/avatars-000099073699-09bigf-large.jpg"
  },
  "downloadable": false,
  "waveform_url": "https://w1.sndcdn.com/RjEiZYx8JsA7_m.png",
  "attachments_uri": "https://api.soundcloud.com/tracks/76255568/attachments"
}

Попробуйте использовать HTTP REST API вместо iOS SDK.

SoundCloud имеет тихий режим, который позволяет пользователям отображать или скрывать статистику.

Можно получить playback_count если учетная запись, в которой находится трек, переключается в тихий режим или напрямую связывается с владельцем учетной записи.

Другие вопросы по тегам