M
M
map_m2017-10-18 09:49:43
Classmates
map_m, 2017-10-18 09:49:43

Classmates. Getting mediatopic via API?

Help me please.
Created a group and created a topic in it.
I'm trying to get information on this topic through the API. I'm using the mediatopic.getByIds
method . I can't figure out what string to put in the 'fields' field to get the topic and additional text of this topic.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Egorichev, 2017-10-18
@MaksimEgorichev

Try media_topic.*
This value of fields should return all the fields in the topic first.
Also, if I understand you correctly, the value "media_topic.media,media_topic.media_text" will work.
The general principle for choosing the value of the fields field is as follows:
1. see what kind of object you have returned in the method response
2. find the corresponding object in the table on the page https://apiok.ru/dev/types/types.FieldSets (in your case, this is media_topic)
3. The first column of this table is the text that must be specified up to the dot in the fields field.
4. if all fields of the object are needed, then you can specify "*" on the right side (after the dot)
5. if separate fields are needed, then their values ​​can be viewed by clicking on the link in the second column of the table on the page https://apiok.ru/dev/types/types.FieldSets. In your case, this is https://apiok.ru/dev/types/mediatopic.MediaTopicBe...
6. List all required fields in fields separated by commas.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question