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

[37] - Implementar endpoint timeline #45

Closed
wants to merge 15 commits into from
Closed

Conversation

sayechu
Copy link
Owner

@sayechu sayechu commented Jun 2, 2024

[#37] - Implementar endpoint /analytics/timeline/:userId

Se ha creado el endpoint de analytics/timeline/ en clases sin muchas responsabilidades, aplicando Clean Code.

AnalyticsTimelineController.php

desde donde se llama al manager (GetTimelineManager) y se manejan las excepciones

public function __invoke(Request $request): JsonResponse

GetTimelineManager.php

Desde este manager, se le llama a los diferentes providers. Estos nos ofrecen diferentes métodos para poder obtener tanto los users almacenados así como los streamers a los que siguen dichos users.

public function getStreamersTimeline(string $username): array
private function requestHas500Code(mixed $requestResponse): bool

Se sigue la siguiente arquitectura/diseño:
Route > AnalyticsTimelineController > GetTimelineManager > TimelineStreamersProvider
> TimelineStreamsProvider
> TokenProvider

@sayechu sayechu self-assigned this Jun 2, 2024
@sayechu sayechu closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants