-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from uploadcare/feature/update
Feature/update
- Loading branch information
Showing
31 changed files
with
472 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
api-samples/rest-api/get-addons-aws_rekognition_detect_moderation_labels-execute-status.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
$configuration = Uploadcare\Configuration::create((string) $_ENV['UPLOADCARE_PUBLIC_KEY'], (string) $_ENV['UPLOADCARE_SECRET_KEY']); | ||
$api = (new Uploadcare\Api($configuration))->addons(); | ||
$status = $api->checkAwsRecognitionModeration('request-id'); | ||
|
||
echo \sprintf('Recognition status: %s', $status); |
7 changes: 7 additions & 0 deletions
7
api-samples/rest-api/post-addons-aws_rekognition_detect_moderation_labels-execute.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
$configuration = Uploadcare\Configuration::create((string) $_ENV['UPLOADCARE_PUBLIC_KEY'], (string) $_ENV['UPLOADCARE_SECRET_KEY']); | ||
$api = (new Uploadcare\Api($configuration))->addons(); | ||
$resultKey = $api->requestAwsRecognitionModeration('1bac376c-aa7e-4356-861b-dd2657b5bfd2'); | ||
|
||
echo \sprintf('Recognition requested. Key is \'%s\'', $resultKey); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Uploadcare\File\AppData; | ||
|
||
abstract class AbstractAwsLabels | ||
{ | ||
protected ?string $version = null; | ||
protected ?\DateTimeInterface $datetimeCreated = null; | ||
protected ?\DateTimeInterface $datetimeUpdated = null; | ||
|
||
public function getVersion(): ?string | ||
{ | ||
return $this->version; | ||
} | ||
|
||
public function setVersion(?string $version): self | ||
{ | ||
$this->version = $version; | ||
|
||
return $this; | ||
} | ||
|
||
public function getDatetimeCreated(): ?\DateTimeInterface | ||
{ | ||
return $this->datetimeCreated; | ||
} | ||
|
||
public function setDatetimeCreated(?\DateTimeInterface $datetimeCreated): self | ||
{ | ||
$this->datetimeCreated = $datetimeCreated; | ||
|
||
return $this; | ||
} | ||
|
||
public function getDatetimeUpdated(): ?\DateTimeInterface | ||
{ | ||
return $this->datetimeUpdated; | ||
} | ||
|
||
public function setDatetimeUpdated(?\DateTimeInterface $datetimeUpdated): self | ||
{ | ||
$this->datetimeUpdated = $datetimeUpdated; | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Uploadcare\File\AppData; | ||
|
||
use Uploadcare\Interfaces\File\AppData\AwsRecognitionData\AwsModerationLabelInterface; | ||
use Uploadcare\Interfaces\SerializableInterface; | ||
|
||
class AwsModerationLabel implements AwsModerationLabelInterface, SerializableInterface | ||
{ | ||
private ?float $confidence = null; | ||
private ?string $name = null; | ||
private ?string $parentName = null; | ||
|
||
public static function rules(): array | ||
{ | ||
return [ | ||
'confidence' => 'float', | ||
'name' => 'string', | ||
'parentName' => 'string', | ||
]; | ||
} | ||
|
||
public function getConfidence(): ?float | ||
{ | ||
return $this->confidence; | ||
} | ||
|
||
public function setConfidence(?float $confidence): self | ||
{ | ||
$this->confidence = $confidence; | ||
|
||
return $this; | ||
} | ||
|
||
public function getName(): ?string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public function setName(?string $name): self | ||
{ | ||
$this->name = $name; | ||
|
||
return $this; | ||
} | ||
|
||
public function getParentName(): ?string | ||
{ | ||
return $this->parentName; | ||
} | ||
|
||
public function setParentName(?string $parentName): self | ||
{ | ||
$this->parentName = $parentName; | ||
|
||
return $this; | ||
} | ||
} |
Oops, something went wrong.