Skip to content

xaviapa/sdk_storage-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StorageApiSdk

Add your description here

This PHP package is automatically generated by the Swagger Codegen project:

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/softonic/storage_api_sdk.git"
    }
  ],
  "require": {
    "softonic/storage_api_sdk": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/StorageApiSdk/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit lib/Tests

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: storage_api_access_code
Softonic\StorageApiSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: storage_api_application
Softonic\StorageApiSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: storage_api_implicit
Softonic\StorageApiSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: storage_api_password
Softonic\StorageApiSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Softonic\StorageApiSdk\Api\FilesApi();
$id_files = "id_files_example"; // string | SHA-1 hash of the file

try {
    $result = $api_instance->readFile($id_files);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FilesApi->readFile: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://storage.sftapi.com

Class Method HTTP request Description
FilesApi readFile GET /files/{id_files} Fetches a single File
FilesCdnDestinationsApi deleteFileCdnDestination DELETE /files/{id_files}/cdn-destinations/{id_cdn_destinations} Deletes a FileCdnDestination
FilesCdnDestinationsApi findFileCdnDestination GET /files/{id_files}/cdn-destinations List of FileCdnDestinations
UploadRequestsApi createUploadRequest POST /upload-requests Creates a new UploadRequest
UploadRequestsApi readUploadRequest GET /upload-requests/{id_upload_requests} Fetches a single UploadRequest

Documentation For Models

Documentation For Authorization

storage_api_access_code

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://oauth.softonic.com/token
  • Scopes:
  • storage_api.read.files: Read Files
  • storage_api.read.uploadrequests: Read UploadRequests
  • storage_api.create.uploadrequests: Create UploadRequests
  • storage_api.delete.files.cdndestinations: Delete Files/CdnDestinations
  • storage_api.find.files.cdndestinations: Find Files/CdnDestinations

storage_api_application

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • storage_api.read.files: Read Files
  • storage_api.read.uploadrequests: Read UploadRequests
  • storage_api.create.uploadrequests: Create UploadRequests
  • storage_api.delete.files.cdndestinations: Delete Files/CdnDestinations
  • storage_api.find.files.cdndestinations: Find Files/CdnDestinations

storage_api_implicit

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://oauth.softonic.com/authorize
  • Scopes:
  • storage_api.read.files: Read Files
  • storage_api.read.uploadrequests: Read UploadRequests
  • storage_api.create.uploadrequests: Create UploadRequests
  • storage_api.delete.files.cdndestinations: Delete Files/CdnDestinations
  • storage_api.find.files.cdndestinations: Find Files/CdnDestinations

storage_api_password

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes:
  • storage_api.read.files: Read Files
  • storage_api.read.uploadrequests: Read UploadRequests
  • storage_api.create.uploadrequests: Create UploadRequests
  • storage_api.delete.files.cdndestinations: Delete Files/CdnDestinations
  • storage_api.find.files.cdndestinations: Find Files/CdnDestinations

Author

[email protected]

About

SDK for Storage API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 98.7%
  • Shell 1.3%