zloadmin/laravel-keep2share

There is no license information available for the latest version (dev-master) of this package.

Keep2share API client for laravel

dev-master 2022-04-13 17:39 UTC

This package is auto-updated.

Last update: 2024-04-13 21:44:39 UTC


README

composer require zloadmin/laravel-keep2share:dev-master

Set configuration

Publish config file

php artisan vendor:publish --provider="LaravelKeep2Share\Providers\Keep2ShareServiceProvider"

In your .env file add access token

KEEP2SHARE_ACCESS_TOKEN=your_token_here

OR username and password

KEEP2SHARE_USERNAME=your_username

KEEP2SHARE_PASSWORD=your_password

Using method getBalance()

<?php
use LaravelKeep2Share\Facades\Keep2Share;
Keep2Share::getBalance();

Using other methods

This package only laravel facade for original API client (https://github.com/keep2share/api), you can use any public method as static method

<?php

/** login **/
Keep2Share::login();

/** getFiles **/
Keep2Share::getFilesList('/', 10, 0, ['date_created'=>-1], 'files');

/** upload **/
Keep2Share::uploadFile('PATH-TO-LOCAL-FILE');

/** getUrl **/
Keep2Share::GetUrl('ID-FILE');

/** createFolder **/
Keep2Share::createFolder('Any name');

/** getBalance **/
Keep2Share::getBalance();