Skip to content

Commit 016705f

Browse files
authored
Merge pull request #3 from PreviewLinks/development
Merge Development
2 parents 48edf26 + c594a28 commit 016705f

File tree

8 files changed

+36
-40
lines changed

8 files changed

+36
-40
lines changed

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Security Policy
22

3-
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
3+
If you discover any security related issues, please email [email protected] instead of using the issue tracker.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
All notable changes to `php-previewify` will be documented in this file.
3+
All notable changes to `php-previewlinks` will be documented in this file.
44

55
## 1.0.0 - 2022-01-07
66

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) Flowframe <[email protected]>
3+
Copyright (c) PreviewLinks <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
# Previewify for PHP
1+
# PreviewLinks for PHP
22

3-
This is the official [Previewify](https://previewify.app) client for PHP.
4-
5-
## Support us
6-
7-
[<img src="https://flowfra.me/github-ad.png" width="419px" />](https://flowfra.me/github-ad-click)
8-
9-
Like our work? You can support us by purchasing one of our products.
3+
This is the official [PreviewLinks](https://previewlinks.io) client for PHP.
104

115
## Installation
126

137
You can install the package via composer:
148

159
```bash
16-
composer require flowframe/php-previewify
10+
composer require previewlinks/php-previewlinks
1711
```
1812

1913
## Usage
@@ -25,14 +19,14 @@ Use the `image` method to generate downloadable image URLs, be aware that this m
2519
```php
2620
<?php
2721

28-
use Flowframe\Previewify\Previewify;
22+
use PreviewLinks\PreviewLinks;
2923

30-
$previewify = new Previewify('<YOUR_SITE_API_KEY>');
24+
$previewlinks = new PreviewLinks('<YOUR_SITE_API_KEY>');
3125

32-
$response = $previewify->image(
26+
$response = $previewlinks->image(
3327
templateId: 1,
3428
fields: [
35-
'previewify:title' => 'Hello from PHP SDK',
29+
'previewlinks:title' => 'Hello from PHP SDK',
3630
],
3731
);
3832

@@ -48,14 +42,14 @@ Async images are perfect if you don't want to download the image or use meta tag
4842
```php
4943
<?php
5044

51-
use Flowframe\Previewify\Previewify;
45+
use PreviewLinks\PreviewLinks;
5246

53-
$previewify = new Previewify('<YOUR_SITE_API_KEY>');
47+
$previewlinks = new PreviewLinks('<YOUR_SITE_API_KEY>');
5448

55-
$url = $previewify->asyncImage(
49+
$url = $previewlinks->asyncImage(
5650
templateId: 1,
5751
fields: [
58-
'previewify:title' => 'Hello from PHP SDK',
52+
'previewlinks:title' => 'Hello from PHP SDK',
5953
],
6054
);
6155

@@ -68,6 +62,7 @@ Please review [our security policy](../../security/policy) on how to report secu
6862

6963
## Credits
7064

65+
- [Logan Craft](https://github.com/CraftLogan)
7166
- [Lars Klopstra](https://github.com/flowframe)
7267
- [All Contributors](../../contributors)
7368

composer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2-
"name": "flowframe/php-previewify",
3-
"description": "The official PHP Previewify client",
2+
"name": "previewlinks/php-previewlinks",
3+
"description": "The official PHP Previewlinks client",
44
"keywords": [
55
"Flowframe",
6-
"php-previewify"
6+
"Previewlinks",
7+
"php-previewlinks"
78
],
8-
"homepage": "https://github.com/flowframe/php-previewify",
9+
"homepage": "https://github.com/PreviewLinks/php-previewlinks",
910
"license": "MIT",
1011
"authors": [
1112
{
12-
"name": "Lars Klopstra",
13-
"email": "[email protected]",
13+
"name": "Logan Craft",
14+
"email": "[email protected]",
1415
"role": "Developer"
1516
}
1617
],
@@ -25,12 +26,12 @@
2526
},
2627
"autoload": {
2728
"psr-4": {
28-
"Flowframe\\Previewify\\": "src"
29+
"PreviewLinks\\": "src"
2930
}
3031
},
3132
"autoload-dev": {
3233
"psr-4": {
33-
"Flowframe\\Previewify\\Tests\\": "tests"
34+
"PreviewLinks\\Tests\\": "tests"
3435
}
3536
},
3637
"scripts": {

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
verbose="true"
2020
>
2121
<testsuites>
22-
<testsuite name="Flowframe Test Suite">
22+
<testsuite name="PreviewLinks Test Suite">
2323
<directory>tests</directory>
2424
</testsuite>
2525
</testsuites>

src/Previewify.php renamed to src/PreviewLinks.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?php
22

3-
namespace Flowframe\Previewify;
3+
namespace PreviewLinks;
44

55
use Symfony\Component\HttpClient\HttpClient;
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

8-
class Previewify
8+
class PreviewLinks
99
{
10-
public const IMAGE_ENDPOINT = 'https://previewify.app/api/image';
10+
public const IMAGE_ENDPOINT = 'https://previewlinks.io/api/image';
1111

12-
public const ASYNC_IMAGE_ENDPOINT = 'https://previewify.app/api/async-image';
12+
public const ASYNC_IMAGE_ENDPOINT = 'https://previewlinks.io/api/async-image';
1313

1414
public function __construct(
1515
public string $apiKey,

tests/PreviewifyTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<?php
22

3-
use Flowframe\Previewify\Previewify;
4-
53
use function PHPUnit\Framework\assertEquals;
64

5+
use PreviewLinks\PreviewLinks;
6+
77
it('can generate an async image', function () {
8-
$previewify = new Previewify('test-key');
8+
$previewlinks = new PreviewLinks('test-key');
99

10-
$url = $previewify->asyncImage(1, [
11-
'previewify:title' => 'Hi',
12-
'previewify:description' => 'This is a test',
10+
$url = $previewlinks->asyncImage(1, [
11+
'previewlinks:title' => 'Hi',
12+
'previewlinks:description' => 'This is a test',
1313
]);
1414

1515
assertEquals(
16-
'https://previewify.app/api/async-image?data=eyJ0ZW1wbGF0ZV9pZCI6MSwiZmllbGRzIjp7InByZXZpZXdpZnk6dGl0bGUiOiJIaSIsInByZXZpZXdpZnk6ZGVzY3JpcHRpb24iOiJUaGlzIGlzIGEgdGVzdCJ9fQ%3D%3D&signature=276956e53123b06bcf6a71624eb9a69a7e32cbfa72281ad53601fb24ae2468b8',
16+
'https://previewlinks.io/api/async-image?data=eyJ0ZW1wbGF0ZV9pZCI6MSwiZmllbGRzIjp7InByZXZpZXdsaW5rczp0aXRsZSI6IkhpIiwicHJldmlld2xpbmtzOmRlc2NyaXB0aW9uIjoiVGhpcyBpcyBhIHRlc3QifX0%3D&signature=8f690cf87aa9994a42eb7d4920788c6643a1cc9ec0025ec77a912052921af1f6',
1717
$url,
1818
);
1919
});

0 commit comments

Comments
 (0)