From 200f7039c952489cad29323606fd575e8276ffd8 Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Sun, 19 Nov 2017 18:41:36 -0800 Subject: [PATCH] more endpoints --- server/pages/Api.js | 543 ++++++++++++++++++++++++-------------------- 1 file changed, 295 insertions(+), 248 deletions(-) diff --git a/server/pages/Api.js b/server/pages/Api.js index 085b6e19..ec405030 100644 --- a/server/pages/Api.js +++ b/server/pages/Api.js @@ -158,276 +158,323 @@ export default function Pricing() {

Methods

+ + + + This method returns the information for currently logged in user. + + + + + - - - This method returns the information for currently logged in user. - - - - - + + + You can upload small files and images as part of your documents. + All files are stored using Amazon S3. Instead of uploading files + to Outline, you need to upload them directly to S3 with special + credentials which can be obtained through this endpoint. + + + + + + + - - - You can upload small files and images as part of your documents. All - files are stored using Amazon S3. Instead of uploading files to - Outline, you need to upload them directly to S3 with special - credentials which can be obtained through this endpoint. - - - - - - - + + List all your document collections. + + - - List all your document collections. - - + + + Returns detailed information on a document collection. + + + + + - - - Returns detailed information on a document collection. - - - - - + + Creates a new document collection. + + + + + - - Creates a new document collection. - - - - - + + + This method allows you to modify already created document. + + + + + + + - - -

- This method returns information for a document with a specific ID. - Following identifiers are allowed: -

-
    -
  • - UUID - id field of the document -
  • -
  • - URI identifier - Human readable identifier used in Outline URLs - (e.g. outline-api-i48ZEZc5zjXndcP) -
  • -
-
- - - -
+ + + Delete a collection and all of its documents. This action can't be + undone so please be careful. + + + + + - - - This methods allows you to search all of your documents with - keywords. - - - - - + + +

+ This method returns information for a document with a specific + ID. Following identifiers are allowed: +

+
    +
  • + UUID - id field of the document +
  • +
  • + URI identifier - Human readable identifier used in Outline + URLs (e.g. outline-api-i48ZEZc5zjXndcP) +
  • +
+
+ + + +
- - - This method allows you to publish a new document under an existing - collection. By default a document is set to the parent collection - root. If you want to create a subdocument, you can pass{' '} - parentDocument to set parent document. - - - - ID of the collection to which the document is - created - - } - required - /> - - - - ID of the parent document within the collection - - } - /> - - + + + This methods allows you to search all of your documents with + keywords. + + + + + - - - This method allows you to modify already created document. - - - - - - - + + + This method allows you to publish a new document under an existing + collection. By default a document is set to the parent collection + root. If you want to create a subdocument, you can pass{' '} + parentDocument to set parent document. + + + + ID of the collection to which the document is + created + + } + required + /> + + + + ID of the parent document within the collection + + } + /> + + - - - Move a document into a new location inside the collection. This is - easily done by defining the parent document ID and optional index. - If no parent document is provided, the document will be moved to the - collection root. - - - - - - - + + + This method allows you to modify already created document. + + + + + + + - - - Delete a document and all of its child documents if any. - - - - - + + + Move a document into a new location inside the collection. This is + easily done by defining the parent document ID and optional index. + If no parent document is provided, the document will be moved to + the collection root. + + + + + + + - - - Get a document with its ID or URL identifier from user’s - collections. - - - - - + + + Delete a document and all of its child documents if any. + + + + + - - - Star (favorite) a document for authenticated user. - - - - - + + + Get a document with its ID or URL identifier from user’s + collections. + + + + + - - - Unstar as starred (favorited) a document for authenticated user. - - - - - + + + Star (favorite) a document for authenticated user. + + + + + - - - Return recently viewed documents for the authenticated user - - - + + + Unstar as starred (favorited) a document for authenticated user. + + + + + - - - Return recently starred documents for the authenticated user - - - + + + Return recently viewed documents for the authenticated user + + + - - - Return revisions for a document. Upon each edit, a new revision is - stored. - - - + + + Return recently starred documents for the authenticated user + + + + + + + Return revisions for a document. Upon each edit, a new revision is + stored. + + + +
); } +const MethodList = styled.ul` + margin-bottom: 80px; +`; + +const Methods = (props: { children: React.Element<*> }) => { + const children = React.Children.toArray(props.children); + const methods = children.map(child => child.props.method); + + return ( +
+ + {methods.map(method => ( +
  • + {method} +
  • + ))} +
    + {children} +
    + ); +}; + const MethodContainer = styled.div` - margin-bottom: 40px; + margin-bottom: 80px; `; const Request = styled.h4` @@ -447,7 +494,7 @@ const Method = (props: MethodProps) => { return ( -

    +

    {props.method} - {props.label}

    {description}