Skip to content

Commit 05928a4

Browse files
Merge pull request #131 from tigranmaestro/master
Complete re-write of php SDK
2 parents 6cdb190 + a4aa811 commit 05928a4

File tree

132 files changed

+12312
-4297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+12312
-4297
lines changed

README.md

Lines changed: 13 additions & 1243 deletions
Large diffs are not rendered by default.

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
"video maker"
2525
],
2626
"require": {
27-
"php": ">=7.1",
27+
"php": ">=7.0",
2828
"guzzlehttp/guzzle": "6.3.3",
29-
"ext-json": "*"
29+
"ext-json": "*",
30+
"zendframework/zend-stdlib": "^3.2"
3031
},
3132
"autoload": {
3233
"psr-4": {

composer.lock

Lines changed: 49 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/FONTS_API.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Fonts API
2+
3+
- [Get Template Available Fonts](#get-template-available-fonts)
4+
5+
### Get template available fonts
6+
7+
Retrieves template available fonts.
8+
```php
9+
<?php
10+
11+
require '../../vendor/autoload.php';
12+
13+
$renderforestClient = new \Renderforest\ApiClient(
14+
'your-api-key',
15+
'your-client-id'
16+
);
17+
18+
$fonts = $renderforestClient->getTemplateAvailableFonts(701);
19+
```
20+
21+
[See get template available fonts example](/examples/fonts/get-template-available-fonts.php)
22+
23+
`getTemplateAvailabeFonts ` function returns an object containing all fonts.
24+
The returned object has `getFontById ` method which accepts `fontId` parameter.
25+
26+
```php
27+
$primaryFont = $fonts->getFontById(1656) // returns font
28+
```
29+
30+
Now the font can be used as parameter for `setFonts` setter in project data instance.
31+
32+
[See setFonts() setter in project data](/docs/project-data-api/PROJECT_DATA_API.md#set-project-fonts)
33+
34+
**[⬆ back to the top](#fonts-api)**

doc/INSTALL.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Installation
2+
3+
The recommended way to install Renderforest SDK for PHP is through
4+
[Composer](http://getcomposer.org).
5+
6+
```bash
7+
# Install Composer
8+
curl -sS https://getcomposer.org/installer | php
9+
```
10+
11+
Next, run the Composer command to install the latest stable version of Renderforest SDK for PHP:
12+
13+
```bash
14+
php composer.phar require renderforest/sdk-php
15+
```
16+
17+
After installing, you need to require Composer's autoloader:
18+
19+
```php
20+
require 'vendor/autoload.php';
21+
```

0 commit comments

Comments
 (0)