Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d74ead5
examples(templates): add example for getTemplateSVGContent method.
narekhovhannisyan Jan 15, 2019
25f34ce
examples(users): use inline arguments instead of $options.
narekhovhannisyan Jan 15, 2019
9909ed1
Config: init config file.
narekhovhannisyan Jan 15, 2019
798a099
ProjectData(ProjectData): use configuration variables from config file.
narekhovhannisyan Jan 15, 2019
320299f
Request(Api): rename Http to Api, use configuration variables from
narekhovhannisyan Jan 15, 2019
28ee26a
Request(Web): init Web request class.
narekhovhannisyan Jan 15, 2019
f6e7dd3
src(Client): refactor Client class, fix imports and PhPDocs.
narekhovhannisyan Jan 15, 2019
d15af15
src(Params): fix PhpDocs.
narekhovhannisyan Jan 15, 2019
496db89
src(Singleton): simplify Singleton class and gix docs.
narekhovhannisyan Jan 15, 2019
88cf723
Resource(Users): use Api class for requests, config file.
narekhovhannisyan Jan 15, 2019
0186c62
Resource(Templates): fix imports, use Api and Web classes for requests
narekhovhannisyan Jan 15, 2019
db018df
Resource(Supports): fix imports, use config file.
narekhovhannisyan Jan 15, 2019
675f03a
Resource(Sounds): fix imports, use Api class for requests, use prefixes
narekhovhannisyan Jan 15, 2019
9f8b7f8
Resource(Projects): fix imports, use Api class for requests, use
narekhovhannisyan Jan 15, 2019
316da46
Resource(ProjectData): fix imports, use Api class for requests, use
narekhovhannisyan Jan 15, 2019
0029a2c
root(composer.json): upgrade php to 7.1 version.
narekhovhannisyan Jan 15, 2019
220b947
root(composer.lock): upgrade php to 7.1 version.
narekhovhannisyan Jan 15, 2019
556f0a1
root(README): add docs for getTemplateSVGContent.
narekhovhannisyan Jan 15, 2019
fe9fc01
✨ release 0.3.8
narekhovhannisyan Jan 15, 2019
5096582
Request(Web): add newline at the end of file.
narekhovhannisyan Jan 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Welcome to the Renderforest API! You can use our API to:
- [Get Pluggable-Screens of the Template](#get-pluggable-screens-of-the-template)
- [Get Recommended-Custom-Colors of the Template](#get-recommended-custom-colors-of-the-template)
- [Get Template-Presets of the Template](#get-template-presets-of-the-template)
- [Get SVG Content of the Template](#get-svg-content-of-the-template)
- [Get Theme of the Template](#get-theme-of-the-template)
- [Get Transitions of the Template](#get-transitions-of-the-template)
* [Users API](#users-api)
Expand Down Expand Up @@ -1105,6 +1106,29 @@ Template-presets are ready-made stories created from this template to fasten you
[See example](https://github.com/renderforest/renderforest-sdk-php/blob/master/examples/templates/get-template-presets.php)


### Get SVG Content of the Template
Retrieves SVG content of the template.

```php
<?php

require 'vendor/autoload.php';

$payload = [
'templateId' => 701
];
try {
$templateSVGContent = \Renderforest\Client::getTemplateSVGContent($payload);
} catch (\GuzzleHttp\Exception\GuzzleException $e) {
var_dump($e); // handle the error
}

var_dump($templateRecommendedCustomColors); // handle the success
```

[See example](https://github.com/renderforest/renderforest-sdk-php/blob/master/examples/templates/get-template-svg-content.php)


### Get Theme of the Template

Retrieves theme of the template.
Expand Down Expand Up @@ -1187,4 +1211,4 @@ var_dump($currentUser); // handle the success
Example for creating project from scratch. Includes creating project, updating project data, video rendering status
checking and video downloading.

[See example](https://github.com/renderforest/renderforest-sdk-php/blob/master/examples/scratch-project/create-project-from-scratch.php)
[See example](https://github.com/renderforest/renderforest-sdk-php/blob/master/examples/scratch-project/create-project-from-scratch.php)
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "renderforest/sdk-php",
"description": "Renderforest SDK for PHP",
"version": "0.3.7",
"version": "0.3.8",
"homepage": "https://github.com/renderforest/renderforest-sdk-php",
"authors": [
{
Expand All @@ -24,8 +24,9 @@
"video maker"
],
"require": {
"php": ">=5.5",
"guzzlehttp/guzzle": "6.3.3"
"php": ">=7.1",
"guzzlehttp/guzzle": "6.3.3",
"ext-json": ""
},
"autoload": {
"psr-4": {
Expand Down
65 changes: 55 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions examples/templates/get-template-svg-content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Copyright (c) 2018-present, Renderforest, LLC.
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory.
*/

require 'vendor/autoload.php';

$payload = [
'templateId' => 701
];
try {
$templateSVGContent = \Renderforest\Client::getTemplateSVGContent($payload);
} catch (\GuzzleHttp\Exception\GuzzleException $e) {
var_dump($e); // handle the error
}

var_dump($templateRecommendedCustomColors); // handle the success
4 changes: 1 addition & 3 deletions examples/users/get-current-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

require 'vendor/autoload.php';

$options = ['signKey' => '<signKey>', 'clientId' => -1];

$renderforest = new \Renderforest\Client($options);;
$renderforest = new \Renderforest\Client(['signKey' => '<signKey>', 'clientId' => -1]);

try {
$currentUser = $renderforest->getCurrentUser();
Expand Down
Loading