-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
40 lines (30 loc) · 964 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
include('vendor/autoload.php');
use TribePHP\Tribe;
function print_a($var) {
echo "<pre>";
print_r($var);
echo "</pre>";
}
$post_with_mapping = [
'id',
'title',
'postTypeId',
'postType' => [
'id',
'name',
'updatedAt',
'mappings' => [
'key',
'title',
'type',
'field',
'description'
]
]
];
$tribe = new Tribe('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IkFQUDo6aWY0ZUkyMnhXdDdaIiwibmV0d29ya0lkIjoiV0Zjd2J4TEdmUyIsInRva2VuVHlwZSI6IkxJTUlURUQiLCJlbnRpdHlJZCI6IldGY3dieExHZlMiLCJwZXJtaXNzaW9uQ29udGV4dCI6Ik5FVFdPUksiLCJwZXJtaXNzaW9ucyI6WyIqIl0sImlhdCI6MTY0MzgzMTI2MiwiZXhwIjoxNjQ2NDIzMjYyfQ.gena0w1wh4tlw1LEyhUPlfJ1jXP0rl0XiIpkfveHp60');
//print_a($tribe->getPosts(['0fihjgNW2UaH'], $post_with_mapping));
//print_a($tribe->getSpaces());
print_a($tribe->createPost('0fihjgNW2UaH', 'Prueba con Jesus', '<p>Ayyyyyyyy wey!!!</p>', $post_with_mapping));
?>