Answer the question
In order to leave comments, you need to log in
How to get the list of groups along with the text of the pinned message?
I'm trying to do it through execute .
On 100 groups it seems normal, but 500 already falls off: "Runtime error occurred during code invocation: Too many operations".
groups.search has a limit of 1000. Apparently this error is due to map.push(event).
Are there any options for this to work on 1000 groups?
var events = API.groups.search({
"q" : "*",
"future" : 1,
"type": "event",
"offset" : 0,
"count" : 10,
"fields": "description,fixed_post"
});
var map = [];
if (events.count) {
var i = events.items.length;
do {
var event = events.items[i];
if (event.fixed_post) {
event.fixed_text = "Текст из wall.getById";
}
map.push(event);
i = i - 1;
} while (i > 0)
}
return {
"items": map,
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question