/
githubmirror
/
wp-calypso
Обзор
Документация
Войти
/
githubmirror
/
wp-calypso
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/wpcom.js/examples/browser-proxy/batch.html
41 строка
1 KB
Mehmood Ahmad
UPDATE: Reader urls from /read to /reader (#99038)
04 фев 2025, 22:41
Не верифицирован
04 фев 2025, 22:41
5d42e49
Код
Авторство
О чём код?
<!DOCTYPE html> <html> <head> <title>wpcom.js browser example with iframe proxy</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <script src="../../dist/wpcom.js"></script> <script src="http://wzrd.in/standalone/wpcom-proxy-request@1.0.x"></script> <script> var wpcom = WPCOM(); // have this `wpcom` instance use the `wpcom-proxy-request` // function for API requests wpcom.request = wpcomProxyRequest; // upgrade to "access all users blogs" mode wpcom.request({ metaAPI: { accessAllUsersBlogs: true } }, function(err) { if (err) throw err; console.log('proxy now running in "access all user\'s blogs" mode'); }); wpcom .batch() .add('/sites/en.blog.wordpress.com') .add('/sites/en.blog.wordpress.com/posts') .add('/reader/tags') .add('/reader/lists') .add('/reader/teams') .run(function(err, me){ if (err) throw err; console.log(err); console.log(me); }); </script> </body> </html>