streams/api

A RESTful API for Laravel Streams.

Installs: 805

Dependents: 2

Suggesters: 0

Security: 0

Stars: 1

Watchers: 4

Forks: 2

Open Issues: 0

Type:streams-addon

1.0.x-dev 2024-08-14 18:26 UTC

This package is auto-updated.

Last update: 2024-10-14 18:55:41 UTC


README

A full-featured API package for the Streams platform that gives you total control.

Documentation

This project is documented at streams.dev.

Installation

composer require streams/api:1.0.x-dev

Configuration

php artisan vendor:publish --provider=Streams\\Api\\ApiServiceProvider --tag=config

Reference

GET /api/streams
POST /api/streams
GET /api/streams/{stream}
PUT /api/streams/{stream}
PATCH /api/streams/{stream}
DELETE /api/streams/{stream}

GET /api/streams/{stream}/entries
POST /api/streams/{stream}/entries
GET /api/streams/{stream}/entries/{entry}
PUT /api/streams/{stream}/entries/{entry}
PATCH /api/streams/{stream}/entries/{entry}
DELETE /api/streams/{stream}/entries/{entry}

POST /api/streams/{stream}/query

?where[field]=value
&constraint[field]=operator
&per_page=10
&page=2
&limit=40
{
    "parameters": [
        {"method": ["argument1", "argument2"]},
        {"where": ["field", "LIKE", "%Value%"]}
    ]
}

Testing

php vendor/bin/phpunit tests/

XDEBUG_MODE=coverage php vendor/bin/phpunit tests/ --coverage-html=./coverage