K1llMan / Yandex.Music.Api

Yandex.Music API (Unofficial) for .Net
GNU General Public License v3.0
91 stars 19 forks source link

Отсутствующие поля в JSON-ах #48

Closed BloodyBaRGaIn closed 4 weeks ago

BloodyBaRGaIn commented 2 months ago

В логах результатов запросов (во время десериализации) появляются записи:

    Could not find member 'status' on object of type 'YAccessToken'. 
        Path 'status', line 1, position 10.
    Could not find member 'location_id' on object of type 'YShortAccountInfo'. 
        Path 'location_id', line 1, position 94.
    Could not find member 'gender' on object of type 'YShortAccountInfo'. 
        Path 'gender', line 1, position 329.
    Could not find member 'is_avatar_empty' on object of type 'YShortAccountInfo'. 
        Path 'is_avatar_empty', line 1, position 351.
    Could not find member 'machine_readable_login' on object of type 'YShortAccountInfo'. 
        Path 'machine_readable_login', line 1, position 544.
    Could not find member 'has_cards' on object of type 'YShortAccountInfo'. 
        Path 'has_cards', line 1, position 569.
    Could not find member 'has_family' on object of type 'YShortAccountInfo'. 
        Path 'has_family', line 1, position 588.
    Could not find member 'x_token_client_id' on object of type 'YShortAccountInfo'. 
        Path 'x_token_client_id', line 1, position 644.
    Could not find member 'x_token_need_reset' on object of type 'YShortAccountInfo'. 
        Path 'x_token_need_reset', line 1, position 700.
    Could not find member 'hasTrailer' on object of type 'YArtist'. 
        Path 'result.artist.hasTrailer', line 1, position 2326.

Добавил эти поля в соответствующие классы "по образу и подобию". Подавлены предупреждения в проекте API, связанные с "legacy" конструкциями для netstandard2.0. Исправил окончания всех файлов и произвел небольшую очистку кода в ручном режиме. Тесты проводил при авторизации через пароль. Статистика результатов теста не изменилась. Записи в логах больше не появляются.

Хочу законтрибьютить изменения.

K1llMan commented 2 months ago

Конечно. Создавай PR, завтра проверю изменения и солью.

BloodyBaRGaIn commented 2 months ago

Смогу сделать вечером

BloodyBaRGaIn commented 2 months ago

После соответствующих тестов можно закрывать проблему.