change API documentation
This commit is contained in:
@@ -138,7 +138,7 @@
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<h3>API documentation</h3>
|
||||
<h3>API endpoints</h3>
|
||||
|
||||
<p>Once you have a registered app, you have gone through the authorization
|
||||
and have successfully obtained an access token, you can use it to place
|
||||
@@ -147,12 +147,28 @@
|
||||
<p>The workout summary data and the stroke data are obtained and sent
|
||||
separately.</p>
|
||||
|
||||
<p>
|
||||
<ul class="contentli">
|
||||
<li><a href="/rowers/api-docs/">API documentation</a>
|
||||
(But refer to the below for stroke data.)</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p><em>Challenges</em> are accessed through <a href="/rowers/api/challenges/">/rowers/api/challenges/</a>
|
||||
and <a href="/rowers/api/challenges/1">/rowers/api/challenges/{id}</a> where {id} is the ID of the challenge. Allowed method
|
||||
is GET.</p>
|
||||
<p><em>Entries</em> are accessed through <a href="/rowers/api/entries/">/rowers/api/entries/</a>
|
||||
and <a href="/rowers/api/entries/1">/rowers/api/entries/{id}</a> where {id} is the ID of the entry.
|
||||
Allowed methods are GET.</p>
|
||||
<p><em>Charts</em> are accessed through <a href="/rowers/api/charts/">/rowers/api/charts/</a>
|
||||
and <a href="/rowers/api/charts/1">/rowers/api/charts/{id}</a> where {id} is the ID of the chart.
|
||||
Allowed method are GET, DELETE.</p>
|
||||
<p><em>Courses</em> are accessed through <a href="/rowers/api/geocourses/">/rowers/api/geocourses/</a>
|
||||
and <a href="/rowers/api/geocourses/1">/rowers/api/geocourses/{id}</a> where {id} is the ID of the Course.
|
||||
Allowed method are GET.</p>
|
||||
<p><em>Course Standard Collections</em> are accessed through <a href="/rowers/api/standardcollections/">/rowers/api/standardcollections/</a>
|
||||
and <a href="/rowers/api/standardcollections/1">/rowers/api/standardcollections/{id}</a> where {id} is the ID of the Standard Collection.
|
||||
Allowed method are GET.</p>
|
||||
<p><em>Individual Course Standards</em> are accessed through <a href="/rowers/api/standards/1">/rowers/api/standards/{id}</a> where {id} is the ID of the Course Standard.
|
||||
Allowed method are GET.</p>
|
||||
<p><em>Workouts</em> are accessed through <a href="/rowers/api/workouts/">/rowers/api/workouts/</a>
|
||||
and <a href="/rowers/api/workouts/1">/rowers/api/workouts/{id}</a> where {id} is the ID of the Workout.
|
||||
Allowed method are GET, POST, DELETE.</p>
|
||||
|
||||
|
||||
|
||||
<h3>POST stroke data - API</h3>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ from rest_framework.permissions import *
|
||||
from rowers import views
|
||||
from django.contrib.auth import views as auth_views
|
||||
from django.views.generic.base import TemplateView
|
||||
from django.utils.decorators import method_decorator
|
||||
|
||||
from rowers.permissions import (
|
||||
IsOwnerOrNot,IsOwnerOrReadOnly,
|
||||
|
||||
@@ -431,7 +431,7 @@ REST_FRAMEWORK = {
|
||||
# 'rest_framework.permissions.DjangoModelPermissions'
|
||||
],
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
# 'rest_framework.authentication.BasicAuthentication',
|
||||
'rest_framework.authentication.BasicAuthentication',
|
||||
# 'rest_framework.authentication.SessionAuthentication',
|
||||
# 'rest_framework.authentication.TokenAuthentication',
|
||||
'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
|
||||
@@ -441,7 +441,7 @@ REST_FRAMEWORK = {
|
||||
}
|
||||
|
||||
SWAGGER_SETTINGS = {
|
||||
'SECURITY_DEFINITION': {
|
||||
'SECURITY_DEFINITIONS': {
|
||||
'basic': {
|
||||
'type':'basic'
|
||||
},
|
||||
@@ -449,9 +449,16 @@ SWAGGER_SETTINGS = {
|
||||
'type':'oauth2',
|
||||
'authorizationUrl':'/rowers/o/authorize',
|
||||
'flow': 'implicit',
|
||||
}
|
||||
},
|
||||
'api_key': {
|
||||
'type': 'apiKey',
|
||||
'in': 'header',
|
||||
'name': 'Authorization'
|
||||
},
|
||||
},
|
||||
'SHOW_REQUEST_HEADERS': True,
|
||||
'USE_SESSION_AUTH': True,
|
||||
'JSON_EDITOR': True,
|
||||
}
|
||||
|
||||
# Analytics
|
||||
|
||||
Reference in New Issue
Block a user