more endpoints
This commit is contained in:
@ -158,276 +158,323 @@ export default function Pricing() {
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2>Methods</h2>
|
<h2>Methods</h2>
|
||||||
|
<Methods>
|
||||||
|
<Method method="user.info" label="Get current user">
|
||||||
|
<Description>
|
||||||
|
This method returns the information for currently logged in user.
|
||||||
|
</Description>
|
||||||
|
<Arguments>
|
||||||
|
<Argument id="id" description="Collection id" required />
|
||||||
|
</Arguments>
|
||||||
|
</Method>
|
||||||
|
|
||||||
<Method method="user.info" label="Get current user">
|
<Method method="user.s3Upload" label="Get S3 upload credentials">
|
||||||
<Description>
|
<Description>
|
||||||
This method returns the information for currently logged in user.
|
You can upload small files and images as part of your documents.
|
||||||
</Description>
|
All files are stored using Amazon S3. Instead of uploading files
|
||||||
<Arguments>
|
to Outline, you need to upload them directly to S3 with special
|
||||||
<Argument id="id" description="Collection id" required />
|
credentials which can be obtained through this endpoint.
|
||||||
</Arguments>
|
</Description>
|
||||||
</Method>
|
<Arguments>
|
||||||
|
<Argument
|
||||||
|
id="filename"
|
||||||
|
description="Filename of the uploaded file"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<Argument
|
||||||
|
id="kind"
|
||||||
|
description="Mimetype of the document"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<Argument
|
||||||
|
id="size"
|
||||||
|
description="Filesize of the document"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</Arguments>
|
||||||
|
</Method>
|
||||||
|
|
||||||
<Method method="user.s3Upload" label="Get S3 upload credentials">
|
<Method
|
||||||
<Description>
|
method="collections.list"
|
||||||
You can upload small files and images as part of your documents. All
|
label="List your document collections"
|
||||||
files are stored using Amazon S3. Instead of uploading files to
|
>
|
||||||
Outline, you need to upload them directly to S3 with special
|
<Description>List all your document collections.</Description>
|
||||||
credentials which can be obtained through this endpoint.
|
<Arguments pagination />
|
||||||
</Description>
|
</Method>
|
||||||
<Arguments>
|
|
||||||
<Argument
|
|
||||||
id="filename"
|
|
||||||
description="Filename of the uploaded file"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<Argument
|
|
||||||
id="kind"
|
|
||||||
description="Mimetype of the document"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<Argument
|
|
||||||
id="size"
|
|
||||||
description="Filesize of the document"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
</Arguments>
|
|
||||||
</Method>
|
|
||||||
|
|
||||||
<Method
|
<Method method="collections.info" label="Get a document collection">
|
||||||
method="collections.list"
|
<Description>
|
||||||
label="List your document collections"
|
Returns detailed information on a document collection.
|
||||||
>
|
</Description>
|
||||||
<Description>List all your document collections.</Description>
|
<Arguments>
|
||||||
<Arguments pagination />
|
<Argument id="id" description="Collection id" required />
|
||||||
</Method>
|
</Arguments>
|
||||||
|
</Method>
|
||||||
|
|
||||||
<Method method="collections.info" label="Get a document collection">
|
<Method
|
||||||
<Description>
|
method="collections.create"
|
||||||
Returns detailed information on a document collection.
|
label="Create a document collection"
|
||||||
</Description>
|
>
|
||||||
<Arguments>
|
<Description>Creates a new document collection.</Description>
|
||||||
<Argument id="id" description="Collection id" required />
|
<Arguments>
|
||||||
</Arguments>
|
<Argument id="name" description="Collection name" required />
|
||||||
</Method>
|
<Argument
|
||||||
|
id="description"
|
||||||
|
description="Short description for the collection"
|
||||||
|
/>
|
||||||
|
</Arguments>
|
||||||
|
</Method>
|
||||||
|
|
||||||
<Method
|
<Method method="collections.update" label="Update a collection">
|
||||||
method="collections.create"
|
<Description>
|
||||||
label="Create a document collection"
|
This method allows you to modify already created document.
|
||||||
>
|
</Description>
|
||||||
<Description>Creates a new document collection.</Description>
|
<Arguments>
|
||||||
<Arguments>
|
<Argument id="id" description="Collection ID" required />
|
||||||
<Argument id="name" description="Collection name" required />
|
<Argument id="name" description="Name for the collection" />
|
||||||
<Argument
|
<Argument
|
||||||
id="description"
|
id="color"
|
||||||
description="Short description for the collection"
|
description="Collection color in hex form (e.g. #E1E1E1)"
|
||||||
/>
|
/>
|
||||||
</Arguments>
|
</Arguments>
|
||||||
</Method>
|
</Method>
|
||||||
|
|
||||||
<Method method="documents.info" label="Get a document">
|
<Method method="collections.delete" label="Delete a collection">
|
||||||
<Description>
|
<Description>
|
||||||
<p>
|
Delete a collection and all of its documents. This action can't be
|
||||||
This method returns information for a document with a specific ID.
|
undone so please be careful.
|
||||||
Following identifiers are allowed:
|
</Description>
|
||||||
</p>
|
<Arguments>
|
||||||
<ul>
|
<Argument id="id" description="Collection ID" required />
|
||||||
<li>
|
</Arguments>
|
||||||
UUID - <code>id</code> field of the document
|
</Method>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
URI identifier - Human readable identifier used in Outline URLs
|
|
||||||
(e.g. <code>outline-api-i48ZEZc5zjXndcP</code>)
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</Description>
|
|
||||||
<Arguments>
|
|
||||||
<Argument
|
|
||||||
id="id"
|
|
||||||
description="Document id or URI identifier"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
</Arguments>
|
|
||||||
</Method>
|
|
||||||
|
|
||||||
<Method method="documents.search" label="Search documents">
|
<Method method="documents.info" label="Get a document">
|
||||||
<Description>
|
<Description>
|
||||||
This methods allows you to search all of your documents with
|
<p>
|
||||||
keywords.
|
This method returns information for a document with a specific
|
||||||
</Description>
|
ID. Following identifiers are allowed:
|
||||||
<Arguments>
|
</p>
|
||||||
<Argument id="query" description="Search query" required />
|
<ul>
|
||||||
</Arguments>
|
<li>
|
||||||
</Method>
|
UUID - <code>id</code> field of the document
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
URI identifier - Human readable identifier used in Outline
|
||||||
|
URLs (e.g. <code>outline-api-i48ZEZc5zjXndcP</code>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</Description>
|
||||||
|
<Arguments>
|
||||||
|
<Argument
|
||||||
|
id="id"
|
||||||
|
description="Document id or URI identifier"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</Arguments>
|
||||||
|
</Method>
|
||||||
|
|
||||||
<Method method="documents.create" label="Create a new document">
|
<Method method="documents.search" label="Search documents">
|
||||||
<Description>
|
<Description>
|
||||||
This method allows you to publish a new document under an existing
|
This methods allows you to search all of your documents with
|
||||||
collection. By default a document is set to the parent collection
|
keywords.
|
||||||
root. If you want to create a subdocument, you can pass{' '}
|
</Description>
|
||||||
<code>parentDocument</code> to set parent document.
|
<Arguments>
|
||||||
</Description>
|
<Argument id="query" description="Search query" required />
|
||||||
<Arguments>
|
</Arguments>
|
||||||
<Argument
|
</Method>
|
||||||
id="collection"
|
|
||||||
description={
|
|
||||||
<span>
|
|
||||||
<code>ID</code> of the collection to which the document is
|
|
||||||
created
|
|
||||||
</span>
|
|
||||||
}
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<Argument
|
|
||||||
id="title"
|
|
||||||
description="Title for the document"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<Argument
|
|
||||||
id="text"
|
|
||||||
description="Content of the document in Markdow"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<Argument
|
|
||||||
id="parentDocument"
|
|
||||||
description={
|
|
||||||
<span>
|
|
||||||
<code>ID</code> of the parent document within the collection
|
|
||||||
</span>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Arguments>
|
|
||||||
</Method>
|
|
||||||
|
|
||||||
<Method method="documents.update" label="Update a document">
|
<Method method="documents.create" label="Create a new document">
|
||||||
<Description>
|
<Description>
|
||||||
This method allows you to modify already created document.
|
This method allows you to publish a new document under an existing
|
||||||
</Description>
|
collection. By default a document is set to the parent collection
|
||||||
<Arguments>
|
root. If you want to create a subdocument, you can pass{' '}
|
||||||
<Argument
|
<code>parentDocument</code> to set parent document.
|
||||||
id="id"
|
</Description>
|
||||||
description="Document id or URI identifier"
|
<Arguments>
|
||||||
required
|
<Argument
|
||||||
/>
|
id="collection"
|
||||||
<Argument id="title" description="Title for the document" />
|
description={
|
||||||
<Argument
|
<span>
|
||||||
id="text"
|
<code>ID</code> of the collection to which the document is
|
||||||
description="Content of the document in Markdown"
|
created
|
||||||
/>
|
</span>
|
||||||
</Arguments>
|
}
|
||||||
</Method>
|
required
|
||||||
|
/>
|
||||||
|
<Argument
|
||||||
|
id="title"
|
||||||
|
description="Title for the document"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<Argument
|
||||||
|
id="text"
|
||||||
|
description="Content of the document in Markdow"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<Argument
|
||||||
|
id="parentDocument"
|
||||||
|
description={
|
||||||
|
<span>
|
||||||
|
<code>ID</code> of the parent document within the collection
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Arguments>
|
||||||
|
</Method>
|
||||||
|
|
||||||
<Method method="documents.move" label="Move document in a collection">
|
<Method method="documents.update" label="Update a document">
|
||||||
<Description>
|
<Description>
|
||||||
Move a document into a new location inside the collection. This is
|
This method allows you to modify already created document.
|
||||||
easily done by defining the parent document ID and optional index.
|
</Description>
|
||||||
If no parent document is provided, the document will be moved to the
|
<Arguments>
|
||||||
collection root.
|
<Argument
|
||||||
</Description>
|
id="id"
|
||||||
<Arguments>
|
description="Document id or URI identifier"
|
||||||
<Argument
|
required
|
||||||
id="id"
|
/>
|
||||||
description="Document id or URI identifier"
|
<Argument id="title" description="Title for the document" />
|
||||||
required
|
<Argument
|
||||||
/>
|
id="text"
|
||||||
<Argument
|
description="Content of the document in Markdown"
|
||||||
id="parentDocument"
|
/>
|
||||||
description="ID of the new parent document (if any)"
|
</Arguments>
|
||||||
/>
|
</Method>
|
||||||
<Argument id="index" description="Index of the new location" />
|
|
||||||
</Arguments>
|
|
||||||
</Method>
|
|
||||||
|
|
||||||
<Method method="documents.delete" label="Delete a document">
|
<Method method="documents.move" label="Move document in a collection">
|
||||||
<Description>
|
<Description>
|
||||||
Delete a document and all of its child documents if any.
|
Move a document into a new location inside the collection. This is
|
||||||
</Description>
|
easily done by defining the parent document ID and optional index.
|
||||||
<Arguments>
|
If no parent document is provided, the document will be moved to
|
||||||
<Argument
|
the collection root.
|
||||||
id="id"
|
</Description>
|
||||||
description="Document id or URI identifier"
|
<Arguments>
|
||||||
required
|
<Argument
|
||||||
/>
|
id="id"
|
||||||
</Arguments>
|
description="Document id or URI identifier"
|
||||||
</Method>
|
required
|
||||||
|
/>
|
||||||
|
<Argument
|
||||||
|
id="parentDocument"
|
||||||
|
description="ID of the new parent document (if any)"
|
||||||
|
/>
|
||||||
|
<Argument id="index" description="Index of the new location" />
|
||||||
|
</Arguments>
|
||||||
|
</Method>
|
||||||
|
|
||||||
<Method method="documents.info" label="Get a document">
|
<Method method="documents.delete" label="Delete a document">
|
||||||
<Description>
|
<Description>
|
||||||
Get a document with its ID or URL identifier from user’s
|
Delete a document and all of its child documents if any.
|
||||||
collections.
|
</Description>
|
||||||
</Description>
|
<Arguments>
|
||||||
<Arguments>
|
<Argument
|
||||||
<Argument
|
id="id"
|
||||||
id="id"
|
description="Document id or URI identifier"
|
||||||
description="Document id or URI identifier"
|
required
|
||||||
required
|
/>
|
||||||
/>
|
</Arguments>
|
||||||
</Arguments>
|
</Method>
|
||||||
</Method>
|
|
||||||
|
|
||||||
<Method method="documents.star" label="Star a document">
|
<Method method="documents.info" label="Get a document">
|
||||||
<Description>
|
<Description>
|
||||||
Star (favorite) a document for authenticated user.
|
Get a document with its ID or URL identifier from user’s
|
||||||
</Description>
|
collections.
|
||||||
<Arguments>
|
</Description>
|
||||||
<Argument
|
<Arguments>
|
||||||
id="id"
|
<Argument
|
||||||
description="Document id or URI identifier"
|
id="id"
|
||||||
required
|
description="Document id or URI identifier"
|
||||||
/>
|
required
|
||||||
</Arguments>
|
/>
|
||||||
</Method>
|
</Arguments>
|
||||||
|
</Method>
|
||||||
|
|
||||||
<Method method="documents.unstar" label="Unstar a document">
|
<Method method="documents.star" label="Star a document">
|
||||||
<Description>
|
<Description>
|
||||||
Unstar as starred (favorited) a document for authenticated user.
|
Star (favorite) a document for authenticated user.
|
||||||
</Description>
|
</Description>
|
||||||
<Arguments>
|
<Arguments>
|
||||||
<Argument
|
<Argument
|
||||||
id="id"
|
id="id"
|
||||||
description="Document id or URI identifier"
|
description="Document id or URI identifier"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</Arguments>
|
</Arguments>
|
||||||
</Method>
|
</Method>
|
||||||
|
|
||||||
<Method
|
<Method method="documents.unstar" label="Unstar a document">
|
||||||
method="documents.viewed"
|
<Description>
|
||||||
label="Get recently viewed document for user"
|
Unstar as starred (favorited) a document for authenticated user.
|
||||||
>
|
</Description>
|
||||||
<Description>
|
<Arguments>
|
||||||
Return recently viewed documents for the authenticated user
|
<Argument
|
||||||
</Description>
|
id="id"
|
||||||
<Arguments pagination />
|
description="Document id or URI identifier"
|
||||||
</Method>
|
required
|
||||||
|
/>
|
||||||
|
</Arguments>
|
||||||
|
</Method>
|
||||||
|
|
||||||
<Method
|
<Method
|
||||||
method="documents.starred"
|
method="documents.viewed"
|
||||||
label="Get recently starred document for user"
|
label="Get recently viewed document for user"
|
||||||
>
|
>
|
||||||
<Description>
|
<Description>
|
||||||
Return recently starred documents for the authenticated user
|
Return recently viewed documents for the authenticated user
|
||||||
</Description>
|
</Description>
|
||||||
<Arguments pagination />
|
<Arguments pagination />
|
||||||
</Method>
|
</Method>
|
||||||
|
|
||||||
<Method
|
<Method
|
||||||
method="documents.revisions"
|
method="documents.starred"
|
||||||
label="Get revisions for a document"
|
label="Get recently starred document for user"
|
||||||
>
|
>
|
||||||
<Description>
|
<Description>
|
||||||
Return revisions for a document. Upon each edit, a new revision is
|
Return recently starred documents for the authenticated user
|
||||||
stored.
|
</Description>
|
||||||
</Description>
|
<Arguments pagination />
|
||||||
<Arguments pagination />
|
</Method>
|
||||||
</Method>
|
|
||||||
|
<Method
|
||||||
|
method="documents.revisions"
|
||||||
|
label="Get revisions for a document"
|
||||||
|
>
|
||||||
|
<Description>
|
||||||
|
Return revisions for a document. Upon each edit, a new revision is
|
||||||
|
stored.
|
||||||
|
</Description>
|
||||||
|
<Arguments pagination />
|
||||||
|
</Method>
|
||||||
|
</Methods>
|
||||||
</Container>
|
</Container>
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 (
|
||||||
|
<div>
|
||||||
|
<MethodList>
|
||||||
|
{methods.map(method => (
|
||||||
|
<li key={method}>
|
||||||
|
<a href={`#${method}`}>{method}</a>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</MethodList>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const MethodContainer = styled.div`
|
const MethodContainer = styled.div`
|
||||||
margin-bottom: 40px;
|
margin-bottom: 80px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Request = styled.h4`
|
const Request = styled.h4`
|
||||||
@ -447,7 +494,7 @@ const Method = (props: MethodProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<MethodContainer>
|
<MethodContainer>
|
||||||
<h3>
|
<h3 id={props.method}>
|
||||||
<code>{props.method}</code> - {props.label}
|
<code>{props.method}</code> - {props.label}
|
||||||
</h3>
|
</h3>
|
||||||
<div>{description}</div>
|
<div>{description}</div>
|
||||||
|
Reference in New Issue
Block a user