Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown object property "link_redirects" #211

Open
elias506 opened this issue Mar 28, 2022 · 2 comments
Open

Unknown object property "link_redirects" #211

elias506 opened this issue Mar 28, 2022 · 2 comments

Comments

@elias506
Copy link

Hello!

I stumbled upon the property link_redirects in account_info object in objects.json:

"link_redirects": {
          "type": "object"
        },

Actual question, what does that means?

@SevereCloud
Copy link

VKCOM/api-schema-typescript-generator#19

Можно привести к такому

type AccountInfo struct {
  LinkRedirects map[string]interface{} `json:"link_redirects"` // Ну или map[string]any если версия go >= 1.18
}

На деле api возвращает объект со строками, поэтому у себя в vksdk я использую map[string]string

https://github.com/SevereCloud/vksdk/blob/e983680a2c27787d571362892aba53ae5e86d59d/object/account.go#L110-L112

@elias506
Copy link
Author

Да, я понимаю, что можно просто использовать map[string]string, но мне нужно конкретно тип поля

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants