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

API documentation #1054

Closed
JanWerder opened this issue Mar 20, 2019 · 8 comments
Closed

API documentation #1054

JanWerder opened this issue Mar 20, 2019 · 8 comments
Labels
💼 WIP This is currently being worked on

Comments

@JanWerder
Copy link

The API documentation is missing. This would be key for any client development.

@trwnh trwnh added this to the 1.0.0 - Stable Release milestone Mar 20, 2019
@trwnh trwnh added the 💼 WIP This is currently being worked on label Mar 20, 2019
@daknuett
Copy link

While there is no API documentation, where can one find the API implementation to look some stuff up?

@trwnh
Copy link
Member

trwnh commented Mar 21, 2019

Current API implementation is basically Mastodon v1 API, but it's also a work in progress so you can't expect every method to be implemented yet. Full documentation will be ready with the release of v1.0.0!

@mvolpato
Copy link

Is there a file we can check for the list of implemented api access points? Because I tried the app registration https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#apps and got 404.

@trwnh
Copy link
Member

trwnh commented Apr 29, 2019

@mvolpato So far it's just this:

pixelfed/routes/web.php

Lines 66 to 104 in ccef4d0

Route::group(['prefix' => 'api'], function () {
Route::get('search', 'SearchController@searchAPI');
Route::get('nodeinfo/2.0.json', 'FederationController@nodeinfo');
Route::group(['prefix' => 'v1'], function () {
Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
Route::get('accounts/relationships', 'PublicApiController@relationships');
Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing');
Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers');
Route::get('accounts/{id}', 'PublicApiController@account');
Route::post('avatar/update', 'ApiController@avatarUpdate');
Route::get('likes', 'ApiController@hydrateLikes');
Route::post('media', 'ApiController@uploadMedia');
Route::delete('media', 'ApiController@deleteMedia');
Route::get('notifications', 'ApiController@notifications');
Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
// Route::get('timelines/network', 'PublicApiController@homeTimelineApi');
});
Route::group(['prefix' => 'v2'], function() {
Route::get('config', 'ApiController@siteConfiguration');
Route::get('discover', 'InternalApiController@discover');
Route::get('discover/posts', 'InternalApiController@discoverPosts');
Route::get('profile/{username}/status/{postid}', 'PublicApiController@status');
Route::get('comments/{username}/status/{postId}', 'PublicApiController@statusComments');
Route::get('likes/profile/{username}/status/{id}', 'PublicApiController@statusLikes');
Route::get('shares/profile/{username}/status/{id}', 'PublicApiController@statusShares');
Route::get('status/{id}/replies', 'InternalApiController@statusReplies');
Route::post('moderator/action', 'InternalApiController@modAction');
Route::get('discover/categories', 'InternalApiController@discoverCategories');
Route::post('status/compose', 'InternalApiController@composePost');
});
Route::group(['prefix' => 'local'], function () {
Route::get('i/follow-suggestions', 'ApiController@followSuggestions');
Route::post('status/compose', 'InternalApiController@compose');
Route::get('exp/rec', 'ApiController@userRecommendations');
});
});

@mvolpato
Copy link

It looks like it still misses a way to authenticate. I will watch this file for changes. Thanks!

@amazzoccone
Copy link

Maybe Swagger would be useful?

@patcon
Copy link

patcon commented Jul 10, 2019

@dansup dansup closed this as completed Jul 18, 2019
@janboddez
Copy link

Kinda curious as to how/where this is now covered... 'Official' docs still empty. I was half expecting Laravel Passport routes to just work, but it'd depend on the instance settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💼 WIP This is currently being worked on
Projects
None yet
Development

No branches or pull requests

8 participants