【发布时间】:2017-10-19 19:03:59
【问题描述】:
如何从 podio api 以 json 或数组格式而不是对象获取响应? 我使用 podio-php (https://github.com/podio/podio-php)
我的代码
Podio::setup(CLIENT_ID_PODIO, CLIENT_SECRET_PODIO);
$oauth = Podio::is_authenticated();
Podio::authenticate_with_app(111111,
'bergbttyjra74d5afgrfhgrh781e70');
//$items = PodioItem::filter(111111);
$item = PodioItem::filter(111111, array(
'filters' => array(
'created_on' => array(
"from" => "2017-10-09 00:00:00",
"to" => "2017-10-19 23:59:59"
)
),
));
// print_r($item);// output object
// how next ?
【问题讨论】:
-
对象有什么问题?
-
我不知道如何从对象中获取数据作为这个 PodioByLine 对象 ( [__attributes:PodioObject:private] => Array ( [type] => user [id] => 4286469 [avatar_type] = > 文件 [avatar_id] => 422384899 [图像] => 数组 ( [hosted_by] => 播音台 [hosted_by_humanized_name] => 播音台 [thumbnail_link] => d2cmuesa4snpwn.cloudfront.net/public/422384899 [链接] => d2cmuesa4snpwn.cloudfront.net/public/422384899 [file_id] => 422384899 [ external_file_id] => [link_target] => _blank) [name] => FGfwegf fegfe
-
是的,我读过文档
-
文档解释了如何使用对象及其数据,包括代码示例。