Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Album.GetTracks(string albumId)

KirMozor edited this page May 7, 2022 · 1 revision

Returns tracks from an album by album ID

Example:

using System;
using YandexMusicApi;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Album.GetTracks("17589377")); //AlbumId: Imagine Dragons
        }
    }
}

Output:

{
  "invocationInfo": {
    "hostname": "music-stable-back-vla-51.vla.yp-c.yandex.net",
    "req-id": "u234uf634u6ug7678u34567u3yqje",
    "exec-duration-millis": "2"
  },
  "result": {
    "id": 17589377,
    "title": "Imagine Dragons",
    "type": "single",
    "metaType": "music",
    "year": 2021,
    "releaseDate": "2021-08-18T03:00:00+06:00",
    "coverUri": "avatars.yandex.net/get-music-content/5234929/038ab016.a.17589377-1/%%",
    "ogImage": "avatars.yandex.net/get-music-content/5234929/038ab016.a.17589377-1/%%",
    "genre": "pop",
    "buy": [],
    "trackCount": 1,
    "likesCount": 6,
    "recent": false,
    "veryImportant": false,
    "artists": [
      {
        "id": 12921378,
        "name": "Ragged Insomnia",
        "various": false,
        "composer": false,
        "cover": {
          "type": "from-album-cover",
          "prefix": "038ab016.a.17589377-1",
          "uri": "avatars.yandex.net/get-music-content/5234929/038ab016.a.17589377-1/%%"
        },
        "genres": []
      }
    ],
    "labels": [
      {
        "id": 3644083,
        "name": "Ragged Insomnia"
      }
    ],
    "available": true,
    "availableForPremiumUsers": true,
    "availableForMobile": true,
    "availablePartially": false,
    "bests": [],
    "sortOrder": "asc",
    "volumes": [
      [
        {
          "id": "89586227",
          "realId": "89586227",
          "title": "Imagine Dragons",
          "trackSource": "OWN",
          "major": {
            "id": 131,
            "name": "TUNECORE"
          },
          "available": true,
          "availableForPremiumUsers": true,
          "availableFullWithoutPermission": false,
          "durationMs": 152220,
          "storageDir": "",
          "fileSize": 0,
          "r128": {
            "i": -9.25,
            "tp": 0.02
          },
          "previewDurationMs": 30000,
          "artists": [
            {
              "id": 12921378,
              "name": "Ragged Insomnia",
              "various": false,
              "composer": false,
              "cover": {
                "type": "from-album-cover",
                "prefix": "038ab016.a.17589377-1",
                "uri": "avatars.yandex.net/get-music-content/5234929/038ab016.a.17589377-1/%%"
              },
              "genres": []
            }
          ],
          "albums": [
            {
              "id": 17589377,
              "title": "Imagine Dragons",
              "type": "single",
              "metaType": "music",
              "year": 2021,
              "releaseDate": "2021-08-18T03:00:00+06:00",
              "coverUri": "avatars.yandex.net/get-music-content/5234929/038ab016.a.17589377-1/%%",
              "ogImage": "avatars.yandex.net/get-music-content/5234929/038ab016.a.17589377-1/%%",
              "genre": "pop",
              "buy": [],
              "trackCount": 1,
              "likesCount": 6,
              "recent": false,
              "veryImportant": false,
              "artists": [
                {
                  "id": 12921378,
                  "name": "Ragged Insomnia",
                  "various": false,
                  "composer": false,
                  "cover": {
                    "type": "from-album-cover",
                    "prefix": "038ab016.a.17589377-1",
                    "uri": "avatars.yandex.net/get-music-content/5234929/038ab016.a.17589377-1/%%"
                  },
                  "genres": []
                }
              ],
              "labels": [
                {
                  "id": 3644083,
                  "name": "Ragged Insomnia"
                }
              ],
              "available": true,
              "availableForPremiumUsers": true,
              "availableForMobile": true,
              "availablePartially": false,
              "bests": [],
              "trackPosition": {
                "volume": 1,
                "index": 1
              }
            }
          ],
          "coverUri": "avatars.yandex.net/get-music-content/5234929/038ab016.a.17589377-1/%%",
          "ogImage": "avatars.yandex.net/get-music-content/5234929/038ab016.a.17589377-1/%%",
          "lyricsAvailable": true,
          "lyricsInfo": {
            "hasAvailableSyncLyrics": true,
            "hasAvailableTextLyrics": true
          },
          "best": false,
          "type": "music",
          "rememberPosition": false,
          "trackSharingFlag": "COVER_ONLY"
        }
      ]
    ],
    "pager": {
      "total": 1,
      "page": 0,
      "perPage": 1
    }
  }
}

Clone this wiki locally