mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Add /api/v1/timelines/tag/{hashtag} endpoint
This commit is contained in:
parent
01a3841bc7
commit
2ff53be458
2 changed files with 36 additions and 23 deletions
|
@ -1637,4 +1637,20 @@ class ApiV1Controller extends Controller
|
|||
$res = $this->fractal->createData($resource)->toArray();
|
||||
return response()->json($res);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/v1/timelines/tag/{hashtag}
|
||||
*
|
||||
* @param string $hashtag
|
||||
*
|
||||
* @return StatusTransformer
|
||||
*/
|
||||
public function timelineHashtag(Request $request, $hashtag)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
|
||||
// todo
|
||||
$res = [];
|
||||
return response()->json($res);
|
||||
}
|
||||
}
|
|
@ -90,52 +90,49 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::post('accounts/{id}/unblock', 'Api\ApiV1Controller@accountUnblockById')->middleware('auth:api');
|
||||
Route::post('accounts/{id}/pin', 'Api\ApiV1Controller@accountEndorsements')->middleware('auth:api');
|
||||
Route::post('accounts/{id}/unpin', 'Api\ApiV1Controller@accountEndorsements')->middleware('auth:api');
|
||||
// Route::get('accounts/{id}', 'PublicApiController@account');
|
||||
Route::post('accounts/{id}/mute', 'Api\ApiV1Controller@accountMuteById')->middleware('auth:api');
|
||||
Route::post('accounts/{id}/unmute', 'Api\ApiV1Controller@accountUnmuteById')->middleware('auth:api');
|
||||
Route::get('accounts/{id}/lists', 'Api\ApiV1Controller@accountListsById')->middleware('auth:api');
|
||||
Route::get('lists/{id}/accounts', 'Api\ApiV1Controller@accountListsById')->middleware('auth:api');
|
||||
Route::get('accounts/{id}', 'Api\ApiV1Controller@accountById')->middleware('auth:api');
|
||||
|
||||
Route::post('avatar/update', 'ApiController@avatarUpdate')->middleware('auth:api');
|
||||
Route::get('blocks', 'Api\ApiV1Controller@accountBlocks')->middleware('auth:api');
|
||||
Route::get('conversations', 'Api\ApiV1Controller@conversations')->middleware('auth:api');
|
||||
Route::get('custom_emojis', 'Api\ApiV1Controller@customEmojis');
|
||||
Route::get('domain_blocks', 'Api\ApiV1Controller@accountDomainBlocks')->middleware('auth:api');
|
||||
Route::post('domain_blocks', 'Api\ApiV1Controller@accountDomainBlocks')->middleware('auth:api');
|
||||
Route::delete('domain_blocks', 'Api\ApiV1Controller@accountDomainBlocks')->middleware('auth:api');
|
||||
Route::get('endorsements', 'Api\ApiV1Controller@accountEndorsements')->middleware('auth:api');
|
||||
Route::get('blocks', 'Api\ApiV1Controller@accountBlocks')->middleware('auth:api');
|
||||
Route::get('custom_emojis', 'Api\ApiV1Controller@customEmojis');
|
||||
Route::get('favourites', 'Api\ApiV1Controller@accountFavourites')->middleware('auth:api');
|
||||
Route::post('statuses/{id}/favourite', 'Api\ApiV1Controller@statusFavouriteById')->middleware('auth:api');
|
||||
Route::post('statuses/{id}/unfavourite', 'Api\ApiV1Controller@statusUnfavouriteById')->middleware('auth:api');
|
||||
Route::get('filters', 'Api\ApiV1Controller@accountFilters')->middleware('auth:api');
|
||||
Route::get('follow_requests', 'Api\ApiV1Controller@accountFollowRequests')->middleware('auth:api');
|
||||
Route::post('follow_requests/{id}/authorize', 'Api\ApiV1Controller@accountFollowRequestAccept')->middleware('auth:api');
|
||||
Route::post('follow_requests/{id}/reject', 'Api\ApiV1Controller@accountFollowRequestReject')->middleware('auth:api');
|
||||
Route::get('suggestions', 'Api\ApiV1Controller@accountSuggestions')->middleware('auth:api');
|
||||
Route::get('lists', 'Api\ApiV1Controller@accountLists')->middleware('auth:api');
|
||||
Route::get('accounts/{id}/lists', 'Api\ApiV1Controller@accountListsById')->middleware('auth:api');
|
||||
Route::get('lists/{id}/accounts', 'Api\ApiV1Controller@accountListsById')->middleware('auth:api');
|
||||
Route::post('media', 'Api\ApiV1Controller@mediaUpload')->middleware('auth:api');
|
||||
Route::put('media/{id}', 'Api\ApiV1Controller@mediaUpdate')->middleware('auth:api');
|
||||
Route::get('mutes', 'Api\ApiV1Controller@accountMutes')->middleware('auth:api');
|
||||
Route::post('accounts/{id}/mute', 'Api\ApiV1Controller@accountMuteById')->middleware('auth:api');
|
||||
Route::post('accounts/{id}/unmute', 'Api\ApiV1Controller@accountUnmuteById')->middleware('auth:api');
|
||||
Route::get('notifications', 'Api\ApiV1Controller@accountNotifications')->middleware('auth:api');
|
||||
Route::get('suggestions', 'Api\ApiV1Controller@accountSuggestions')->middleware('auth:api');
|
||||
|
||||
Route::get('statuses/{id}', 'Api\ApiV1Controller@statusById')->middleware('auth:api');
|
||||
Route::post('statuses/{id}/favourite', 'Api\ApiV1Controller@statusFavouriteById')->middleware('auth:api');
|
||||
Route::post('statuses/{id}/unfavourite', 'Api\ApiV1Controller@statusUnfavouriteById')->middleware('auth:api');
|
||||
Route::get('statuses/{id}/context', 'Api\ApiV1Controller@statusContext')->middleware('auth:api');
|
||||
Route::get('statuses/{id}/card', 'Api\ApiV1Controller@statusCard')->middleware('auth:api');
|
||||
Route::get('statuses/{id}/reblogged_by', 'Api\ApiV1Controller@statusRebloggedBy')->middleware('auth:api');
|
||||
Route::get('statuses/{id}/favourited_by', 'Api\ApiV1Controller@statusFavouritedBy')->middleware('auth:api');
|
||||
|
||||
Route::get('timelines/home', 'Api\ApiV1Controller@timelineHome')->middleware('auth:api');
|
||||
Route::get('conversations', 'Api\ApiV1Controller@conversations')->middleware('auth:api');
|
||||
Route::get('timelines/public', 'Api\ApiV1Controller@timelinePublic');
|
||||
Route::post('statuses', 'Api\ApiV1Controller@statusCreate')->middleware('auth:api');
|
||||
Route::delete('statuses/{id}', 'Api\ApiV1Controller@statusDelete')->middleware('auth:api');
|
||||
Route::post('statuses/{id}/reblog', 'Api\ApiV1Controller@statusShare')->middleware('auth:api');
|
||||
Route::post('statuses/{id}/unreblog', 'Api\ApiV1Controller@statusUnshare')->middleware('auth:api');
|
||||
Route::delete('statuses/{id}', 'Api\ApiV1Controller@statusDelete')->middleware('auth:api');
|
||||
Route::get('statuses/{id}', 'Api\ApiV1Controller@statusById')->middleware('auth:api');
|
||||
Route::post('statuses', 'Api\ApiV1Controller@statusCreate')->middleware('auth:api');
|
||||
|
||||
|
||||
Route::get('timelines/home', 'Api\ApiV1Controller@timelineHome')->middleware('auth:api');
|
||||
Route::get('timelines/public', 'Api\ApiV1Controller@timelinePublic');
|
||||
Route::get('timelines/tag/{hashtag}', 'Api\ApiV1Controller@timelineHashtag')->middleware('auth:api');
|
||||
|
||||
// Route::get('likes', 'ApiController@hydrateLikes');
|
||||
// Route::post('media', 'ApiController@uploadMedia')->middleware('auth:api');
|
||||
// Route::delete('media', 'ApiController@deleteMedia')->middleware('auth:api');
|
||||
// Route::get('notifications', 'ApiController@notifications')->middleware('auth:api');
|
||||
// Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
|
||||
Route::get('accounts/{id}', 'Api\ApiV1Controller@accountById')->middleware('auth:api');
|
||||
});
|
||||
Route::group(['prefix' => 'v2'], function() {
|
||||
Route::get('config', 'ApiController@siteConfiguration');
|
||||
|
|
Loading…
Reference in a new issue