mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-08-14 10:37:19 -07:00
Update README.md
This commit is contained in:
parent
fc5b991fc1
commit
07c1762818
1 changed files with 36 additions and 2 deletions
38
README.md
38
README.md
|
@ -10,9 +10,43 @@ require_once("spaces.php");
|
|||
$key = "EXAMPLE_KEY";
|
||||
$secret = "EXAMPLE_SECRET";
|
||||
|
||||
$space = new SpacesConnect($key, $secret);
|
||||
$space = "my-space";
|
||||
|
||||
$space = new SpacesConnect($key, $secret, $space);
|
||||
```
|
||||
|
||||
|
||||
All available configurations:
|
||||
All available options:
|
||||
###### SpacesConnect( REQUIRED KEY, REQUIRED SECRET, OPTIONAL SPACE's NAME, OPTIONAL REGION, OPTION HOST DOMAIN );
|
||||
|
||||
<br />
|
||||
### Uploading/Downloading Files
|
||||
```php
|
||||
$path_to_file = "folder/my-image.png";
|
||||
$optional_file_name = "image.png";
|
||||
|
||||
$space->uploadFile($path_to_file, $optional_file_name);
|
||||
```
|
||||
All available options:
|
||||
###### uploadFile( REQUIRED PATH TO FILE, OPTIONAL NAME TO SAVE FILE AS);
|
||||
|
||||
<br />
|
||||
### Creating Temporary Links
|
||||
```php
|
||||
$file = "image.png";
|
||||
$valid_for = "1 day";
|
||||
|
||||
$link = $space->CreateTemporaryURL($file, $valid_for);
|
||||
```
|
||||
All available options:
|
||||
###### CreateTemporaryURL( REQUIRED FILE NAME, OPTIONAL TIME LINK IS VALID FOR);
|
||||
|
||||
<br />
|
||||
### Creating Spaces
|
||||
```php
|
||||
$new_space = "my-new-space";
|
||||
|
||||
$space->createSpace($new_space);
|
||||
```
|
||||
All available options:
|
||||
###### createSpace( REQUIRED SPACE NAME, OPTIONAL REGION FOR SPACE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue