@ -0,0 +1,11 @@ | |||
.api-descriptions { | |||
.address { | |||
samp { | |||
font-weight: 400; | |||
&.method { | |||
font-weight: 500; | |||
} | |||
} | |||
} | |||
} |
@ -1,26 +0,0 @@ | |||
<div class="page-header"> | |||
<h1><%= t('.title') %></h1> | |||
</div> | |||
<p><%= link_to t('.new'), new_oauth_application_path, class: 'btn btn-success' %></p> | |||
<table class="table table-striped"> | |||
<thead> | |||
<tr> | |||
<th><%= t('.name') %></th> | |||
<th><%= t('.callback_url') %></th> | |||
<th></th> | |||
<th></th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<% @applications.each do |application| %> | |||
<tr id="application_<%= application.id %>"> | |||
<td><%= link_to application.name, oauth_application_path(application) %></td> | |||
<td><%= application.redirect_uri %></td> | |||
<td><%= link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(application), class: 'btn btn-link' %></td> | |||
<td><%= render 'delete_form', application: application %></td> | |||
</tr> | |||
<% end %> | |||
</tbody> | |||
</table> |
@ -0,0 +1,19 @@ | |||
- content_for :page_title do | |||
Applications | |||
%p= link_to t('.new'), new_oauth_application_path, class: 'btn btn-success' | |||
%table.table | |||
%thead | |||
%tr | |||
%th= t('.name') | |||
%th= t('.callback_url') | |||
%th | |||
%th | |||
%tbody | |||
- @applications.each do |application| | |||
%tr | |||
%td= link_to application.name, oauth_application_path(application) | |||
%td= application.redirect_uri | |||
%td= link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(application), class: 'btn btn-link' | |||
%td= render 'delete_form', application: application |
@ -1,5 +0,0 @@ | |||
<%- submit_btn_css ||= 'btn btn-link' %> | |||
<%= form_tag oauth_authorized_application_path(application) do %> | |||
<input type="hidden" name="_method" value="delete"> | |||
<%= submit_tag t('doorkeeper.authorized_applications.buttons.revoke'), onclick: "return confirm('#{ t('doorkeeper.authorized_applications.confirmations.revoke') }')", class: submit_btn_css %> | |||
<% end %> |
@ -0,0 +1,3 @@ | |||
= form_tag oauth_authorized_application_path(application) do | |||
%input{type: "hidden", name: "_method", value: "delete"} | |||
= submit_tag 'Revoke', class: 'btn' |
@ -1,25 +0,0 @@ | |||
<header class="page-header"> | |||
<h1><%= t('doorkeeper.authorized_applications.index.title') %></h1> | |||
</header> | |||
<main role="main"> | |||
<table class="table table-striped"> | |||
<thead> | |||
<tr> | |||
<th><%= t('doorkeeper.authorized_applications.index.application') %></th> | |||
<th><%= t('doorkeeper.authorized_applications.index.created_at') %></th> | |||
<th></th> | |||
<th></th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<% @applications.each do |application| %> | |||
<tr> | |||
<td><%= application.name %></td> | |||
<td><%= application.created_at.strftime(t('doorkeeper.authorized_applications.index.date_format')) %></td> | |||
<td><%= render 'delete_form', application: application %></td> | |||
</tr> | |||
<% end %> | |||
</tbody> | |||
</table> | |||
</main> |
@ -0,0 +1,16 @@ | |||
- content_for :page_title do | |||
Authorized apps | |||
%p | |||
You can register a new OAuth2 app | |||
= link_to 'here', oauth_applications_path | |||
%table.table | |||
%thead | |||
%tr | |||
%th= t('doorkeeper.authorized_applications.index.application') | |||
%th | |||
- @applications.each do |application| | |||
%tr | |||
%td= application.name | |||
%td= render 'delete_form', application: application |
@ -1,3 +1,97 @@ | |||
.activity-stream.activity-stream-embedded | |||
- @statuses.each do |status| | |||
= render partial: 'stream_entries/status', locals: { status: status, include_threads: false, is_successor: false, is_predecessor: false } | |||
%h3 OAuth2 | |||
%p All API methods require a valid access token. | |||
%h3 Statuses | |||
%ul.api-descriptions | |||
%li | |||
.address | |||
%samp.method GET | |||
%samp /api/statuses/home | |||
.description | |||
Returns user's home timeline | |||
%li | |||
.address | |||
%samp.method GET | |||
%samp /api/statuses/mentions | |||
.description | |||
Returns user's mentions timeline | |||
%li | |||
.address | |||
%samp.method POST | |||
%samp /api/statuses | |||
.options | |||
Options: | |||
= succeed ',' do | |||
%samp status | |||
%samp in_reply_to_id | |||
.description | |||
Creates a new status, optionally as a response to another, from user's account. Returns the new status. | |||
%li | |||
.address | |||
%samp.method GET | |||
%samp /api/statuses/:id | |||
.description | |||
Returns a single status | |||
%li | |||
.address | |||
%samp.method POST | |||
%samp /api/statuses/:id/reblog | |||
.description | |||
Reblogs a status from user's account. Returns the target status. | |||
%li | |||
.address | |||
%samp.method POST | |||
%samp /api/statuses/:id/favourite | |||
.description | |||
Favourites a status from user's account. Returns the target status. | |||
%h3 Accounts | |||
%ul.api-descriptions | |||
%li | |||
.address | |||
%samp.method GET | |||
%samp /api/accounts/:id | |||
.description | |||
Returns a single account | |||
%li | |||
.address | |||
%samp.method GET | |||
%samp /api/accounts/:id/statuses | |||
.description | |||
Returns an account's statuses | |||
%li | |||
.address | |||
%samp.method GET | |||
%samp /api/accounts/:id/followers | |||
.description | |||
Returns accounts following an account | |||
%li | |||
.address | |||
%samp.method GET | |||
%samp /api/accounts/:id/following | |||
.description | |||
Returns the accounts the target account follows | |||
%li | |||
.address | |||
%samp.method POST | |||
%samp /api/accounts/:id/follow | |||
.description | |||
Follows target account from the user's account. Returns the target account. | |||
%li | |||
.address | |||
%samp.method POST | |||
%samp /api/accounts/:id/unfollow | |||
.description | |||
Unfollows target account from the user's account. Returns the target account. | |||
%h3 Follows | |||
%ul.api-descriptions | |||
%li | |||
.address | |||
%samp.method POST | |||
%samp /api/follows | |||
.options | |||
Options: | |||
%samp uri | |||
.description | |||
Follows a user, regardless of where they are, from user's account. URI assumed to be of username@domain form. Returns the target account. |