-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathget-template.php
More file actions
42 lines (30 loc) · 1.29 KB
/
get-template.php
File metadata and controls
42 lines (30 loc) · 1.29 KB
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
41
42
<?php
require '../../vendor/autoload.php';
$template = \Renderforest\ApiClient::getTemplate(1445, 'en');
echo 'ID - ' . $template->getId() . PHP_EOL;
echo 'Description - ' . $template->getDescription() . PHP_EOL;
echo 'Duration - ' . $template->getDuration() . PHP_EOL;
echo 'Rend Count - ' . $template->getRendCount() . PHP_EOL;
echo 'Thumbnail - ' . $template->getThumbnail() . PHP_EOL;
echo 'Title - ' . $template->getTitle() . PHP_EOL;
echo 'Video URL - ' . $template->getVideoUrl() . PHP_EOL;
echo 'Is Video - ' . ($template->isVideo() ? 'Yes' : 'No') . PHP_EOL;
echo PHP_EOL;
echo 'Categories:' . PHP_EOL;
foreach ($template->getCategories() as $category) {
echo '-- ID - ' . $category->getId() . PHP_EOL;
echo '-- Parent ID - ' . $category->getParentId() . PHP_EOL;
echo '-- Title - ' . $category->getTitle() . PHP_EOL;
echo PHP_EOL;
}
echo PHP_EOL;
echo 'Durations:' . PHP_EOL;
foreach ($template->getDurations() as $duration) {
echo '-- Template ID - ' . $duration->getTemplateId() . PHP_EOL;
echo '-- Duration - ' . $duration->getDuration() . PHP_EOL;
echo '-- Name - ' . $duration->getName() . PHP_EOL;
echo '-- Link Name - ' . $duration->getLinkName() . PHP_EOL;
echo '-- Video URL - ' . $duration->getVideoUrl() . PHP_EOL;
echo PHP_EOL;
}
echo PHP_EOL;