Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RyanThompson opened this issue Feb 22, 2023 · 0 comments

Comments

@RyanThompson
Copy link
Contributor

RyanThompson commented Feb 22, 2023

// 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Streams API
Awaiting triage
Development

No branches or pull requests

1 participant