Skip to content

Enable criteria and repository methods for API access with attribution. #139

@RyanThompson

Description

@RyanThompson
// app/Users/UserRepository.php
/**
 * @apiEnabled true
 */
public function getRecent($span = '-15 days'): Collection
GET /streams/{stream}/entries/{method?}

if ($method)
    $data = $repository->{$method}(...[$input])
// app/Pages/PageCriteria.php
/**
 * @apiEnabled true
 */
public function active($category = null): Criteria
POST /streams/{stream}/entries/{method?} (application/json)

if ($method)
     $data $criteria->{$method}(...[$input])...applyQuery(json_decode($body))...pagination()

The impact of this needs to be considered for the API documentation generation as it will need to represent the endpoints introduced via attribution accurately.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions