chipslays/pastly-api

PHP client for Pastly API.


Keywords
api, client, pastebin, api-client, hastebin, pastebin-service, pastebin-api, pastly
License
MIT

Documentation

🗒 PHP Pastly API Client

GitHub Workflow Status GitHub release (latest by date) GitHub

Simple client implementation for Pastly API.

Pastly - The sexiest pastebin in the Internet.

Installation

composer require chipslays/pastly-api

Usage

use Pastly\Client;

require 'vendor/autoload.php';

$client = new Client;
$token = '1622233044:6bCVU-8OI9fjtk3gXhZRJkzQeDGsJNKti2MuBM_n9V';

/** get paste */
$client->get('example-slug');
pastly_get('example-slug');

/** create paste */
$client->create($token, 'Hello, world!');
pastly_create($token, 'Hello, world!');

/** edit paste */
$client->edit($token, 'example-slug', ['title' => 'New Title']);
pastly_edit($token, 'example-slug', ['title' => 'New Title']);

More code can see in examples folder.

Examples

Examples can be found here.

Tests

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.