This repository has been archived by the owner on Jul 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Account.Promocode(string promocode, string language)
KirMozor edited this page May 5, 2022
·
4 revisions
Allows you to activate promotional codes in your account. Token Required
Arguments:
string promocode: Promo code to be activated
string language: The language in which the response from JSON will be. There are following options, en, ru, uz, uk, kk, hy
Examples:
using System;
using YandexMusicApi;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Token.token = "YOURTOKEN";
Console.WriteLine(Account.Promocode("12312", "ru"));
}
}
}
Examples:
using System;
using YandexMusicApi;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Token.GetToken("YOURLOGIN", "YOURPASSWORD");
Console.WriteLine(Account.Promocode("12312", "ru"));
}
}
}
Output:
{
"invocationInfo": {
"hostname": "music-stable-back-vla-59.vla.yp-c.yandex.net",
"req-id": "40950345348634683946346",
"exec-duration-millis": "176"
},
"result": {
"status": "code-not-exists",
"statusDesc": "Подарочный код не существует.",
"accountStatus": {
"account": {
"now": "2022-05-05T19:34:35+06:00",
"uid": 45435435,
"login": "gfhfghh",
"region": 633456345,
"fullName": "lkdflskfglskff",
"secondName": "dsfsdfsdfds",
"firstName": "fgdfsdgfg",
"displayName": "dfsgahdafhdsfh",
"serviceAvailable": true,
"hostedUser": false
},
"permissions": {
"until": "425234624tyfsdgasgdfgx",
"values": [
"landing-play",
"feed-play",
],
"default": [
"landing-play",
]
},
"subscription": {
"autoRenewable": [
{
"expires": "2453h6453643645634564356
"vendor": "Yandex",
"vendorHelpUrl": "https://www.yandex.ru/support/music-app/subscription.xml",
"productId": "ru.yandex.mobile.music.1month.autorenewable.native.app.1month.trial.plus.kz",
"product": {
"productId": "ru.yandex.mobile.music.1month.autorenewable.native.app.1month.trial.plus.kz",
"type": "subscription",
"commonPeriodDuration": "P1M",
"trialPeriodDuration": "P1M",
"duration": 30,
"trialDuration": 30,
"price": {
"amount": 849.0,
"currency": "KZT"
},
"plus": true,
"feature": "new-plus",
"features": [
"basic-music",
"basic-kinopoisk",
"basic-plus"
],
"debug": false
},
"orderId": 45h23453562,
"finished": false
}
],
"nonAutoRenewableRemainder": {
"days": 0
},
"hadAnySubscription": true,
"canStartTrial": false,
"mcdonalds": false
},
"subeditor": false,
"subeditorLevel": 0,
"pretrialActive": false
}
}
}