vkdart

Форк
0
41 строка · 1.3 Кб
1
import 'package:vkdart/vkontakte.dart';
2

3
/// Model Audio.
4
///
5
/// See https://dev.vk.com/ru/reference/objects/audio
6
class AudioAttachmentModel extends CustomAttachmentModel {
7
  // ignore: public_member_api_docs
8
  AudioAttachmentModel(super.payload) : super(attachType: 'audio');
9

10
  /// A singer.
11
  String? get artist => payload['artist'];
12

13
  /// Title of the composition.
14
  String? get title => payload['title'];
15

16
  /// Duration of the audio recording in seconds.
17
  int? get duration => payload['duration'];
18

19
  /// Link to mp3.
20
  String? get url => payload['url'];
21

22
  /// Audio text ID (if available).
23
  int? get lyricsId => payload['lyrics_id'];
24

25
  /// Identifier of the album in which the audio recording is located (if assigned).
26
  int? get albumId => payload['album_id'];
27

28
  /// Genre identifier from the list of
29
  /// [audio genres](https://dev.vk.com/ru/reference/objects/audio-genres).
30
  int? get genreId => payload['genre_id'];
31

32
  /// Date added.
33
  int? get createdAt => payload['date'];
34

35
  /// `true` if the “Do not display during search” option is enabled.
36
  /// If the option is disabled, the field is not returned.
37
  bool? get isNoSearch => checkBoolInProperty('no_search');
38

39
  /// `true` if the audio is high quality.
40
  bool? get isHq => checkBoolInProperty('is_hq');
41
}
42

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.