mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-08-21 05:43:44 -07:00
Compare commits
No commits in common. "master" and "3.5.0" have entirely different histories.
6 changed files with 245 additions and 208 deletions
|
@ -1,7 +1,6 @@
|
||||||
# This library is deprecated
|

|
||||||
We recommend using the [official SDK](https://github.com/DigitalOceanPHP/Client) or the [Laravel package](https://github.com/GrahamCampbell/Laravel-DigitalOcean)
|
|
||||||
|
|
||||||
All issues will be closed and new PRs will not be accepted
|
PHP library for accessing Digital Ocean spaces
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
Install via composer
|
Install via composer
|
||||||
|
@ -33,9 +32,6 @@ $file2url = $file2->getSignedURL("2 hours");
|
||||||
// Make a copy
|
// Make a copy
|
||||||
$file3 = $file2->copy('remote-file-3.txt');
|
$file3 = $file2->copy('remote-file-3.txt');
|
||||||
|
|
||||||
// Move or rename a file
|
|
||||||
$file2->move('new-filename.txt')
|
|
||||||
|
|
||||||
// Make a file public and get the URL
|
// Make a file public and get the URL
|
||||||
$file3->makePublic();
|
$file3->makePublic();
|
||||||
$file3url = $file3->getURL();
|
$file3url = $file3->getURL();
|
||||||
|
|
|
@ -325,14 +325,13 @@ class Space
|
||||||
* Get an instance of \SpacesAPI\File for a given filename
|
* Get an instance of \SpacesAPI\File for a given filename
|
||||||
*
|
*
|
||||||
* @param string $filename
|
* @param string $filename
|
||||||
* @package bool $validate
|
|
||||||
*
|
*
|
||||||
* @return \SpacesAPI\File
|
* @return \SpacesAPI\File
|
||||||
* @throws \SpacesAPI\Exceptions\FileDoesntExistException Thrown if the file doesn't exist
|
* @throws \SpacesAPI\Exceptions\FileDoesntExistException Thrown if the file doesn't exist
|
||||||
*/
|
*/
|
||||||
public function file(string $filename, bool $validate = true): File
|
public function file(string $filename): File
|
||||||
{
|
{
|
||||||
return new File($this, $filename, [], $validate);
|
return new File($this, $filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Spaces
|
||||||
{
|
{
|
||||||
$this->s3 = new S3Client([
|
$this->s3 = new S3Client([
|
||||||
"version" => "latest",
|
"version" => "latest",
|
||||||
"region" => $region,
|
"region" => "us-east-1",
|
||||||
"endpoint" => "https://$region.$host",
|
"endpoint" => "https://$region.$host",
|
||||||
"credentials" => ["key" => $accessKey, "secret" => $secretKey],
|
"credentials" => ["key" => $accessKey, "secret" => $secretKey],
|
||||||
"ua_append" => "SociallyDev-Spaces-API/2",
|
"ua_append" => "SociallyDev-Spaces-API/2",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "sociallydev/spaces-api",
|
"name": "sociallydev/spaces-api",
|
||||||
"description": "Library for accessing Digital Ocean spaces",
|
"description": "Library for accessing Digital Ocean spaces",
|
||||||
"version":"3.6.1",
|
"version":"3.5.0",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
432
composer.lock
generated
432
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -180,7 +180,7 @@ Recursively download an entire directory.
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
```php
|
```php
|
||||||
public file (string $filename, bool $validate = true)
|
public file (string $filename)
|
||||||
```
|
```
|
||||||
|
|
||||||
Get an instance of \SpacesAPI\File for a given filename
|
Get an instance of \SpacesAPI\File for a given filename
|
||||||
|
@ -190,8 +190,6 @@ Get an instance of \SpacesAPI\File for a given filename
|
||||||
**Parameters**
|
**Parameters**
|
||||||
|
|
||||||
* `(string) $filename`
|
* `(string) $filename`
|
||||||
* `(bool) $validate`
|
|
||||||
: Whether to validate the file exits. Defaults to `true`
|
|
||||||
|
|
||||||
**Return Values**
|
**Return Values**
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue